After making changes to a report using the
ReportClientDocument class, you
may want to display the modified report at runtime to the user. Use the
getReportSource method of the
ReportClientDocument class to
pass a report source to the Java DHTML viewer.
Note: The
CrystalReportViewer class is
part of the
com.crystaldecisions.report.web.viewer
package. For details on customizing the viewer, see the
Viewers Java SDK Developer Guide.
Example:
void viewReport (ReportClientDocument rcd, HttpServletRequest request, HttpServletResponse response, ServletContext context, Writer out) throws ReportSDKExceptionBase
{
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(rcd.getReportSource());
viewer.processHttpRequest(request, response, context, out);
viewer.dispose();
}This list includes the classes used by the sample
code:
com.crystaldecisions.report.web.viewer.CrystalReportViewer
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase
java.io.Writer
javax.servlet.ServletContext
javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpServletResponse