BusinessObjects Board

How to open multipule reports

Hi all,

I wrote one VBA script ,when i open the report that report runs for last week and saves as pdf and bo rep format .
Now my question is after execution of 1’st report close 1’st report and open 2nd report run and close .If any one have any script can you please help me out.
I am using 6.5.1
Thanks in advance.


patriot3029 :india: (BOB member since 2006-12-08)

Put your “controlling” code in one .rep file, that you do not close. Have that “controlling code” open, refresh, save, and close each “real” report.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Dwayne Thanks for reply,

Here is the VBA script which i am using in each report .
Please tell what i need to add to this script to close the current report and to open other report.

Private Sub Document_Open()
ThisDocument.Variables(“1. Start Date”).Value = Format(CVDate(Date - 8), “mm-dd-yyyy”, vbSunday, vbUseSystem)

Application.Interactive = False
ThisDocument.Refresh

Application.Interactive = True
Call ThisDocument.ExportAsPDF(“File path” & Format(Date, “mmddyyyy”))
Call ThisDocument.SaveAs(“file path.rep”)
End Sub

Thanks in advance


patriot3029 :india: (BOB member since 2006-12-08)

Well, just use the .Open and .Close methods. Do you have a specific list of reports you want to open? Or maybe it’s just all the reports in a given subdirectory? Depending on the answer, the “wrapper” approach might be different.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks for reply Dwaye.

I have 6 reports in 1 folder when i open 1st report it will run automatically and saves in folder after this i want to close the report1 and open report2 .
After execution of report 2 close report 2 and open report3…

Thanks in advance


patriot3029 :india: (BOB member since 2006-12-08)

Take a look at the code in this utility. It has a different purpose, but does use the “cycle through a directory, open, do something, close” technique.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Dwayne,

Thanks for help it is working.


patriot3029 :india: (BOB member since 2006-12-08)