Skip to end of metadata
Go to start of metadata

Java Reporting Component SDK Samples

#General
#Viewing
#Database
#Parameters
#Exporting/Printing
#Report Modification

General

Java_JRC_Use_CrystalImageCleaner
This Java Web sample demonstrates how to open up a report that contains saved data using the JRC 10 and use the Crystal Image Cleaner to ensure that temporary files used by the viewer are removed periodically

Viewing

Java_JRC_View_Report
This Java Web sample demonstrates how to launch a report in the zero-client DHTML viewer (CrystalReportViewer)

Java_JRC_view_report_using_tag_tag_library_basic
This Java Web sample demonstrates how to display a report using the tag library

Java_JRC_view_report_using_tag_library_advanced
This Java Web sample demonstrates how to display a report using the tag library as well as toggling some of the viewer options

Java_JRC_intercept_viewer_drilldown_event
This Java Web sample demonstrates how to intercept the drilldown event on the viewer in the JRC DHTML viewer

Java_JRC_Desktop_View_Report
This Java desktop sample application demonstrates how to view a report using the thick client viewer

Database

Java_JRC_Display_Connection_Info
This Java Server Pages (JSP) sample application displays the connection information for a report. It can be used to determine what properties need to be changed when modifying the database connection that a report is based off of.

Java_JRC_modify_datasource_on_oracle_JNDI
This Java Web sample demonstrates how to change the database location for a report based off of an oracle JNDI connection

Java_JRC_modify_Database_Location_For_Stored_Proc
This Java Web sample demonstrates how to change database location for a report based off of a stored procedure

Java_JRC_modify_command_table_with_parameter
This Java Web sample demonstrates how to change the connection properties of a command table that has parameters

Java_JRC_set_resultset_datasource
This Java Web sample demonstrates how to push a runtime Java Resultset to a report as a datasource.

Java_JRC_set_parameters_and_database_logon
This Java Web sample demonstrates how to pass values to a parameterized report and database credentials to a secure database using the Java Reporting Component (JRC)

Java_JRC_Set_POJO_Datasource
This Java Server Pages (JSP) sample application demonstrates how to push a runtime Plain Old Java Object (POJO) into a report as a Java Resultset.
NOTE: The POJO API provided (pojoSample.jar) is a sample for converting plain old java objects into a Java Resultsets.The sample POJO API for generating a Java Resultset from a POJO is provided "as is" and is not supportedby Business Objects technical support

Java_JRC_modify_datasource_location
This Java Server Pages (JSP) sample application demonstrates how to change the database that a report uses at runtime
NOTE: To help determine what connection properties need to be changed at runtime through code, create a copy of your original report and use the Crystal Reports designer to change this report to new datasource manually. Then use the jrc_display_connection_info helper sample to compare the connection information between the original report and the copy of that report pointing at the new datasource. The connection information properties from the output generated by the jrc_display_connection_info sample that are different in the report pointing at the new datasource from the original can then be set through code to help ensure that the database connection properties are changed correctly

Java_JRC_view_report_and_set_database_logon
This Java Web sample demonstrates how to set the report's database logon credentials before viewing a report.

Java_JRC_Desktop_modify_Database_Connection
This Desktop JRC sample demonstrates how to change the reporting database at run time

Java_JRC_Desktop_Set_Resultset_Datasource
This Java desktop sample application demonstrates how to set parameters on a Report before viewing it in the thick client viewer

Java_JRC_Desktop_View_Report_and_set_database_logon
This Desktop Java Web sample demonstrates demonstrates how to set a report's database logon credentials before viewing the report

Java_JRC_Desktop_display_connection_info
This desktop sample demonstrates how to obtain the connection information stored in two report files and compare them side by side. The sample writes all of the connection info properties to a static HTML file that can be viewed in a web browser.

Java_JRC_Desktop_set_pojo_datasource
This Java Desktop sample demonstrates how to push a run-time Plain Old Java Object (POJO) to a report as a Java Resultset. NOTE: The POJO API provided is a sample for converting plain old Java objects into Java Resultsets. The sample POJO API is provided "as is" and is not supported by Business Objects technical support.

Parameters

Java_JRC_set_sub_report_parameters_string_and_integer
This Java Web sample demonstrates how to pass string and integer values to a parameterized report that contains a subreport using the Java Reporting Component (JRC)

Java_JRC_set_multi_value_parameter
This Java Web sample demonstrates how to pass multiple values to a parameterized report using the Java Reporting Component (JRC)

Java_JRC_set_discrete_parameter_value
This Java Web sample demonstrates how to pass a discrete string parameter to a report using the Java Reporting Component (JRC)

Java_JRC_Pass Date Range Param
This Java Web sample demonstrates how to pass a ranged date parameter to a report

Java_JRC_view_report_and_set_report_parameters
This Java Web sample demonstrates how to pass parameters values to a report and then view the report (including subreports). The sample contains utility functions that demonstrate how to set parameter values for complex parameter types such as discrete range and multi-value range parameters.

Java_JRC_set_subreport_parameters_all_types
This Java Web sample demonstrates how to pass all types of values to a parameterized report containing a subreport using the Java Reporting Component (JRC)

Java_JRC_Desktop_View Report with Parameters
This Java desktop sample application demonstrates how to push a runtime Java Resultset to a report as a datasource using the Java Reporting Component (JRC)

Exporting/Printing

Java_JRC_Export_Report_PDF
This Java Server Pages (JSP) sample application demonstrates how to export a report to a stream (server-side exporting). The sample then demonstrates how to use the Java I/O libraries to write the exported result to the local file system or the browser. If the report is based on a secured database the database login credentials will need to be set before calling the export method below. Also, if the report has parameters, then values will need to be set for the report before export method can be called or an error will be thrown

Java_JRC_export_report_to_browser_or_disk_PDF
This Java Web sample demonstrates how to export a report to a stream (server-side exporting). The sample then demonstrates how to use the Java I/O libraries to write the exported result to the local file system or to the browser

Java_JRC_export_and_set_parameters
This Java Web sample demonstrates how to pass parameters to a report and log on to a secure database using the Java Reporting Component (JRC) before exporting the report to PDF

Java_JRC_export_and_set_db_logon_and_parameters_PDF
This Java Web sample demonstrates how to set database logon and parameters on a report and then export it to PDF

Java_JRC_export_and_set_db_logon
This Java Web sample demonstrates how to export a report using the ReportExportControl and logon to a reporting database using the JRC. The sample report jrc_export_with_logon.rpt uses a JDBC connection to the Pubs SQL Server database

Java_JRC_Export_And_Combine_PDF
This Java Web sample demonstrates how to export multiple reports to PDF and combine the PDF's. It uses the iText library to combine the PDF's. iText can be found here: http://www.lowagie.com/iText/download.html Please note that iText is not a part of the Business Objects SDK

Java_JRC_Desktop_Export_Report_to_disk_PDF
This desktop sample demonstrates how to export a report to a stream (server-side exporting) and then how to use the Java I/O libraries to write the exported output to the local file system

Java_JRC_Desktop_Print_Report
This Java desktop sample application demonstrates how to print directly to a printer using the Java Reporting Component (JRC)

Java_JRC_print_report
This Java Web sample demonstrates how to print a report directly to a printer (server-side printing)

Report Modification


  • No labels