|
-
Jun 18th, 2008, 03:34 PM
#1
Thread Starter
Junior Member
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")
-
Jun 18th, 2008, 03:53 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|