Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Merge multiple reports into a single report with VB 6.0 DataReport

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.

For example:

[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
...
                                     [Print Report]


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

Thanks.
0
dcprog
Asked:
dcprog
  • 3
1 Solution
 
anvCommented:
hi  dcprog

i believe its not possible with data reports..

u can do this in Crystal Reports...

using Crystal Reports Designer Component in VB..
check link below:

http://216.239.57.104/search?q=cache:JdScwCSBTNAJ:support.businessobjects.com/communityCS/TechnicalPapers/apps_rdc.pdf.asp%3FrecDnlReq%3DRecord%26dnlPath%3Dapps_rdc.pdf+subreports+Crystal+Report+Designer+Component+&hl=en
0
 
dcprogAuthor Commented:
If it isn't possible to incorporate subreports, would it be possible to create one single report containing all the listed reports with one huge query, however each subreport would simply be a detail section and then I could set each detail section as visible or not depending on the selection? Is it possible to set a detail section as visible or not and for that matter can I have multiple detail sections in one report? Also what would I then do for the subreports that contain grouped sections?

It's not that I don't want to try crystal reports its just that I've never used it before and don't know how to program with it not to mention incorporating this 3rd party tool into my application and finally what the cost is to use crystal reports? I guess if it simply isn't possible to do this with the datareport designer then I will be left with no choice but to learn crystal reports. However I just want to be absolutely sure there is no other way to do what I want with the datareport designer.

Thanks.
0
 
anvCommented:
>>could set each detail section as visible or not depending on the selection

yes u can using foloowing code syntax

Me.Sections(3).Visible = False  'Where Section Collection Starts with base 1...3 here is the detailed section..

as far as i know u can have only one detailed wection in Data Reports..

but in Crystal Reports yes u can have as many Details sections u want..

u can try the Evaluation of Crystal Reports available on the internet..
0
 
anvCommented:
check this link ... if u want to use crystal reports..

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_20405257.html
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now