here is how to choose the filter of a report to use "black" since there are many colors of wrenches, and would like each color run with the same report separately and saved to a pdf.
Sub Main()
Dim objImpApp as Object
Dim objImpRep as Object
Dim objPublishPDF as Object
Dim FinalFilePathName as String
'*************************
Set objImpApp = CreateObject("Impromptu.Application"
objImpApp.Visible True
objImpApp.OpenCatalog "\\ServerName\SN1\Rpts\catalogs\HDW.cat","creator",,"dbase","password"
Set objImpRep = objImpapp.OpenReport("\\ServerName\SN1\Rpts\pdfs\Wrenches.imr","black"
objImpRep.Retrieveall
Set objPublishPDF = objImpRep.PublishPDF
objPublishPDF.Publish("\\ServerName\SN1\Rpts\PDF\Hardware\black\Wrenches_black.pdf"
objImpRep.CloseReport
Set objImpRep = objImpapp.OpenReport("\\ServerName\SN1\Rpts\pdfs\Wrenches_QTR.imr","black"
objImpRep.Retrieveall
Set objPublishPDF = objImpRep.PublishPDF
objPublishPDF.Publish("\\ServerName\SN1\Rpts\PDF\Hardware\black\Wrenches_black_QTR.pdf"
objImpRep.CloseReport
objImpApp.Quit
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub
---------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.