11/25/2024 2:37:57 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
|
|
|
|
Multiple execution of Report, blank after first execution, via vbscript
Posted: 22 Sep 10 4:36 PM
|
Hi All,
I am trying to run a Crystal report to loop through a recordset and execute for each record, exporting to PDF. I have the code blow, which executes without issue on the first loop and then produces empty PDFs on every loop after that. Is there a reset/Close that I am missing? Anybody seen this before? (This is within SLx v7.2 LAN)
for intloop = 1 to intLoopMax strAccountID = rsRead.fields(0).value & "" strAccountName = rsRead.fields(1).value & ""
Set report = Application.BasicFunctions.GetCrystalReport(ReportName)
Report.DiscardSavedData
ReportFileName = leFileOutput.Text & "\" & strAccountID & " - " & strAccountName & " – exported.pdf"
Report.RecordSelectionFormula = _ "{ACCOUNT.ACCOUNTID} = '" & _ strAccountID & "'"
Report.ExportOptions.DiskFileName = ReportFileName Report.ExportOptions.DestinationType = crEDTDiskFile Report.ExportOptions.FormatType = crEFTPortableDocFormat
Report.Export False
rsRead.movenext pbPdf.Position = intLoop
Set Report = nothing Next |
|
|
| |
| |
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|