[Vtigercrm-developers] Blank Report for custom module

Alan Lord alanslists at gmail.com
Mon Feb 15 10:40:43 GMT 2016


On 15/02/16 10:25, Mutuku Ndeti wrote:
> Thanks Alan for the response.  It led me to the problem.
>
> I have a uitype 77 (user).  When I removed it the report works.
>
> I need the field in the report. When I try export to excel on list view,
> the field exports data from the services modules (not users).
>
> What could be the problem?

Ahh - yes, I have come across something similar to this before where I 
had two relationships to Users in a custom module.

The QueryGenerator is broken if you try to Order By the user_name (or 
any user field) because it doesn't prefix with the correct tablename.

The QueryGenerator aliases the tables correctly so you will have 
vtiger_users and vtiger_users2 *but* the ORDER BY clause just uses the 
field name so you get a SQL error like:

> ::->[1052]Column 'user_name' in order clause is ambiguous

I did try fixing the QueryGenerator but I lost the will to live in the 
end and we changed the module field ;-)

HTH

Al




More information about the vtigercrm-developers mailing list