AnsweredAssumed Answered

Kreport module - blank screen when using 'not exists' filter

Question asked by Ramon Marcondes on May 9, 2016


I'm using SugarCRM Community 6.5.22, with PHP 5.5.9, on Ubuntu 14.04 LTS.

Although Sugar 6.5 doesn't support PHP version bigger than 5.3, pratically all modules and functions, including KReport, works without problems.


But I'm having a particular problem, the same as another person had here:

Kreporter: blank page when choosing a "Not existing" selecting clause in filters


In the Kreport module, I need to get the Accounts that don't have any related Contacts.

It is defined in this screen:


Using any other required option not being 'notexisting', it shows some results.

But using the 'notexisting' clause, when saving / previewing it only gives a blank screen...


What could be wrong with KReport, or the Sugar instance?

The only modification I've done to the module was a Brazilian Portuguese translation, nothing affecting the core module logic.

I thought it could be something like that, but I tried with a clean KReport installation and it gave the same results.

The another person I cited in the link above had the same problem, without customizations.


Then I've tried checking the sugarcrm.log and I got the following SQL error:


Query Failed: SELECT sugarRecordId, sugarRecordModule, unionid, aqshtdetxzaid, aqshtdetxzapath, csfxjdhqbfyid, csfxjdhqbfypath FROM (SELECT as "sugarRecordId", 'Contacts' as "sugarRecordModule" , 'root' as "unionid", as "aqshtdetxzaid", 'root:Contacts' as "aqshtdetxzapath", '' as "csfxjdhqbfyid", ''  as "csfxjdhqbfypath" FROM contacts aqshtdetxza WHERE aqshtdetxza.deleted = '0'  UNION SELECT as "sugarRecordId", 'Accounts' as "sugarRecordModule" , 'k5f84f1a6b365607f740098a1082c' as "unionid", '' as "aqshtdetxzaid", ''  as "aqshtdetxzapath", as "csfxjdhqbfyid", 'root:Accounts' as "csfxjdhqbfypath"* FROM accounts csfxjdhqbfy WHERE csfxjdhqbfy.deleted = '0' ) unionResult   ORDER BY sugarRecordId ASC: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM accounts csfxjdhqbfy WHERE csfxjdhqbfy.deleted = '0' ) unionResult   ORDE' at line 1


Why it's generating a '*' selection on side of a field?

How could I solve this?


Any help would be appreciated.