ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1733
Number of posts: 3304

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Anyway to export report to PDF format for A3 size paper? Posted by insearchof on 20 May 2004 at 5:40 PM
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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.