<div dir="ltr"><div>I saw in one client thats the reports aren't equals in vtiger 5.4 between viewing and exporting.<br></div><div><br></div><div>The visualization list 125 lines. The exprted file (XLS and PDF) list 73 lines. </div>

<div><br></div><div>I found that this line is the cause: </div><div><br></div><div><a href="http://trac.vtiger.com/cgi-bin/trac.cgi/browser/vtigercrm/trunk/modules/Reports/ReportRun.php#L1826">/modules/Reports/ReportRun.php</a> - Line: 1826</div>

<div>$reportquery = "select DISTINCT ".$selectedcolumns." ".$reportquery." ".$wheresql;</div><div><br></div><div>Why there is a DISTINCT in the report query?</div><div><br></div><div>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. </div>

<div><br></div><div>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.</div><div><br></div><div>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.</div>

<div><br></div><div>Anyone know why there is a DISTINCT in that line?</div><div><br></div><div>My solutions should be remove DISTINCT.</div><div><div dir="ltr"><p style="color:rgb(34,34,34);font-family:Arial,Verdana,sans-serif">

</p><p><strong><font size="4">Edgar Ferreira da Silva</font></strong></p><p>Email: <a href="mailto:edgar@forbit.com.br" style="color:rgb(17,85,204)" target="_blank">edgar@forbit.com.br</a></p><table border="0" cellpadding="1" cellspacing="1">

<tbody><tr><td style="margin:0px;width:200px"><img alt="Forbit Tecnologia" src="https://www.forbit.com.br/crm/test/logo/logo-branco-3.jpg" style="width: 199px; min-height: 136px;"></td><td style="margin:0px"><p><strong>Desenvolvimento de Software | Consultoria e Soluções de CRM</strong></p>

<p>Rua Paulo Américo Russo, 679, Jd. Buzolin - Araras - SP - CEP: 13603-232</p><p>Fone/Fax: <a value="+551933510586" style="color:rgb(17,85,204)">(19) 3351 - 0586</a></p><p><a href="http://www.forbit.com.br/" style="color:rgb(17,85,204)" target="_blank">www.forbit.com.br</a> - <a href="mailto:contato@forbit.com.br" style="color:rgb(17,85,204)" target="_blank">contato@forbit.com.br</a></p>

</td></tr></tbody></table><p></p></div></div>
</div>