Results 1 to 3 of 3

Thread: How to Export Each page of report to seperate pdf files in Crystal Reports XI

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    How to Export Each page of report to seperate pdf files in Crystal Reports XI

    Hi Guys,

    I have a school report listing pupils marks for an entire grade. I have each pupils report on a separate page. However, when I export, I am only able to export to a single pdf file.

    How can I export each page as a seperate pdf file?? is it possible?

  2. #2
    Hyperactive Member boku's Avatar
    Join Date
    Dec 2004
    Posts
    386

    Re: How to Export Each page of report to seperate pdf files in Crystal Reports XI

    Unfortunately this is a common problem, you can export them all one at a time, which takes time, or what you can do instead is use a pdf splitter. What we use at work is this hxxp://www.pdf-explode.com/ it works great!
    -BoKu-

  3. #3
    New Member
    Join Date
    Dec 2011
    Posts
    1

    Re: How to Export Each page of report to seperate pdf files in Crystal Reports XI

    • 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

    Please let me know the result.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width