[Vtigercrm-commits] [Vtiger development] #8601: Reports Broken when >1 UI10 in secondary module
Vtiger development
vtiger-tickets at trac.vtiger.com
Tue Jul 14 12:22:01 GMT 2015
#8601: Reports Broken when >1 UI10 in secondary module
------------------------+------------------------
Reporter: alanlord | Owner: developer
Type: defect | Status: new
Priority: unassigned | Milestone: Unassigned
Component: vtigercrm | Version: 6.3.0
Severity: High | Keywords:
------------------------+------------------------
Having spent a morning looking at this I have given up.
If you use a module as a secondary module in a report and it has more then
one UI10 to the same module (in my example I had two Account relationship
fields) then the report fails to run because the Query Generator in the
generateReportsSecQuery() creates duplicate aliases for the the target
table. (See example error log below).
However, even when managed to fix the generateReportsSecQuery() function
so it produced a query that worked, the code in ReportRun.php seems to
generate a secondary query to handle the Column headings. I gave up at
this point.
{{{
Tue Jul 14 09:22:14 2015,802 [16492] INFO VT - PearDatabase ->ADODB error
Query Failed:
select
sum(libertus_lstourdetailscf.cf_964) 'LSTourDetails_Sales_Volume_SUM',
sum(libertus_lstourdetails.giftvalue)
'LSTourDetails_LSTOURDETAILS_GIFT_VALUE_SUM',
sum(libertus_lstourdetails.depositamnt)
'LSTourDetails_LSTOURDETAILS_DEPOSIT_AMOUNT_SUM'
from libertus_lstourfamilies
inner join vtiger_crmentity
on vtiger_crmentity.crmid=libertus_lstourfamilies.lstourfamiliesid
left join vtiger_groups
on vtiger_groups.groupid = vtiger_crmentity.smownerid
left join vtiger_users
on vtiger_users.id = vtiger_crmentity.smownerid
left join vtiger_reptmptbl_155a4d4c10fe3d6686545900 as
libertus_lstourdetails
on
libertus_lstourdetails.lstourfamiliesid=libertus_lstourfamilies.lstourfamiliesid
left join vtiger_crmentity as vtiger_crmentityLSTourDetails
on vtiger_crmentityLSTourDetails.crmid =
libertus_lstourdetails.lstourdetailsid AND
vtiger_crmentityLSTourDetails.deleted=0
left join libertus_lstourdetailscf as libertus_lstourdetailscf
on
libertus_lstourdetailscf.lstourdetailsid=libertus_lstourdetails.lstourdetailsid
left join vtiger_crmentity as vtiger_crmentityRelLSTourDetails1103
on vtiger_crmentityRelLSTourDetails1103.crmid =
libertus_lstourdetails.resortid and
vtiger_crmentityRelLSTourDetails1103.deleted=0
left join *vtiger_account* as vtiger_accountRelLSTourDetails
<<<<<< 1st Alias here
on vtiger_accountRelLSTourDetails.accountid =
vtiger_crmentityRelLSTourDetails1103.crmid
left join vtiger_crmentity as vtiger_crmentityRelLSTourDetails1105
on vtiger_crmentityRelLSTourDetails1105.crmid =
libertus_lstourdetails.contactid and
vtiger_crmentityRelLSTourDetails1105.deleted=0
left join vtiger_contactdetails as vtiger_contactdetailsRelLSTourDetails
on vtiger_contactdetailsRelLSTourDetails.contactid =
vtiger_crmentityRelLSTourDetails1105.crmid
left join *vtiger_account* as vtiger_accountRelLSTourDetails
<<<<< 2nd Alias here
on vtiger_accountRelLSTourDetails.accountid =
vtiger_crmentityRelLSTourDetails1117.crmid
WHERE libertus_lstourfamilies.lstourfamiliesid > 0 AND
vtiger_crmentity.deleted=0 and (( libertus_lstourdetails.tourdate BETWEEN
'2015-07-06' AND '2015-07-12' ) ) ::->[1066]Not unique table/alias:
'vtiger_accountRelLSTourDetails'
}}}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8601>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list