locked
Exporting Crystal report individual pages to separate Jpeg Image files RRS feed

  • Question

  • User1406973109 posted

    Hi all, i'm stuck, and i need help. Please i inserted images in my crystal report page and i have text inclusive, i want to export each individual page as a single image file, so that i can number the images, such as eg. Images1 etc. please how can i do this? i tried using html as my export, it came out well, but how can i now separate each invidual record into individual images.

     

    Please any help will be appreciated.

    Thanks

     

    Timotech

    Thursday, November 24, 2011 7:27 AM

Answers

  • User1406973109 posted

    Well, after a lot of research, i came to a conclusion that the best and easiest way is to use an image printer, just write code to print using the image printer, i.e to print to jpeg, that did the trick. There are so many free image printers on the net, and this makes everything easier to do, going pdf was a long way, but this method does not need exporting to pdf and saving as jpeg, but directly from your crystal report you can print to jpeg. wonderful, thanks to the internet.

     

    Timotech

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 30, 2011 6:32 AM

All replies

  • User1406973109 posted

    Well, after a lot of research, i came to a conclusion that the best and easiest way is to use an image printer, just write code to print using the image printer, i.e to print to jpeg, that did the trick. There are so many free image printers on the net, and this makes everything easier to do, going pdf was a long way, but this method does not need exporting to pdf and saving as jpeg, but directly from your crystal report you can print to jpeg. wonderful, thanks to the internet.

     

    Timotech

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 30, 2011 6:32 AM
  • User-544728592 posted

    Please refer to the following 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.

    Friday, December 16, 2011 1:30 AM
  • User1406973109 posted

    Thanks Johnson, but how would you link the pdf files to JPeg creation?

    Friday, December 16, 2011 5:50 AM