Quantcast
Channel: SCN : Document List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 52

Create a separate pdf file for each person in report

$
0
0

I need to be able to have a crystal report(2011), create a pdf file for each participant number displayed on a report.

the report would page break on each participant number.

I've seen some VB.net code that claims it can do this.  But, I was wondering if this could be done

within the report itself.   Without, having to create a separate program to call the report.

 

here's what someone provided me

 

·Please refer to the following VB.Net code for exporting to seperate pdf files.

·Dim rdoc As New ReportDocument

·'------------------------------------

·'Add your code to set rdoc object

·'--------------------------------------

·Dim exportOpts As ExportOptions = New ExportOptions()
Dim pdfRtfWordOpts As PdfRtfWordFormatOptions = ExportOptions.CreatePdfRtfWordFormatOptions()
Dim destinationOpts As DiskFileDestinationOptions = ExportOptions.CreateDiskFileDestinationOptions()
For li_count As Integer = 1 To pagecount
pdfRtfWordOpts.FirstPageNumber = li_count
pdfRtfWordOpts.LastPageNumber = li_count
pdfRtfWordOpts.UsePageRange = True
exportOpts.ExportFormatOptions = pdfRtfWordOpts
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat

destinationOpts.DiskFileName = "D:\report File" & li_count & ".pdf"
exportOpts.ExportDestinationOptions = destinationOpts
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
rdoc.Export(exportOpts)

Next


Viewing all articles
Browse latest Browse all 52

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>