Merge multiple reports into a single report with VB 6.0 DataReport
Posted on 2004-10-08
I have a form that lists several different names of reports a user can choose. Beside each report name is a checkbox. At the bottom is a print report button.
[x] Year Stats report for A Summary
[ ] Year Stats report for B Summary
[x] Year Stats report for A
[ ] Year Stats report for B
[x] Monthly Stats report for A
[x] Monthly Stats report for B
What I want is the ability for the user to select as many reports as he wishes by clicking on the checkboxes beside the report name and when he has finished making his selection he would click on the print button and all checked reports would be printed off as one. I know I can print each report individually within the code. This won't work for me.
The tough part is that I want to merge all selected reports into one report for two reasons:
1) I want the page numbering to be as if it were only one report. Therefore page 1 to n for the overall report.
a) I do not want to print the first report page 1 to i and then print the second report page 1 to j and so on...
2) I want to be able to print this to a single file(html or pdf).
Is there a solution that allows a report to have subreports so that I can easily implement the solution I am looking for?
I am using Visual Basic 6.0 with the DataReport and the DataEnvironment designers