BackPrevious Page Next PageNext

Web Reports

Creating a web report

Using dynamic resources and local parameters in a web report

Previewing a web report

Saving a web report

Opening a web report

In JReport Designer, you can create web reports and publish them to JReport Server for running in Web Report Studio. In JReport Server, end users can create 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 Web Report Studio can also be downloaded to JReport Designer for editing.

Creating a web report

The data resources that can be used to create web reports are business views.

To create a web report:

  1. Open the catalog in which you want to create the report.
  2. Click Home > New > Web Report or File > New > Web Report.
  3. A blank web report with a tabular of one cell is displayed. You can then split the tabular and insert components to the tabular cells. For details, see the corresponding topic about the specific component in the Components chapter.

When a web report is created, you can also further modify it the same as you do with a page report. For details, see Editing a Page Report.

Using dynamic resources and local parameters in a web report

When working with a web report, sometimes you may find the predefined view elements in the business view the web report uses, or the predefined parameters in the current catalog cannot meet your requirements. In this case, you can create dynamic resources (including formulas and aggregations) and local parameters and use them in the web report to get the desired data. Then when you save the web report, the dynamic resources and local parameters will be saved along with it as its resources in the .wls file. Unless you need to use a formula, aggregation or parameter in multiple web reports, it is always better to create dynamic resources and local parameters rather than catalog ones.

Dynamic resources and local parameters are web report level resources, which means they are only available to the web report for which they are created.

Creating and using dynamic formulas

To create a dynamic formula:

  1. In the Data panel of the main window, or in the Resources box of the report wizard, expand the Dynamic Resources > Formulas node, click <New Formula…>.
  2. In the displayed dialog, specify the name of the formula and click OK.
  3. In the Formula Editor, create the formula according to your requirement.
  4. By default, JReport will decide whether the formula can be used as an aggregation object, and if not the formula will be used as a detail object. You can specify to use the formula as a detail, group, or an aggregation object, by selecting the corresponding view element type from the Use As drop-down list on the toolbar.

    Whether a dynamic formula can be used as a certain type depends on the following rules:

  5. Save the formula and exit the Formula Editor.

Once a dynamic formula is created, you can then drag it from the Data panel to the desired position in the report, or add it as report field when working with the report wizard.

In the Data panel, you can make use of the shortcut menu of any existing dynamic formula to edit or delete the formula, or change the formula type as Group, Detail, or Aggregation if needed. Dynamic formulas that have been used in the web report cannot be deleted.

Notes:

Creating and using dynamic aggregations

To creating a dynamic aggregation:

  1. In the Data panel of the main window, or in the Resources box of the report wizard, expand the Dynamic Resources > Aggregations node, then click <New Aggregation…>. The New Aggregation dialog appears.

    New Aggregation dialog

  2. In the Aggregation Name text field, specify the name of the dynamic aggregation.
  3. Click Choose button next to the Mapping Name text field to specify the field on which the dynamic aggregation is based.

    You can map dynamic aggregations to the available resources such as group objects and detail objects in the current business view, or the dynamic formulas that have been created in a web report.

  4. From the Aggregate Function drop-down list, specify the aggregate function.
  5. When done, click OK to create the dynamic aggregation.

Once a dynamic aggregation is created, you can then drag it from the Data panel to the desired position in the report, or add it as report field when working with the report wizard.

In the Data panel, you can make use of the shortcut menu of any existing dynamic aggregation to edit it in the Edit Aggregation dialog or delete it. Dynamic aggregations that have been used in the web report cannot be deleted.

Creating and using local parameters

  1. In the Data panel of the main window, click <New Parameter…> in the Local Parameters node.
  2. In the New Parameter dialog, create the parameter according to your requirement.
  3. Click OK to create the parameter and exist the dialog.

Once a local parameter is created, you can then use it to dynamically filter data of a data component in the web report, add it to a parameter control or parameter form control in the web report when it is used in the web report, or reference it in a dynamic record level pass one formula used in the web report.

In the Data panel, you can also make use of the shortcut menu of any existing local parameter to edit or delete it. Local parameters that have been used in the web report cannot be deleted.

Previewing a web report

To preview a web report in JReport format, just click the View tab, which then causes the JReport Engine to run the web report.

JReport also allows you to preview your web report in the following formats: Web Report Result, HTML, PDF, Excel, Text, RTF, XML and PostScript. To do this, click View > Preview As and select a format from the drop-down menu. If Web Report Result is selected, the web report will be opened in Web Report Studio. When any of the other formats is selected, the report will be exported to a temporary file which will automatically be opened in the format with the appropriate application. The temporary file will be removed when you exit JReport Designer. If you want the file to be saved so that you can review it at any time, use the Export feature instead.

When previewing a web report,

Notes:

Saving a web report

To save a web report, click Home > Save or File > Save. 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:

  1. Click File > Save As. The Save Report As dialog appears.

    Save Report As dialog

  2. Type a new file name in the Report Name field.
  3. The web report file type Web Report (*.wls) is the only default value in the Report of Type drop-down list.
  4. Click Save to save the web report with the new name.

To save a web report to a different catalog, refer to Saving a Page Report to a Different Catalog.

Opening a web report

  1. Click Home > Open or File > Open. The Open Report dialog appears.

    Open Report dialog

  2. Browse to find the catalog that contains the web report you want to open.
  3. In the Reports tab, select Web Report (*.wls) from the Report of Type drop-down list.
  4. All the web reports in the current catalog will be displayed. Select the desired web reports.

    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.

  5. Click Open to open the web reports that you specified.

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.

BackPrevious Page Next PageNext