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

accessing and saving tabs in one report with vb

Status
Not open for further replies.

Festo

Programmer
Joined
May 26, 2003
Messages
1
Location
NL
Hello,

I wrote a small vb-application wich opens BO (as an object) opens reports out an ado-recordset (sql) and refeshes the current report.

Now we've got reports with more tabs/reports. I would like to cycle through the tabs and export each report to pdf file. This is available with ExportAsPDF. However when in the cycle I'm one the second or thirds tab/report, BO saves/export every time the thirst tab....!!

Below the shortened code which handles the important things:

myBo.Documents.Open Me.Adodc1.Recordset!FileName
myBo.ActiveDocument.Refresh

For teller = 1 To myBo.ActiveDocument.Reports.Count
MsgBox "Process tab : " & teller
myBo.ActiveDocument.Reports(teller).Activate
objectname = Me.Adodc2.Recordset!PrinterName
myBo.ActiveDocument.ActiveReport.ExportAsText objectname
'myBo.ActiveDocument.ActiveReport.ExportAsPDF objectname
Next teller

myBo.ActiveDocument.Close boDontSave

Anybody who can tell me to avoid saving each time the 1st tab/report.

Tanx in advance...!!

regards from the Netherlands.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top