You can use our APIs to customize your application
and gain more control over the presentation of your reports. These code
snippets assist you with your development goals by letting you drag and drop
code straight onto your JSP page.
The following snippets are provided:
Crystal Reports Viewer Tag
Inserts the required Crystal Reports Viewer Tag
Library code. The only parameter required by this snippet is the name of the
report file that the viewer must be bound to.
Open and View Report
Opens the report using
Crystal Reports Java API and
views it using the Viewer API. This snippet can be used in conjunction with
other code snippets such as, for example, the "Export Report to PDF" snippet.
Open Report
Opens the report and creates a ReportSource
object. Use this snippet in conjunction with one of the Viewer or Export
snippets.
View Report
Adds the required Viewer API calls to a page.
Because it requires a ReportSource object, use it in conjunction with the "Open
Report" snippet, or any other code that generates a report source variable.
View Report and Set Database Logon
Adds the required Viewer API calls and the
calls to apply the required database authentication at run time. Because it
requires a ReportSource object, use it in conjunction with the "Open Report"
snippet, or any other code that generates a report source variable.
Export Report to PDF
Adds the required code to generate a PDF file.
Because it requires a ReportSource object, use it in conjunction with the "Open
Report" snippet, or any other code that generates a report source variable.
Export Report to RTF
Adds the required code to generate an RTF file.
Because it requires a ReportSource object, use it in conjunction with the "Open
Report" snippet, or any other code that generates a report source variable.