Since an on-demand subreport opens in a different window, you won't be able to export it simultaneously with the main report. One option might be to add a parameter that checks whether the report is for export or not. Then you could add the sub twice (once as an on-demand sub and once not), and then conditionally suppress each using the parameter.
Instead of using a subreport, I would just create the report with the details, with summaries at the group level. Then create a parameter {?Show Details?} wtih options Yes and No. Conditionally suppress the detail section with a formula:
{?Show Details?}="No"
If they want to export, then they would run the report with details shown.
If they are insistent on the link approach, then add the linked on-demand subreport and also add another version of the same sub without 'on-demand' checked. If the details should show below group summaries (implying the sub is linked to the group field), then add it to a group header_b section. Then conditionally suppress the group header_b section with a parameter {?Export?} with yes and no options.
One approach could be to use my Export UFL so the report displays the main report, and subreport is not "On Demand", but has all it's sections hidden or suppressed.
Formulas in the subreport could build a CSV file with the values you want. You could also include fields from the main report and even create multiple CSV files from one report. The CSV file will open in Excel.
It's not really an export. The viewing of the report procesess the formulas in the report that call functions in the UFL that build a file (various formats supported) as you view the page.
Trial version available for download from my web site.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.