Solved

Merge multiple reports into a single report with VB 6.0 DataReport

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

910 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

19 Experts available now in Live!

Get 1:1 Help Now