Solved

Merge multiple reports into a single report with VB 6.0 DataReport

Posted on 2004-10-08
4
286 Views
Last Modified: 2007-12-19
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
Comment
Question by:dcprog
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
anv earned 250 total points
ID: 12265364
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
 

Author Comment

by:dcprog
ID: 12267552
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
 
LVL 10

Expert Comment

by:anv
ID: 12273871
>>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
 
LVL 10

Expert Comment

by:anv
ID: 12275267
check this link ... if u want to use crystal reports..

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

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question