Report using MySQL Rollup seems to create random results
Posted: Fri Apr 20, 2012 7:13 pm
Hello,
I am creating a report, and am pulling together a couple tables within the SQL select statement to make the report table. In that sql statement, I use sum and rollup functions. The table itself is giving the proper answers (I manually issued the SQL statement to mysql and verified that it creates all the proper data, including the NULL rows at the end of each group for "summary" data and then an overall NULL (I have 2 group by columns, so it does a group for each client and then an overall at the end of the report). The problem is, when the report itself is created, it appears that it randomly prints out the NULL row, instead of always having the NULL row as the last row in each group, and hence isn't always displaying the proper summary data..?? Also, it seems to actually print out a "NULL" Row instead of just realizing that it is the "summary" rows and printing out the final data..
I assume I am either doing something wrong, or misunderstanding what can/cannot be done with reports..
Thanks,
- Andre
I am creating a report, and am pulling together a couple tables within the SQL select statement to make the report table. In that sql statement, I use sum and rollup functions. The table itself is giving the proper answers (I manually issued the SQL statement to mysql and verified that it creates all the proper data, including the NULL rows at the end of each group for "summary" data and then an overall NULL (I have 2 group by columns, so it does a group for each client and then an overall at the end of the report). The problem is, when the report itself is created, it appears that it randomly prints out the NULL row, instead of always having the NULL row as the last row in each group, and hence isn't always displaying the proper summary data..?? Also, it seems to actually print out a "NULL" Row instead of just realizing that it is the "summary" rows and printing out the final data..
I assume I am either doing something wrong, or misunderstanding what can/cannot be done with reports..
Thanks,
- Andre