Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Report merges rows when displayed columns are equal
#1
We create a report for assets on a weekly basis. We actually create the report for accounts, and then show the related assets. We show a number of columns for assets, but I've noticed something I've never noticed before: if there are two assets for an account, and all the info in the columns that you choose to show on the report is the same only one asset shows up on the report. I solved this right now by adding the serial number to the report (which is always unique), but personally I believe the reporting system should not filter duplicates based on only the visible columns. Actually, it should not filter duplicates at all I think.
Reply
#2
That DISTINCT is added here:

https://github.com/tsolucio/corebos/blob....php#L1990

I traced it all the way back to our vtiger CRM origins:

https://github.com/tsolucio/corebos/blob....php#L1826

Sincerely I don't know why it is there nor the implications of eliminating it. I remember that it is needed in the Inventory modules reports when you join on the product lines and, in fact, in the vtiger crm code you can see an if that adds it (even though it is already there!!) for these modules.

Not sure what to say and I am no fan of changing the functionality of the reporting system when every user since who knows when has been using it that way.

Comments?
Joe
TSolucio
Reply
#3
That's some profound digging around you did there.. I'm trying to think about a use case where a query would fail if that DISTINCT wouldn't be there. Can't think of anything, but then again I'm no SQL wizard. Maybe it would be good to run a test, by removing it and opening/exporting all kinds of different reports to see if one breaks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)