This chapter describes an overview of each phase of the report development process:
To create a new report, use the Report Wizard. Reports can also be built piece-by-piece instead of by using the wizard, or a report can be created based on an existing report.
For more information, see Creating a report.
You can arrange the layout as required. Or you can use the Report Inspector to modify the report objects created by the Report Wizard. Properties and values of all objects in a report are displayed in a property sheet for you to view and change interactively. The properties for different objects in Report Inspector will be displayed dynamically. See Properties in the Report Inspector for details about each object's properties. In addition, many properties can be controlled dynamically by using a formula. See Using formulas to control object properties for more information.
While developing your report, you can test it any time to preview the result. For more information, see Previewing a report.
JReport Designer can export report results to various formats such as Text, HTML, PDF, PostScript File, Mail, Applet, Excel File and Fax. To export the report, use File > Export To.
See Exporting report results for more information.
When your report is ready to be published, you will need access to the JReport Enterprise Server in the runtime environment. If the JReport Enterprise Server is accessible from the host on which JReport Designer is running, you can publish from JReport Designer. Otherwise, you will need to copy the catalog and report template to the host on which the JReport Enterprise Server is running and perform the publishing process from the JReport Enterprise Server.
See Publishing Resources for more information about publishing reports from JReport Designer.
This chapter also describes an overview of using the JReport APIs to develop a report in the following topic:
As described above, a report is developed and tested with JReport Designer, saved as a .cls file, and then published to an instance of JReport Enterprise Server. The process can also be achieved from within a Java application by using the Designer API, JReport Engine Bean, and JReport Result Viewer Bean as follows:
|
By creating a Designer instance in your Java program, you can modify an existing report or create a report (based on the existing catalog and query) with the methods provided by Designer API.
import jet.bean.*;
import java.awt.*;
import java.awt.event.*;
Then, we will create an instance. To report with JReport Engine Bean, you should create an instance of it first. The constructor of JReport Engine Bean has no parameter. After the object is created, set the report home, report file, catalog file, result file (if necessary), parameter values (if necessary). After runReport(), call the export or print methods for exporting report result file to multiple output.
|
import jet.bean.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
Then, we will create an instance. To run with JReport Result Viewer Bean, you should create an instance of it first. The constructor of JReport Result Viewer Bean has no parameter. After the object is created, set the report name, set temp path (if not set then the current path will be the default). After runReport(), call the export or print methods for exporting report result file to multiple output. The important thing is that the report name here is the report result generated by JReport Engine. In other words, the report result file is generated by JReport Designer, JReport Engine Bean or JReport Enterprise Server.
|