BackPrevious Page Next PageNext

Special Fields

Special fields supported by JReport

Inserting special fields in a report

Changing the display type of special fields

Binding links to special fields

Adding conditional formats to special fields

See an example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of how each component type could be used in a report. For the special field example, open <install_root>\Demo\Reports\SampleComponents\ForSpecialFields.cls.

Special fields supported by JReport

Special fields are defined by JReport and allow you to easily obtain system information and report-related data and add it to your report. The special fields are as follows:

Date-time

Lists all the datetime type special fields.

Computed

Lists all the special fields that are computed based on the report.

System

Lists all the special fields which get values from the system.

Note: You can insert all special fields into web reports and library components in JReport Designer. However, due to the characteristics of Web Report Studio and JDashboard, only these can be rendered and edited at runtime: User Name, Modified Date, Modified Time, Fetch Date, Fetch Time, Print Date, and Print Time.

Inserting special fields in a report

Special fields can be inserted in the report areas listed in Component placement.

To insert a special field into a report:

  1. Position the mouse pointer at the destination where the special field is to be inserted.
  2. Click Insert > Special Fields or Home > Insert > Special Fields, and select the required field from the drop-down menu.

Changing the display type of special fields

JReport Designer provides 13 kinds of display types: Text, Image, Barcode, Rank, Text Field, Hidden Field, Text Area, Checkbox, Radio Button, Image Button, Button, List, and Drop-down List. By changing the display type of a special field, you can map the special field to other value or image to be displayed instead.

A special field in a page report created using query resources can be displayed as one of the following general types: Text, Image, Barcode and Rank. It can also be displayed as a basic web control, including Text Field, Password, Text Area, Checkbox, Radio Button, Image Button, and Button. While the special fields in a web report or library component can only be displayed as Text.

The Display Type feature is not supported in page reports created using business views.

To edit the display type of a special field:

  1. Right-click it and click Display Type on the shortcut menu.
  2. In the Display Type dialog, select the display type you want the special field to display in.
  3. If a general display type is selected, take the same procedure as Changing the Display Type of Labels to customize the special field.

    If a basic web control type is selected, see Inserting basic web controls in a page report for details about how to make settings of the display type.

  4. Click OK to accept the changes.

Binding links to special fields

You can make the special fields in a report link with other reports, locations specified by URLs, e-mail addresses, or Blob data type fields. The links can either be simple links or conditional links. With conditional links, different targets can be loaded based on different conditions.

To bind a link to a special field, right-click it and click Link on the shortcut menu, then take the same procedure as described in Binding Links to Labels.

Adding conditional formats to special fields

You can add conditional formats to special fields in a report, then when a specified condition is fulfilled, the format defined on the condition will be applied to the field values automatically. This is very useful to highlight values that might need to be acted on by end users.

Conditional format can be applied only to the two special fields: Page Number and User Name.

To add conditional format to the special field Page Number/User Name, right-click it and select Conditional Formatting from the shortcut menu, then take the same procedure as described in Adding Conditional Formats to DBFields.

BackPrevious Page Next PageNext