The report engine processes report requests from
the viewers and exposes a report object model that allows developers to
interact with a report through code. The engine loads the
Crystal Reports report (.rpt)
file and gathers data from the database to instantiate either a Report Object
Model or a Report Source.
The Report Object Model
If you need to interact with reports through
code, a report object model exposes an API that represents the
Crystal Reports report (.rpt)
file. You also use the report object model to retrieve a report source for your
report, and then pass this report source to the viewers.
The ReportClientDocument Object
Model
To interact with the report through code,
Crystal Reports Java provides a
ReportClientDocument object
model. This object model encapsulates the Crystal Reports report (.rpt) file
and provides a runtime instance of the report including its data. When you are
ready to view the report, the
ReportClientDocument object has
a report source property that you can pass to the viewer for display.
Note: Although
Crystal Reports Java can modify
the
ReportClientDocument instance
at runtime, these modifications are not persisted back to the
Crystal Reports report (.rpt)
file. Only the BusinessObjects
Enterprise Report Application Server has the ability to persist runtime
modifications. An exception to this rule is the data source location.
Crystal Reports Java can modify
the data source location in a Crystal
Reports report (.rpt) file at runtime, and then persist this change
back to the report file.
The Report Source
The viewers use a report source rather than a
report object model to interact with a report. A report source enables the
viewers and the engine to communicate more efficiently during high demands for
report processing.
The
ReportClientDocument object has
a report source property that you can pass to the viewer for display.