Instead of viewing reports in the browser using the interactive HTML-based viewer, ReCrystallize Server can export Crystal Reports directly to a file. To export a report, add the

exportfmt=

or equivalent

exttyp=

parameter to the URL or include it as a field when POSTing a form to ReCrystallize Server’s viewreport.aspx page.

The following export formats are available:

File format File extension Exportfmt value
Adobe Acrobat .pdf PDF
Comma Separated Values .csv CSV
Crystal Reports .rpt RPT
Crystal Reports protected / read only .rptr RPTR
Editable Rich Text .rtf EDITABLERTF
Excel 97-2003 .xls EXCEL
Excel 2007-2016 .xlsx EXCELWORKBOOK
Excel Data Only (without formatting) .xls EXCELDATA
Excel Data Only with Maintain Relative Object Position .xls EXCELDATAMAINTAINPOS
Microsoft Word .doc WORD
Rich Text .rtf RTF
Tab Separated Text .ttx TAB
Text .txt TEXT
XML .xml XML
HTML 4 only support6ed for saving to disk. .html HTML

For example, to export a report to PDF format the URL would be similar to

ViewReport.aspx?reportName=library.rpt&author=Shakespeare&exportfmt=PDF

The exported file will open in the browser or be saved to disk, based on the client browser configuration. To request the exported file to be treated as a download and saved to disk, include the option download parameter with a value of YES or TRUE.

ViewReport.aspx?reportName=library.rpt&author=Shakespeare&exportfmt=PDF&download=y

As with parameter values, the export format may be posted from a form rather than included in the link.

To specify a filename for downloaded files, include exportname in the request. The filename may be a literal string or may use substitutions of parameter values enclosed with asterisks. The following examples produce the same results:

ViewReport.aspx?reportName=library.rpt&author=Shakespeare&exportfmt=PDF&download=y&exportname=Shakespeare
ViewReport.aspx?reportName=library.rpt&author=Shakespeare&exportfmt=PDF&download=y&exportname=*author* 

To redirect the browser to another web address, include redirect=.

ViewReport.aspx?reportName=library.rpt&author=Shakespeare&exportfmt=PDF&download=y&redirect=http://www.recrystallize.com
Last modified: 13 November 2021

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment