Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print multiple paged report

Status
Not open for further replies.

RRAnthon

Programmer
Sep 25, 2005
24
US
Hi all, VB6 - CR9 DE.

I need to print reports with multiple pages, in this case an auditor can have numerous audits assigned to them, each with it's own auditnumber.

The following code gets the criteria the reports will be based on, in this case get all audits requested for an auditor and the auditnumber:
Code:
 Do Until mrLoadRst.EOF
    strAuditNumber = mrLoadRst("AuditNumber")
    Dim oUP As New MultipleAuditWorksheet
    oUP.MultiAuditWorkSheet strAuditNumber
            
    mrLoadRst.MoveNext
 Loop
Code:
crReport.Database.SetDataSource mrsDataSet
crReport.DiscardSavedData                  
Set frmPrintPreview.DataReport = crReport
Screen.MousePointer = vbHourglass
Load frmPrintPreview
Screen.MousePointer = vbDefault
frmPrintPreview.Show vbModal
I pass the result to a class module that prints the report, however it's obvious that I will only preview one page at a time, where/how do I get CR to only go to print preview after all the reports have been created?

Thanks a bunch.
 
You can try playing around with the ReportSourceRouter:

I used it in one of my projects to allow the user to preview several different reports at once - all in the same CRViewer.

You can check out this thread as well, that has a bit of sample code using the ReportSourceRouter: thread768-1051427

-dave
 
Thanks for the reply Dave, I'll get right on it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top