[Vtigercrm-developers] Wrong results when export Reports

Edgar Silva edgar at forbit.com.br
Fri Jun 21 00:17:54 UTC 2013


I saw in one client thats the reports aren't equals in vtiger 5.4 between
viewing and exporting.

The visualization list 125 lines. The exprted file (XLS and PDF) list 73
lines.

I found that this line is the cause:

/modules/Reports/ReportRun.php<http://trac.vtiger.com/cgi-bin/trac.cgi/browser/vtigercrm/trunk/modules/Reports/ReportRun.php#L1826>-
Line: 1826
$reportquery = "select DISTINCT ".$selectedcolumns." ".$reportquery."
".$wheresql;

Why there is a DISTINCT in the report query?

It's affecting our report cause my client didn't have included an ID or
Sequential Field in the report. And shall have multiple values that may
look the same, but, they aren't.

The HTML output needs the crmid to link to detailview of the register. So,
when the sql with DISTINCT clause runs fine cause each crmid differs each
register.

But, in others output formats, there is no action link. So, there is no the
crmid field. And the register may grouped by DISTINCT clause.

Anyone know why there is a DISTINCT in that line?

My solutions should be remove DISTINCT.

*Edgar Ferreira da Silva*

Email: edgar at forbit.com.br
[image: Forbit Tecnologia]

*Desenvolvimento de Software | Consultoria e Soluções de CRM*

Rua Paulo Américo Russo, 679, Jd. Buzolin - Araras - SP - CEP: 13603-232

Fone/Fax: (19) 3351 - 0586

www.forbit.com.br - contato at forbit.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130620/0a76e328/attachment.html>


More information about the vtigercrm-developers mailing list