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