Solved

Merge multiple reports into a single report with VB 6.0 DataReport

Posted on 2004-10-08
4
278 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now