I am able to export crystal report to pdf format for A4, now the report is changed to fit A3, anyway to do the same for export to pdf format?
code...
rpt.SetDataSource(dt)
'is this where i need to set papersize? but this doesnt work
'the report is being chopped off for A4 only
'how do i make it work so that when the report is shown, it is in A3 size
rpt.PrintOptions.PaperSize = CrystalDecisions.[Shared].PaperSize.PaperA3
Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
Dim myExportFile As String
Dim myPath As String = ConfigurationSettings.AppSettings.Item("myPath")
myExportFile = myPath & "pdf_" & Session.SessionID.ToString & ".pdf"
myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
myDiskFileDestinationOptions.DiskFileName = myExportFile
myExportOptions = rpt.ExportOptions
With myExportOptions
.DestinationOptions = myDiskFileDestinationOptions
.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
End With
rpt.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(myExportFile)
Response.Flush()
Response.Close()
System.IO.File.Delete(myExportFile)
...
the problem is i set the report papersize to A3 but when the report is generated to pdf format, it is still shown in A4 and the data is chopped off, any help? or PDF only works for A4?
- chai