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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro that prints multiple reports.

Status
Not open for further replies.

obiwaugh

Instructor
Dec 17, 2004
21
US
The following global macro should, in theory, open and print 2 reports in succession. For some reason, ReportSmith prints the first one twice...as if it doesn't clear it from memory. Any ideas?

Sub WEEKLY()
Dim DB as DataSet
DB.Connect 7,"mnwo","USER10","passwd","mnwo"
LoadReport "I:\Shared\PERSONAL_DATA.rpt",""
PrintReport 1,1,"","",""
CloseReport 1
LoadReport "I:\Shared\JOB_DATA.rpt",""
PrintReport 1,1,"","",""
CloseReport 1
CloseRS 1
End Sub
 
This is a snip from my macro that prints several reports.

Rem Check to see if my report is active and close
MakeActive(ReportName$)
CloseReport 0
DoEvents

Hope this helps

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top