JReport provides the web reporting solution which is aimed at easier and faster report creation and design, faster report execution, easier customization, and better presentation style using a newer Rich Internet Application (RIA) Web 2.0 interface. A web report contains only one report and uses .wls as the file suffix.
The data sources that can be used to create web reports are business views that are resources built on top of queries. In JReport Designer, you can create web reports based on business views, and publish them to JReport Server. JReport Designer supports opening, creating, and editing of web reports.
In JReport Server, end users can create web reports via the Web Report Wizard using a browser and open and edit web reports via Web Report Studio (for details, see the Web Report Studio chapter in the JReport Server User's Guide). Web reports created in JReport Server can also be downloaded to JReport Designer for editing.
Pick a task from the following:
Notes:
Components are the objects that you can place in a report. JReport provides a full set of components that allow you to present and control the report data and presentation in a wide variety of ways.
Web reports support the following report components:
You can insert all special fields into web reports in JReport Designer. However, due to the characteristics of Web Report Studio, only these can be rendered and edited in Web Report Studio: User Name, Modified Date, Modified Time, Fetch Date, Fetch Time, Print Date, and Print Time.
To create a web report:
When working with a web report, sometimes you may find that the view elements that have been predefined in the business view the web report uses cannot meet your requirements, in which case, you can create some dynamic resources and use them in the report to get the desired data. Then when you save the web report, the dynamic resources will be saved along with it as its resources.
Dynamic resources are report level resources, which means they are only available to the report for which they are created.
Dynamic resources that can be used in web reports include formulas and aggregations.
To create a dynamic formula:
Once a dynamic formula has been created, you can then drag it from the Resource View panel to the desired position in the report as a detail object, or use it when working with the report wizard.
Also, if you want to further edit an existing dynamic formula or remove any formula that is not required, right-click the formula in the Resource View panel and then select the corresponding command on the shortcut menu.
Notes:
"~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "+", "=", "{", "}", "[", "]", "|", "\\", ":", ";", "\", " ' ", "<", ",", ">", ".", "?", "/"
Examples:
You can also create dynamic aggregations by mapping them to the available resources such as group objects, detail objects in the current business view, and the dynamic formulas that have been created in the web report.
To create a dynamic aggregation:
Once a dynamic aggregation is created, you can then drag it from the Resource View panel to the desired position in the report to get the desired data, or use it when working with the report wizard.
Also, if you want to further edit any dynamic aggregation or delete it, right-click the aggregation in the Resource View panel and then select the corresponding command on the shortcut menu.
The Invisible property of the objects in a web report can be controlled by a formula. For details about how to use formulas to control object properties, click here.
However, for any object whose parent doesn't have a data source, for example, a label in the tabular cell of a web report, if you want to use a formula to control its Invisible property, you need to first bind a business view to the web report, then you can create formulas of Boolean type based on this business view to control the property.
To bind a data source to a web report:
After binding the data source, you can now create formulas in this business view to control the Invisible property of objects in the web report, whose parents don't have data source. To do this:
Then at runtime, whether the object is shown or hidden will be determined by the return value of the formula. A return value of true will hide the component.
The formula you created on the bound data source will be regarded as a dynamic formula in the selected business view, and you can find it in the Dynamic Resources > Formulas node of the Resource View panel. So there is another way to create formulas in the business view and use it directly when editing the Invisible property. To do this:
After a web report is built up, you can further modify it the same as you do with page report. For details, see Editing a page report.
To preview a web report, do either of the following:
The web report will then be opened in Web Report Studio. You can also click the View tab directly to preview the web report in JReport format, or select other format from the Preview As submenu to display it in that format.
In addition, if the web report is developed with National Language Support, when you preview it, you can specify the language in which you want the report to display.
Notes:
-Djreport.url.encoding=UTF-8
in the startup batch file and this setting covers URL encoding/decoding. Therefore, when you preview a web report in Web Report Studio, if the name of the report or catalog file contains non-Latin characters, you need to add -Djreport.url.encoding=UTF-8
into the startup batch file of JReport Designer as well; otherwise the preview will fail.<install_root>\server\bin.
<install_root>\server\bin
.To save a web report, click File > Save on the menu bar, or the Save button on the Standard toolbar. This operation can also be accomplished by pressing the Ctrl + S keys. If the web report to be saved is new, the Save Report As dialog will appear for you to input a name.
To save a web report with a different name in the current directory:
To save a web report to a different catalog, refer to Saving a page report to a different catalog
To open a web report:
If you want to open web reports that you have opened recently, switch to the Recent tab, and then select the web reports you want to open.
Tip: If you just want to access some recently open web reports, click File > Open Recent and then select the web reports one by one from the submenu.