[Vtigercrm-developers] Query error "unknown column" in reports with a related module

Steve Kenow skenow at rdspos.com
Thu Mar 14 21:34:56 GMT 2024


We have several reports that use a related module for nothing more than a
condition - none of the module's fields are in the report. Both are core
modules - accounts and service contracts. These reports did work in VT6.5.0
and now in VT7.5.0 they return 0 records (number of records displays NaN at
the top of the report). Looking at the debug, there was a fatal error
trying to execute the query - Unknown column
'vtiger_servicecontractscf.cf_1472' in 'where clause'

Which is reasonable, because the table was not included -

SELECT count(*) AS count FROM *vtiger_account*
     inner join *vtiger_crmentity* on
vtiger_crmentity.crmid=vtiger_account.accountid
     inner join *vtiger_accountshipads* on
vtiger_account.accountid=vtiger_accountshipads.accountaddressid
     inner join *vtiger_accountscf* on vtiger_account.accountid =
vtiger_accountscf.accountid
     left join *vtiger_groups* on vtiger_groups.groupid =
vtiger_crmentity.smownerid
     left join *vtiger_users* on vtiger_users.id =
vtiger_crmentity.smownerid
WHERE vtiger_account.accountid > 0  AND vtiger_crmentity.deleted=0 and ((
vtiger_servicecontractscf.cf_1472 = 'A4' and vtiger_accountscf.cf_807 =
'Active' ) )

Curious what would happen if I included a field from service contracts, I
added a field and the report generated without any errors.

Is this known behavior? It certainly isn't desired behavior, at least for
us. I have modified all those reports to include a column from the related
module and wonder what else might be impacted by this.

*[image: RDS Logo]*
*Steve Kenow*
Manager, End-User Services and Support - RDS MN
<https://www.rdspos.com/Minneapolis-Minnesota-Grocery-Point-of-Sale-System>
Direct: (952) 392-2686
Office: (952) 934-4001
Email: skenow at rdspos.com

[image: Icon 1]
<https://mailtrack.io/trace/link/d5e46ac8cfdec7b8ebdc539696dd45306644b800?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FGrocery&userId=3091118&signature=18b062316c510b1b>
[image:
Icon 2]
<https://mailtrack.io/trace/link/b0fdfdd837e0d187e174cae0c9479c9b847c4e36?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FQuick-Service%2FPoint-of-Sale-Solutions&userId=3091118&signature=b26cf2b23255a2a2>
[image:
Icon 3]
<https://mailtrack.io/trace/link/9c1116af49d5de3a851b38185dbd7ba07d27def2?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FRestaurant%2FPoint-of-Sale-Solutions&userId=3091118&signature=78db9a7d4392c7ed>
[image:
Icon 4]
<https://mailtrack.io/trace/link/c5c6a63b04b163898650fb7e2fdd7312ca923cdf?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FGeneral-Retail&userId=3091118&signature=1ec7a1d9db94a0f1>
[image:
Icon 5]
<https://mailtrack.io/trace/link/9d0a121b09b0d5e1ba1c5be04c5c2b8d969b7d2c?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FConvenience-Store%2FNCR-Radiant-Convenience-Store-POS-System&userId=3091118&signature=112f29b42fe5a787>
[image:
Icon 6]
<https://mailtrack.io/trace/link/16b4ffb1c4363203009e09666cb41ce82f3a39c1?w=anNrb2xha0ByZHNwb3MuY29t&url=https%3A%2F%2Fwww.rdspos.com%2FProducts-Solutions%2FRDS-Payment-Services&userId=3091118&signature=84ffb1248e80fb55>
------------------------------

Support Questions/Issues? Email rdshelp at rdspos.com (non-emergencies) or
call (952) 934-4002 24/7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20240314/a035f0c8/attachment.html>


More information about the vtigercrm-developers mailing list