Skip to Content

Create a separate pdf file for each person in report

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 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


1 Comment
You must be Logged on to comment or reply to a post.
  • You created a Jive Document but posed a question. Please create a new discussion for this.

    I will be deleting this document by end of day.


    SCN Moderator