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

Important BO question- changing SQL

Status
Not open for further replies.

mortac8

Programmer
Jun 7, 2001
12
0
0
US
Here at my company, we have to report product data for many different products: ProdA, ProdB, ProdC.
Is it possible to have ONE .rep file with a script that will handle each product?

***For example, I want one file to do this***
-Refresh report (Select * From Table Where ProdId="ProdA")
-Save as PDF (ProdA.pdf)

-Refresh report (Select * From Table Where ProdId="ProdB")
-Save as PDF (ProdB.pdf)

-Refresh report (Select * From Table Where ProdId="ProdC")
-Save as PDF (ProdB.pdf)

Is this possible to do using VB scripting? How do I change the SQL each time using the script?
Any help is greatly appreciated, thank you.
 
You can achieve this by placing multiple queries in one document.(create a new report tab for each Product). The down side is that, you will end up with one pdf file with multiple sections instead of 3 pdf files.
 
Have a look at thread393-88021 (VBA in BOB) there is a v4 example of how to do this. v5 will automatically convert this to VBA with no problems.

You will have to change the html export to "Call myDoc.SaveAs(HtmlFile + ".pdf")"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top