Hi folks,
I am building a master-detail report using two tables, two queries, and a sub-report. The main report pulls records from the master table and the subreport has its own query wherein it pulls related data from a "detail" table. My problem is that I want to include a summary count at the end of each subreport showing the number of detail records returned. When I place "Count(UID)" in the footer of the subreport (where UID is a field in the detail table) I get a "UID out of range" error. When I include "Count(*)" in the footer, it shows me the total count of master table records! Keep in mind that this is the footer of the subreport and that the subreport has its own query.
Why can't I show the number of entries in the detail and how can I fix this?
Thank you!
Mark Brittingham
Count in a subreport footer is not working
Re: Count in a subreport footer is not working
Support · Dec 9, 2008Hello Mark,
You can display the summary count of the sub report without any problem. You will have to use the Count Aggregate function which takes the subreport Id and query Id of the subreport. This sets the scope of the Count function to use the valued from the sub report. This will show the total records returned in the sub report. Below is the code to do this.
Count(*,SubReportID,SubreportQueryId)
You can also use the field name instead of the "*".
Thanks,
ceTe Software Support Team.