Results 1 to 2 of 2

Thread: Crystal export problem - PDF is not the same in editor as PDF

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2004
    Location
    South Africa
    Posts
    26

    Crystal export problem - PDF is not the same in editor as PDF

    Hi

    I am having a problem when i export my crystal report to PDF. In the report editor it shows properly, previews on 1 page and even exports on 1 page.

    However when i export the report to PDF using my vb.net 2005 application, the pdf has 2 pages.

    Below is the code im using to export the report, can anyone point me in the right direction?

    Code:
    Dim rptEmptyReport As New rptEmpty
    rptEmptyReport.Refresh()
    rptEmptyReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat,c:\test.pdf")

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Crystal export problem - PDF is not the same in editor as PDF

    Try this

    Code:
       Dim rptEmptyReport As New rptEmpty
                Dim rptDiskFileOptions As New DiskFileDestinationOptions()
                Dim strFilePath As String
                strFilePath = Server.MapPath("Test.pdf")
     
    
               rptEmptyReport.SetDataSource(dsSource) 'Set your datasource
    
                rptDiskFileOptions.DiskFileName = strFilePath
                rptEmptyReport.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
                rptEmptyReport.ExportOptions.DestinationOptions = rptDiskFileOptions
                rptEmptyReport.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
                rptEmptyReport.Export()
    
                Response.Redirect("Test.pdf")
    __________________
    Rate the posts that helped you

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