Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Export to PDF a range of pages only
Message
 
To
04/05/2004 22:27:07
General information
Forum:
ASP.NET
Category:
Reporting
Miscellaneous
Thread ID:
00900590
Message ID:
00901118
Views:
27
I don't want to export my report programmatically. It is the users that are viewing the reports that want to export only a range of pages (much like you can print only a particular range of pages).

>Eric,
>
>I'm not too familiar with Crystal Reports, but I recently had to get a report into PDF format and I discovered that CR could do that. You mentioned that you are asked for a filename, so I assume you're printing the report to the PDF printer driver. The CR Report object has an .Export() function that can be used to export the report to several different formats, including PDF. Here's the code I used to export my CR report to a PDF. I didn't limit the pages printed, but if you're more familiar with CR than I am, maybe you know how or can figure out how to limit the pages through the Report object. In the code, crpMoveOutDisposition is my CR Report. I'm not sure if this will be of help to you, or maybe just spark some new thoughts/ideas. Let me know if you figure it out.
>
> Private Sub ExportReportToPDF()
> Dim rpdMoveOutDisposition As CrystalDecisions.CrystalReports.Engine.ReportDocument
> rpdMoveOutDisposition = New crpMoveOutDisposition
> rpdMoveOutDisposition.SetDataSource(dsTRO)
>
> Dim fdo As New CrystalDecisions.Shared.DiskFileDestinationOptions
> fdo.DiskFileName = String.Format("{0}{1}\{2}.pdf", _
> m_RootPath, m_PropertyFolder, IO.Path.GetFileNameWithoutExtension(m_MODFile))
> With rpdMoveOutDisposition.ExportOptions
> .DestinationOptions = fdo
> .ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
> .ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
> End With
> rpdMoveOutDisposition.Export()
> End Sub
>
>-----
>Lee Perkins
>
>>Hi
>>
>>In Crystal Reports that comes with VS.Net 2003, how can I export a range of pages to a PDF document? When I click the export button, I am asked the filename and it is save. I have nothing to specify wanted pages.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform