RadixWare Programmer Guide/Report Designer

From RadixWiki
Jump to: navigation, search

Report Designer

The editor of the report definition looks as follows:

Report designer .jpg

The report designer contains the following pages: General, Sqml, Design, Stylesheets and Preview.


"General" Page

The page contains the following parameters:

  • Title. The report title in the languages supported by the layer (for the user-defined report designer - in the user-defined definition development languages specified in the settings of the own system).
  • Description. The description of the purpose of a report in the languages supported by the layer (for the user-defined report designer - in the user-defined definition development languages specified in the settings of the own system).
  • Change log. The report change log enables the user who created / edited the report to fill in the information on the respective revision. The Create revision command (Add-anc.png button) enables to create a revision in the change log, the Edit change log command (Edit-schema.png button) opens the change log editor. For details, refer to Report Change Log.
  • Subreport. If the flag is set, this report is not displayed in the list of report publications. Such reports can be used only as subreports in other reports.
  • Super classes. The Implements list is used to specify the interfaces which this report implements.
  • Report columns. The table is used to create a list of report columns to be output in the report generated in CSV and XLSX formats. This list of columns is also required if the mechanism of columns visibility setup is used when creating a report publication in the RadixWare Explorer. For each column, the following parameters are defined:
  • Name. The column name.
  • Property. The property to be output in the column. If the parameter is not defined, the column will associate with all cells for which it is specified in the Associated column parameter.
  • Title. The column header in a CSV / XLSX file in the languages supported by the layer (for the user-defined report designer - in the user-defined definition development languages specified in the settings of the own system). If the parameter is not defined, the column name will be used as a header.
  • CSV Export Parameters. The area contains the CSV Export Format parameter enabling to define the format template used to save the values in the current column when generating a report in CSV format. If the Use default format flag is set, the default format will be used. If the flag is not set, the parameters similar to those in the Input Mask Editor are displayed; the set of parameters depends on the data type (DateTime, Int, Num).
  • XLSX Export Parameters. The area contains the following parameters:
  • XLSX Export Format. The parameter enables to define the format template used to save the values in the current column when generating a report in XLSX format. The available values correspond to the data formats that can be applied to the cells in the XLSX file. The Preview area shows the data according to the selected format.
  • Column size. The default column width in the output file. Available values:
  • None. The standard column width.
  • By header. The column width is set automatically according to the number of characters in the column header.
  • By content. The column width is set automatically according to the maximum cell content.
  • Manual. The column width is specified in characters in the Width parameter.

Report column.jpg

The buttons to the right of the Report columns table are described below:

Button

Name

Description

add-anc.png

Add

Opens the dialog box for adding the column to the list.

remove-anc.png

Remove

Removes the selected column from the list.

move-up.png

Up

Moves the selected column one position up in the list.

move-down.png

Down

Moves the selected column one position down in the list.

Edit-schema.png

Edit

Opens the dialog box for editing the column settings.

  • Export to TXT. If the flag is set, reports of this class can be exported to TXT format. If the flag is not set, it is not possible to select and set up the TEXT mode on the Design page. The flag is not set, by default.
  • Export to XLS. If the flag is set, reports of this class can be exported to XLS format. The flag is not set, by default.
  • Export to CSV. If the flag is set, reports of this class can be exported to CSV format. A report will be exported according to the settings of the report column list (in the Report columns area) and additional settings available if the Export to CSV flag is set:
  • Delimiter. The delimiter character used to separate the fields in a row. As a rule, the characters ';' or ',' is used.
  • Export columns names. If the flag is set, the column headers defined in the Report columns area will be output in a CSV file. The flag is set, by default.
  • Row Condition. Clicking the button opens the JML editor used to define the condition for the report field output.
  • Export to XLSX. If the flag is set, reports of this class can be exported to XLSX format. A report will be exported according to the settings of the report column list (in the Report columns area) and additional settings available if the Export to XLSX flag is set:
  • Sheet Name. If the flag is set, a sheet with the report in an XLSX file will have a specific name defined in the respective field (in the supported languages). The flag is not set, by default.
  • Export column names. If the flag is set, the column headers defined in the Report columns area will be output in an XLSX file. The flag is set, by default.
  • Row Condition. Clicking the button opens the JML editor used to define the condition for the report field output.
  • Use custom view (Desktop). If the flag is set, the appearance and behavior of the dialog box for entering the report parameters in the RadixWare Desktop Explorer are completely defined by the developer in the visual editor of the View child definition. When unsetting the flag, the View definition is deleted, therefore, the user is asked to confirm the action. The flag is not available in the user-defined report designer.
  • Use custom view (Web). If the flag is set, the appearance and behavior of the dialog box for entering the report parameters in the RadixWare Web Explorer are completely defined by the developer in the visual editor of the WebView child definition. When unsetting the flag, the WebView definition is deleted, therefore, the user is asked to confirm the action. The flag is not available in the user-defined report designer.
  • Context parameter. The context object class used with this report. The parameter is not available in the editor of a subreport.
  • Default size of report parameter dialog box. The area is used to define the default size of the dialog box for parameter values entry for a certain execution environment:
    • For Desktop Explorer (RadixWare Explorer environment)
    • For WEB Explorer (RadixWare Web Presentation Server environment)
For each execution environment, the dialog box width and height are specified in pixels in the respective parameters.
The area is not available in the editor of a subreport.

"Sqml" Page

The page contains the SQML editor used to define the query that selects the data for the report. The query must assign the values to the fields in the report.

"Design" Page

The page is a visual report designer.

The upper pane of the report designer contains a toolbar (refer to Toolbar). On the left and upper pane of the working area, the rulers are displayed.

The left part of the report designer displays the pane with the tree to view the report design elements. To show / hide this pane, use the Open Form Tree switch button (Open tree form.jpg). Working with the tree of design elements has the following features:

  • When a certain element (one or several) is selected in the tree, it is automatically highlighted on the report form. When a certain element (one or several) is selected on the report form, the respective element is automatically highlighted in the tree.
  • The context menu items of the element in the tree are similar to the menu items in the visual designer. The cell context menu contains the Rename item used to rename the cell.
  • If the property specified in the settings of Property and Summary cells is not found, this cell is highlighted in red in the tree.

When opening the report definition editor, the Palette pane is displayed. This pane contains the buttons for the cell types which can be used in the report.

The report design can be edited in one of the following modes:

  • GRAPHICS. The mode of developing the report design in PDF format.
  • TEXT. The mode of developing the report design in TXT format. In this mode:
  • The standard monospaced font is used to display the information.
  • It is prohibited to customize fonts, background color, cell borders.
  • It is prohibited to use cells of the Image and Chart types.

The mode switch button is located on the toolbar.

The same report can be used in different modes since the text report design is automatically generated based on the existing graphic design (used for report generation in PDF format) by recalculating the number of millimeters in the number of rows and number of characters in a row. After the report is automatically transformed, make sure that the elements are arranged on the text form correctly. The report transformation is performed once when switching to the text mode for the first time.

The report representation is described by means of three main object types:

  1. The page. The topmost level.
  2. The entire working area on the page is divided into the working bands that are limited by separating lines. It is possible to change the height of working bands by dragging the separating lines. The name of the working area is displayed on the band itself. When using the data aggregation in the report, the additional bands appear. The main purpose of the band is to define when and where the objects in the band must be printed. The following table provides the possible band types in the report:

Band Type

Purpose

Page header

Contains the objects that are printed at the start of each report page. For example, the current date or the page number.

Title

It is printed only on the first page of the report. Usually, it contains the report title.

Column header

Contains the column headers of the report.

Details

Contains the column data from the database tables or their computing result.

Summary

Contains the total values of the report or the final text. The information appears one time after the main report.

Page footer

Contains the objects that are printed at the end of each report page.

<Group name> header

Contains the information used when grouping.

<Group name> summary

Contains the resulting information for the group.

3.The band contains the cells displaying the report data. The following table provides the available cell types:

Cell Type

Description

Text

Displays the text string with arbitrary content.

Property

Displays the value of the report property.

Summary

Displays the totals (the minimum, maximum or the amount) for the report property.

Special

Displays the additional information of the report: the page number, generation time, number of records in the current group, total number of records in the report.

Expression

Displays the value returned by JML code specified by the user.

Image

Displays the fixed image specified by the user. It is not used in TEXT mode.

DbImage

Displays the image received from the database. It is not used in TEXT mode.

Chart

Displays the diagram created on the basis of the report data. Refer to Charts.


"Stylesheets" Page
The page is used to manage the stylesheets intended for the report appearance. For details, refer to Configuring and Using Styles in Reports.


"Preview" Page

The page contains the settings and commands to generate a report in the report designer based on the test data without executing an SQL query to the DB. For details, refer to Previewing Reports.

Toolbar

The following table describes the toolbar buttons of the report designer:

Button

Name

Description

Open tree form.jpg

Open Form Tree

Shows / hides the tree to view the report design elements.

edit-page.png

Edit Page

Opens the dialog box of page parameters on the Page page.

edit-bands.png

Edit Bands

Opens the dialog box of page parameters on the Bands page.

edit-groups.png

Edit Groups

Opens the dialog box of page parameters on the Groups page.

grid.png

Grid Settings

Opens the dialog box with the grid settings.
Grid settings.jpg

The dialog box contains the following parameters:

  • Show grid. If the flag is set, the report edit area shows the grid.
  • Snap to grid. If the flag is set, the report objects will be snapped to the grid.
  • Grid size. The default value is 2.5.

scale.png

Scale

Sets the scale for displaying the report.

-

Language (drop-down list)

Sets the language to display the report while editing.

-

Mode(drop-down list)

Switches the report design development mode between PDF (GRAPHICS mode) and TXT (TEXT mode) formats.

vert-layout.png

Horizontal Layout

Uses the arrangement of objects in one line by default.

hor-layout.png

Vertical Layout

Uses the arrangement of objects in one column by default.

grid-layout.png

Grid Layout

Uses the arrangement of objects as a table by default.

Visibility always.jpg

Visibility

Sets the visibility mode for the selected cells. Available values:

  • Always (Visibility always.jpg). The cell is visible in any mode.
  • In Graphical Mode Only (Visibility graf.jpg). The cell is visible in the GRAPHICS mode only.
  • In Text Mode Only (Visibility txt.jpg). The cell is visible in the TEXT mode only.

cells-align.png

Align Cells

Sets the alignment (horizontal and vertical) for the selected objects.

text-halign.png

Align Text Horizontally

Sets the horizontal alignment in the selected cells.

snap_edges.jpg

Snap Edges

Snaps upper / lower edges of the selected cells to the edges of nearby cells.

adjust.jpg

Adjust Height / Width

Automatically adjusts height / width of the selected cells depending on the cell contents.

Line spacing.jpg

Line Spacing

Sets the line spacing (space between the lower border of the font and upper border of the font of the underlying line). The value can be specified in millimeters (mm) and in points (Italic textpts). When changing the value in one measurement unit, the value in the other unit will be recalculated automatically.

wrap_word.jpg

Wrap Word

Wraps text in the selected cells by word

clip_content.jpg

Clip Content

Clips text that does not fit the selected cells.

Rich text.jpg

Text Format

Sets the text formatting mode for the selected cells. Available values:

  • Rich Text (Rich text.jpg). The text in the cell is displayed with regard to the HTML tags used for formatting.
  • Plain Text. The text in the cell is displayed regardless of the HTML tags (tags are interpreted as a plain text; formatting is not applied to the text enclosed in tags).

Margins.jpg

Margins

Sets the margins for the selected cells.

cells_font.jpg

Font

Sets the font for the selected cells.

textcolor.png

Text Color

Sets the text color for the selected cells.

Bgcolor.jpg

Background Color

Sets the background color for the selected cells.

Borders.jpg

Borders

Edits the border settings for the selected cells..

Most of the buttons described in the table starting from the one used to set the cell visibility mode (except for the Line Spacing, Margins, Font, Background Color, Border buttons) have a small black triangle next to the icon. Clicking this triangle opens the menu enabling to select one of the options (clicking the buttons to select the color opens the dialog box where the required color can be selected). When clicking the icon itself, the last selected option is applied.

Report Change Log

The change log is used to store the history of changes made to the report. The change log can be edited on the following pages:

  • Main. This page contains the following parameters:
  • Last revision number. The sequence number of the last created revision.
  • Last revision updated. The date and time when the last revision was updated.
  • Last revision updated by
  • Comments
  • Local notes. These notes are not exported when exporting the report to an XML file.

Change log main1.jpg

  • Revisions. This page is used to create / set up revisions. It is recommended to create a new revision and define the following parameters each time the report is modified:
  • Revision number. The number of the current revision. The value is set automatically when creating a revision and is not editable.
  • Created by. The user who created the revision. The default value is the current OS user. The parameter is editable.
  • Created. The date and time when the revision was created. The value is set automatically and is not editable.
  • Description. The parameter is mandatory.
  • Reference document. The supporting document for the object modifications. For example, the number of the issue in the JIRA tracking system, specification, etc.
  • Application version. The version of RadixWare and other RadixWare-based software products where the revision was created. The value is set automatically and is not editable.
  • Local notes. The notes of the user who created the revision.

Change log new.jpg

Object Setup

Selecting Object or Group of Objects

To work with the cell, select it by left-clicking. The borders of the selected cell are marked by the selection handles. Several cells can be selected using one of the following options:

  • Press Shift or Control on the keyboard and click on the required cells in turn.
  • Hold down the left mouse button. Moving the mouse from left to right selects only those elements which entirely fall into the selected area (the selected area is highlighted in blue). Moving the mouse from right to left selects the elements which are inside the selected area or cross over the selection borders (the selected area is highlighted in green).

The multiple selection mode enables to select the cells on several report bands.

It is also possible to select the cells, subreports and bands at a time. If any other elements are selected in addition to cells, their position will not change when moving the cells.


Moving Objects
To move the object, select and then drag it to a new position. note.jpgIf the not selected object is dragged, it will not be moved (to prevent random moving).

Cells can be moved using one of the following options:

  • Edit the Top and Left parameters in the cell editor.
  • Move the selected cell / cells using the Up, Down, Right, Left buttons. These buttons can be used either separately (in this instance, the cell moves one grid step) or in combination with the following buttons:
  • Ctrl – cell moves double grid step
  • Shift – cell moves 5 grid steps

Changing Object Size
To change the size of a cell or a group of cells, perform the following actions:

  1. Select the cell or a group of cells.
  2. Move the mouse pointer over the cell border (for a group of cells - over the border of any cell) until the mouse pointer turns into a two-way arrow, then drag the cell border to resize the cell. In a group of cells, the size of each cell is changed proportionally.

It is also possible to resize the selected cell (not a group of cells) when setting its properties in the respective dialog box (refer to Cell Parameters). It is possible to change the band height by one of the following ways:

  • Move the mouse pointer over the border of the separating line until the mouse pointer turns into a two-way arrow, then drag the band border to another location.
  • Set up the band properties in the respective dialog box (refer to Band Parameters).

It is possible to resize the page when setting its properties in the respective dialog box (refer to Page Parameters).


Adding Objects
The objects can be added to the page:

  • From the context menu of the band selected in the visual editor or in the tree of report elements.
  • By dragging the object from the Palette pane to the required position on the page.


Deleting Objects
To delete an object from the page, select the Delete item in the object context menu or press the Delete button after the object is selected. When deleting the object, the user is asked to confirm the action.


Editing Object Parameters
To open the dialog box for editing the object (cell or band) parameters, use one of the following options:

  • Select the Edit item from the object context menu.
  • Double-click on the object selected in the visual editor or in the tree of report elements.


For the description of the dialog boxes for editing the objects, refer to:


Snapping Cell Borders
In many cases, the height of several table cells must be changed according to the highest cell in the row. To solve this task, use the snapping of the upper and lower cell borders. It is possible to snap the upper and/or the lower border of each cell. The cells with the lower borders being snapped and whose lower borders are on the same horizontal level make up the row. The cells with the upper borders being snapped and whose upper borders are on the same horizontal level make up the row too. The row height is always equal to the highest cell of the row. If it is required to make the row move down (or up) depending on the height of the above located row (in such a way that the row borders always coincide), perform the following:

  1. For the cells of the upper row, snap the lower border.
  2. For the cells of the lower row, snap the upper border.
  3. Overlap the upper border of the lower cell with the lower border of the upper cell.

Cell Parameters

"General" Page

The page contains the following parameters:

  • Name. The cell name. When creating a new cell, the name of this cell is generated automatically in the format <Cell type><First non-empty number within this type>.
Example.jpgThe report contains the cells with the Text and Text2 names. In this instance, a new text cell will be assigned the Text1 name.
The names of cells of the following types change when changing some values in the cell editor:
  • The name of the Property cell is updated when changing the property (Field parameter)
  • The name of the Summary cell is updated when changing the type (Summary type parameter) or report property the totals are calculated for (Field parameter)
  • The name of the Special cell is updated when changing the result type (Result parameter)
Cells can be renamed in the dialog box used to define the cell parameters or in the tree of design elements by selecting the required cell and pressing F2 or executing the Rename command in the context menu.
  • Associated column
  • Snap to cell
  • Prohibit changing vertical position of cell after shift

The settings specific for each cell type are described in the table below:

Cell Type

Settings

Text

The text displayed in the cells. It is defined for all languages supported by the layer.

Property

  • Field. The report field being displayed.
  • Use default format. If the flag is set, the default formatting of the property value will be used. The parameter is available for properties of the DateTime, Num, Int types. If the flag is not set, the property formatting parameters similar to those in the input mask editor are displayed (refer to Input Mask Editor). For properties of the Num type, the list of formatting parameters differs from the parameters in the input mask editor. If the Use default format flag is not set for these properties, the following settings become available:
  • Precision. If the flag is set, it is possible to specify the number of decimal places to be output after the report properties are formatted. The way the decimal places are specified depends on the position of the switch button located next to the flag:
  • If the switch button is set to Value, the number of decimal places is specified in the respective input field.
  • If the switch button is set to Property, the number of decimal places is taken from the report property. The property in which the value is stored should be selected from the drop-down list in the respective field.
  • Delimiter. The area is used to define the way the integer and fractional parts are separated. Available values:
  • Decimal delimiter. The decimal delimiter based on the user locale.
  • Monetary delimiter. The monetary delimiter based on the user locale.
  • Custom delimiter. The delimiter specified in a special field.
  • Triad delimiter type. The parameter is used to define the way the digits are separated. Available values:
  • None. No delimiter is used.
  • Use locale defaults. The triad delimiter based on the user locale.
  • Specify. The delimiter specified in the Triad delimiter parameter.
  • Set title for null value. If the flag is set, the parameters located below are used to define the text to be displayed when the value of the selected report property is null. The text is defined in all languages supported by the layer.

Summary

  • Use default format. The parameter is similar to the respective parameter of the cell of the Property type.
  • Field. The report value for which the summary will be calculated.
  • Summary type. The summary type. Available values: MIN, MAX, SUM.
  • All group. If the flag is set, the summary will be calculated for all groups. Otherwise, in the Group parameter, specify the group for which the summary will be calculated.

Special

  • Result. The value type to be displayed. Available values:
    • PageNumber. The page number. If the cell is used in a multi-file report, the value is reset at the beginning of each file.
    • GenerationTime. The report generation date and time.
    • CurrentGroupRecordCount. The record count in the current group.
    • SubItemCount. The record count in the subgroups.
    • TotalRecordCount. The total record count in the report.
    • Page Count. The number of pages in a file. It is used in a multi-file reports.
    • File Number. The file number. It is used in a multi-file reports.
    • File Count. The total number of files. It is used in a multi-file reports.
    • Total Page Number. The page number calculated starting from the first report file. It is used in a multi-file reports.
    • Total Page Count. The total number of pages in all files.
  • Use default format. The parameter is similar to the respective parameter of a cell of the Property type.

Expression

  • The JML code returning the displayed value.

Image

Displays the image which is currently selected. Clicking the Change button opens the dialog box for selecting another image.

DbImage

  • Image data property. The property containing the image data. The property must have the Blob type.
  • Image mime-type property. The property containing the description of the image MIME type. The property must have the Str type.
  • Do not resize image before embedding. If the flag is not set, when generating a report in PDF format, the image in a cell will be compressed according to the Java algorithm. If the flag is set, the image compression will be disabled. The flag is not set, by default.


"Appearance" Page

Note.jpgThe parameters marked with an asterisk (*) are not editable in the TEXT mode.
Note.jpgFor all parameters available on this page, it is possible to inherit the value from the styles using the Use value from style / Use own value command (Inherit-small.jpg/Override-small.jpg). For details, refer to Configuring and Using Styles in Reports.

The page contains the following parameters:

  • Top. The distance from the top edge of the band to the top edge of the cell in millimeters (if the GRAPHICS mode is used) or in rows (if the TEXT mode is used).
  • Left. The distance from the left edge of the band to the left edge of the cell in millimeters (if the GRAPHICS mode is used) or in rows (if the TEXT mode is used).
  • Width. The cell width in millimeters (if the GRAPHICS mode is used) or in characters in a line (if the TEXT mode is used).
  • Height. The cell height in millimeters (if the GRAPHICS mode is used) or in lines (if the TEXT mode is used).
  • *Use band background color. If the flag is set, the same background color as the one for the whole band will be used. Otherwise, the background color is selected by clicking the Background Color button.
  • *Ignore report alternative background settings. If the flag is set, the alternative background color set up for even rows will not be applied to the cell. The flag is not set, by default.
  • *Use band font. If the flag is set, the same font as the one for the whole band will be applied to the cell. Otherwise, the font is selected using the Font parameter, B and I buttons, and fields used to enter the font size. The font size can be specified in millimeters (mm) and in points (pts). When changing the value in one measurement unit, the value in the other unit will be recalculated automatically.
  • Text margins. The Top, Left, Right, Bottom parameters in this area are used to specify the text indent from the respective cell border in millimeters (if the GRAPHICS mode is used). These parameters are not editable if the TEXT mode is used.
  • Text options:
    • *Line spacing. The space between the lines in the text (space between the lower border of the font and upper border of the font of the underlying line). The value can be specified in millimeters (mm) and in points (pts). When changing the value in one measurement unit, the value in the other unit will be recalculated automatically.
    • *Wrap Word. If the flag is set, the text in the cell will be wrapped.
    • *Clip Content. If the flag is set, the text for which there is not enough space in the cell will be cut.
    • *Use band font color. If the flag is set, the same color as the one for the whole band will be applied to the text. Otherwise, the font color is selected by means of the Font Color button.
    • Text Format. The radio buttons used to set the formatting mode for the text displayed in the visual designer and in the generated report. Available values:
  • Rich Text (default value). The text in the cell is displayed with regard to the HTML tags used for formatting.
  • Plain Text. The text in the cell is displayed regardless of the HTML tags (tags are interpreted as a plain text; formatting is not applied to the text enclosed in tags).
  • Alignment. The cell content alignment parameters:
    • Adjust height. If the flag is set, the cell height will be set automatically depending on the contents.
    • Adjust width. If the flag is set, the cell width will be set automatically depending on the contents.
    • A group of buttons used to align the text in the cell vertically and horizontally.
    • Snap to top edge. If the flag is set, the top edge of the cell will be snapped to the edge of the next cell.
    • Snap to bottom edge. If the flag is set, the bottom edge of the cell will be snapped to the edge of the next cell.
Note.jpgThe state of the Snap to top edge / Snap to bottom edge flags is taken into account when generating a report only if the Snap Cells flag is set in the page settings.
  • Padding with space. The flag affects the cell content in a generated report if the number of characters in a cell is less than the specified cell width:
  • If the flag is set, the missing characters are padded with spaces.
  • If the flag is not set, no padding is used and only left alignment is available in the cell.
The flag is available in the TEXT mode only. The flag is set, by default.
Instead of these flags, the editor of a DbImage cell contains the buttons used to select the image scaling mode:
  • Scale image to cell. The image is scaled according to the cell size without maintaining the aspect ratio.
  • Crop image. The image is cropped to fit the cell.
  • Resize cell. The cell height changes according to the image size.
  • Fit image to cell. The image is scaled according to the cell size maintaining the aspect ratio.
  • *Border. The cell border parameters. This area contains the following settings to be defined for each cell border (Top, Left, Right, Bottom):
  • Flag determining whether the cell border is displayed. Use All flags.jpg button to set / unset the flags for all cell borders.
  • Selector used to define the type of the border line. Available values: solid line, two types of dashed lines.
  • Width (mm.) parameter used to specify the border line width in millimeters.
  • Color button used to select the line color.
  • Visibility. The radio buttons are used to define the cell visibility in the report depending on the report mode. Available values:
    • Always. The cell is visible in any mode.
    • In text mode only. The cell is visible in the TEXT mode only.
    • In graphical mode only. The cell is visible in the GRAPHICS mode only.


"On Adding" Page


The page is used to define the JML code executed before drawing the cell each time the report is generated. In this code, the this link indicates the cell object. Therefore, this code can change, for example, the cell background color depending on the value in it.

"Classes" Page

The page is used to define the list of classes to be used when selecting the cell appearance settings. The list is created in a special editor.

Using HTML Tags

To edit the text in the report cell, the following html tags can be used:

  • <b>. Displays text in bold font.
  • <i>. Displays text in italic font.
  • <del>. Displays text in strikethrough font.
  • <ins>. Underlines the text.
  • <font>. The font parameters. The tag contains the following attributes:
    • face. The font name.
    • size. The font size.
    • color. The font color.
    • style. This attribute allows using the following CSS properties:
      • font-size. The font size.
      • color. The text color.
      • background-color. The background color.
      • font-family. The font name.
      • vertical-align. The text vertical alignment.

The text enclosed in tag <!HTML_TEXT> is not parsed. example.jpg For example, the string "<!HTML_TEXT><b>text</b></!HTML_TEXT>" is converted to "<b>text</b>".

Band Parameters

"Group Condition" Page

The page is displayed only for the bands of the "Group" Header and "Group" Footer types. The page is used to define JML code. The records for which the defined code returns the same value will be in one group.

example.jpg

For example, if the following code is specified on page return this.someField; the records will be grouped by the someField value.


"Appearance" Page

Note.jpgThe parameters marked with an asterisk (*) are not editable in the TEXT mode.
Note.jpgFor all parameters available on this page, it is possible to inherit the value from the styles using the Use value from style / Use own value command (Inherit-small.jpg/Override-small.jpg). For details, refer to Configuring and Using Styles in Reports.

The page contains the following parameters:

  • Height. The band height in millimeters (if the GRAPHICS mode is used) or in rows (if the TEXT mode is used).
  • *Use form background color. If the flag is set, the background color used for the whole page will be applied to the band. Otherwise, the background color for the band is set using the Background Color button. The flag is set, by default.
  • *Use form font color. If the flag is set, the font color used for the whole page will be applied to the band. Otherwise, the font color for the band is set using the Font Color button. The flag is set, by default.
  • *Mark even rows with different color. If the flag is set, the alternative background color selected using the Alternative Background Color button will be applied to the cells in the even rows. The odd rows will be colored as defined in the cell settings (this color can be inherited from the band / page settings). The flag is not set, by default.
  • *Font. The band font. The font size can be specified in millimeters (mm) and in points (pts). When changing the value in one measurement unit, the value in the other unit will be recalculated automatically.
  • Borders. The band border parameters:
    • Selector used to define the line type. Available values: solid line, two types of dotted lines.
    • *Top, Left, Right, Bottom. The flags are used to define whether the cell borders are displayed (the top, left, right, bottom border respectively).
    • *Color button enables to select the band color.
    • *Width. The band width.
  • Placement. The way the band is displayed on the page is defined by the following flags:
    • Start on new page. If the flag is set, the band will be printed on a new page (a page break will be added before the band). The flag is not set, by default.
    • Last on page. If the flag is set, the band will be printed last on the page (a page break will be added after the band). The flag is not set, by default.
    • Multi page. If the flag is set, the band can be printed on several pages. The flag is not set, by default.
    • Wrap cells. If the flag is set, the cells that do not fit the current page will be wrapped. The flag is not set, by default. The parameter is editable if the Multi page flag is set.
    • Auto height. If the flag is set, the band height will be set automatically. The flag is set, by default.
    • Create virtual section. The set flag indicates that the band has a virtual section. The flag is not set, by default. For details, refer to Sections.


"On Adding" Page

The page is used to define the JML code executed before drawing the cell each time when the report is generated. In this code, the this link indicates the cell object. Therefore, this code can change, for example, the cell background color depending on the value in it.

"Classes" Page

The page is used to define the list of classes to be used when selecting the band appearance settings. The list is created in a special editor.

Page Parameters

To open the dialog box for editing the page parameters, use one of the following options:

  • Click edit-page.png on the toolbar.
  • Select the Edit item from the margin context menu.
  • Double-click the margins.


This dialog box contains the following pages: Page, Bands, Groups.


"Page" Page

Note.jpgFor all parameters available on this page, it is possible to inherit the value from the styles using the Use value from style / Use own value command (Inherit-small.jpg/Override-small.jpg). For details, refer to Configuring and Using Styles in Reports.

The page is used to define the following common page parameters:

  • Form:
    • Page size. The paper size. Available values: A3, A4, A5, <other>. The parameter is editable in the GRAPHICS mode only.
    • Orientation. The page orientation. Available values: Portrait, Landscape.
    • Size. The area contains the paper size parameters.
In the GRAPHICS mode, the parameters are editable only if the Page size parameter is set to <other>, the size is specified in millimeters.
In the TEXT mode, the parameters are always editable, the size is defined by the number of rows (the Height (rows) parameter) and the number of characters in a row (the Width (cols) parameter). The page grid is displayed according to the size defined. This grid is used to customize the height of the report bands, alignment, and the size of the report cells.
  • Margins. The parameters define the margin width in millimeters:
    • Top. Top margin.
    • Left. Left margin.
    • Right. Right margin.
    • Bottom. Bottom margin.
The margins are not editable in the TEXT mode.
  • Colors. The Background Color and Font Color buttons are used to define the background and font color respectively. The buttons are not available in the TEXT mode.
  • Snap Cells. If the flag is set, the report cells are snapped with regard to the Snap to top edge and Snap to bottom edge flags. If the flag is not set, the cells in the report are snapped with regard to their arrangement on the report form (regardless of the Snap to top edge / Snap to bottom edge flags). The flag is not set, by default.


"Bands" Page

The parameters on this page define the bands and the number of bands to be included in the report. The number of bands of each type is specified using Add-anc.png and Remove-anc.png buttons.


"Groups" Page
The page contains the parameters for the report data grouping:

  • Grouping level.
  • Repeat column headers for each group. If the flag is set, the "Column Headers" band will be displayed before each group. The flag is not set, by default.
  • Start new file at level. The flag defines whether the report is multi-file. The flag is available for editing if the grouping level is more than or equal to 1. If the flag is set, it is necessary to specify the level starting from which the report must be split into files. The flag is not set, by default.
  • Repeat group headers on new page. If the flag is set, the group header will be repeated on each new page of the report if the Details band continues. The flag is editable if the grouping level is more than or equal to 1. The flag is set, by default.
  • Create section. The flag defines whether group sections are created when grouping the data. For details, refer to Sections.


The Group bands area contains the parameters to be defined for each grouping level. The area is available if the grouping level is more than or equal to 1. Each grouping level has the following parameters:

  • Name. The group name.
  • Group header. If the flag is set, the "Group Header" band will be printed.
  • Group footer. If the flag is set, the "Group Footer" band will be printed.

The buttons which are next to the Group header and Group footer flags open the dialog boxes with the band parameters: "Group Header" and "Group Footer" respectively.

"Classes" Page

The page is used to define the list of classes to be used when selecting the page appearance settings. The list is created in a special editor.

Subreports

To each report band, it is possible to add subreports printed before and after the band.

To add a subreport to the band:

1.Perform one of the following actions:

  • Select the Add Pre Report or Add Post Report item from the band context menu to add a subreport before or after the band respectively.
  • Drag the Pre Report or Post Report button from the Palette pane to the required position on the page.

2.In the dialog box that will open, select the report to be built in and define its parameters. To delete the subreport, select the Delete item from the subreport context menu.

If the Create virtual section flag is set, it is considered that a subreport has a virtual section. The flag is not set, by default. For details, refer to Sections.

The Margins area in the dialog box used to edit the subreport contains the parameters to specify the width of the subreport margins (in millimeters):

  • Top. The width of the top margin. The default value is zero.
  • Left. The width of the left margin which is, by default, equal to the left page margin.
  • Right. The width of the right margin which is, by default, equal to the right page margin.
  • Bottom. The width of the bottom margin. The default value is zero.

The subreport margins are not editable in the TEXT mode.

Data Break Rules Using Sections

A section is a set of successive report bands and other sections grouped in order to set up the capability to break the report data across pages when generating a report in PDF format. The data break rules are described in the settings of a top-level section (see below), and are applied to all bands included in a section (as well as to the subreport bands); therefore, the Start on new page and Last on page parameters of the bands are ignored. Each section is assigned a certain nesting level. The nesting level of the top-most section is 0, the nesting levels of all sections (including the virtual and group sections) and bands included in it are 1, 2, etc. Generally, three types of sections are distinguished:

  • Common section. A section of this type combines the bands of the current report and other sections. The section settings affect the data break rules applied to the bands of this section as well as to the subreports located on these bands.
To create a common section, select several successive bands / other sections in the tree of report design elements, and select the Add Section item from the context menu.
The dialog box used to edit the section contains the following parameters:
  • Type. The section type determines the data break rules that will be applied to all nested elements of the section. The parameter is editable only for top-level sections (Level = 0). For other sections the type is inherited from the top-level section. Available values:
  • Move then break by level. If the top-level section does not completely fit the page, it will be moved to the next page; if it does not fit the page again, it will be split based on the nesting level (each subsequent nesting level will be moved to the next page if it does not fit the current one).
  • Break by level. If the top-level section does not completely fit the page, it will be split based on the nesting level.
  • Level. The nesting level starting from which a section is moved to a new page.
To delete the section, select Delete from the context menu of the section (in the tree of report design elements).
  • Virtual section. A section of this type can be created for a report band or subreport. It can be used in addition to sections of subreport bands if a band and / or subreports (including all bands of the subreports) on this band need to be taken into account as a new nesting level when breaking them across pages.
To create a virtual section, set the Create virtual section flag in the band editor (Appearance page | Placement area) or in the subreport editor. The flag is not set, by default. This flag affects the subreport band break rules as follows:
  • If the flag is set in the band editor, the virtual section will contain the current band and all bands of the subreports included in it, and the settings of the nested sections of all types included in these subreports will be ignored.
  • If the flag is set in the subreport editor, the virtual section will include all bands of this subreport, and the settings of the nested sections of all types of this subreport will be ignored.
  • If the flag is NOT set either for the band or subreport, the level of the subreport bands will be the same as the level of the band on which this subreport is placed. The settings of the sections of all types of this subreport will be taken into account.
  • Group section. If the report data is grouped, the report bands can be divided into sections at a certain grouping level. For the bands included in the group section, the state of the Create virtual section flag is ignored, and all subreports are considered to be included in the group section.
To create a group section, set the Create section flag in the dialog box used to edit the page parameters, on the Groups page. Some additional parameters of a group section will become available:
  • Start new section at level. The group nesting level from which a new section starts (the data break rules will be applied to each group instance: the group instance will be moved to a new page in accordance with the rules of the selected section type).
  • Section type. The parameter value is taken into account only if the group section is a top-level one. Available values (for details on the section types, see above):
  • Move then break by level
  • Break by level
Example.jpgLet us consider the case when a report has no other sections but has 3 grouping levels (Grouping level = 3 in the page settings), and in the group settings:
  • Create section flag is set
  • Section type = Break by level

When generating a report, the data will be split into sections and broken across pages with regard to the Start new section at level parameter. If Start new section at level = 0, all grouping levels will be included in one section and moved to the next page (if the section is not the first one on the page). The diagram below shows the way the bands are split into sections if Start new section at level = 1, 2 and 3.

Sections example.jpg

Specifics of Subreport Settings
Depending on the settings of the sections of the current report, the settings of the subreport sections may be ignored or may be not. Generally, the following options can be distinguished:
1.The subreport is located on the band which belongs to the group section - the settings of the nested subreport sections will be ignored when breaking the data across pages.
2.The Create virtual section flag is set for a subreport or band - the settings of the nested subreport sections will also be ignored when breaking the data across pages.
3.The settings mentioned in items 1 and 2 are absent, but the report contains common sections - the settings of the subreport sections will be taken into account when breaking the data across pages.

Previewing Reports

The report designer enables to preview a report when it is being developed (to test the report functionality and appearance). This involves the mechanism of generating a report based on the test data without executing an SQL query to the DB.

Preview Settings

To set up the preview capability:

1.Prepare the test data. Generally, when generating a report, several queries to the DB will be executed - one query for the main report and zero or more queries for subreports. Taking into account the information on the number of subreports, number of queries to the DB, and input parameters of the report, prepare the following files:

  • One or several XLSX files containing the values of the fields used to generate a report. The first row in the file should contain the column headers similar to the field names used in the report (for example, id, title, etc.). The columns in XLSX files can be arranged in random order, additional columns can be also present. When generating a report, the appropriate data will be automatically selected from the file.
The format of the file name is <report_id>_<execution_number>.xslx. If a report has subreports, a separate XLSX file should be additionally prepared for each subreport.
Note.jpgThe test data for properties of the Blob type should be presented as URL (for example, file:///E:/preview/image.jpg).
  • XML file corresponding to the XSD schema ReportsXsd:ParameterBindingsDocument with the values of the report input parameters.
The format of the file name is <report_id>_<execution_number>_params.xml. The file may be absent if the report has no input parameters.

The names of files with the test data contain the following variables:

  • <report_id> – report (or subreport) identifier
  • <execution_number> – sequence number of the SQL query call for the report <report_id>. The numbering starts with 0. This variable may be missing if the report is generated once. If the file <report_id>_<n-1>.xlsx is not found when attempting to generate the report <report_id> for the Nth time, the system will, first, search for and use the file <report_id>.xlsx. If this file is not found, the report generation will be completed with an error.
Note.jpgThe files with the test data should be placed to the same folder.
Example.jpgThe report being developed has the following characteristics:
  • Report identifier - rptROOT
  • Availability of a subreport with identifier - rptHEADER
  • Availability of the input parameters specifying the period the report is generated for, i.e. 2 parameters of the DateTime format.

To preview this report, prepare the following test data:

  • XLSX file with the data for the main report. The file name can be rptROOT_0.xlsx or rptROOT.xlsx.
  • XLSX files with the data for the subreport. Create a separate file for each call of the subreport. For example, rptHEADER_0.xlsx, rptHEADER_1.xlsx, rptHEADER_2.xlsx, etc.
  • XML file with the values of the input parameters. The file name can be rptROOT_0_params.xml or rptROOT_params.xml.

Example of the XML file content:

<rep:ParametersBinding xmlns:rep="http://schemas.radixware.org/reports.xsd">
 <rep:ParameterBinding ParameterId="prmYH4OLRZWXNEDRNKCAQLIPJND5A" Type="Value" Restriction="None">
   <rep:Value>
     <eas:DateTime xmlns:eas="http://schemas.radixware.org/eas.xsd">2017-11-01T12:13:22.000</eas:DateTime>
   </rep:Value>
 </rep:ParameterBinding>
 <rep:ParameterBinding ParameterId="prmXMEUC5HRXRHVTHJF2KPOGG7FQA" Type="Value" Restriction="None">
   <rep:Value>
     <eas:DateTime xmlns:eas="http://schemas.radixware.org/eas.xsd">2017-11-10T12:23:39.000</eas:DateTime>
   </rep:Value>
 </rep:ParameterBinding>
</rep:ParametersBinding>

To prepare the XML file with the input parameters, perform the following actions:

1.In the RadixWare Explorer, create a report publication for which the test data needs to be prepared.

2.In the dialog box of report publication, on the Report Parameters page, set the required values for the input parameters.

3.Execute the following query to the DB:

select PARAMBINDING from RDX_REPORTPUB where ID=<publication id>

The result of this query will contain the text in the required format with the input parameters filled.

2.Ensure the availability of a running RadixWare Server instance where report generation requests will be processed.

3.Make the required settings on the Preview page of the report designer. This page contains the following parameters:

  • AAS address. The address of the access point (in host:port format) for the AAS service that will be accessed by the report designer when generating a report. The parameter is mandatory if the report generation is started in the RadixWare Designer. If the report generation is started in the user-defined report designer, this designer will access the EAS service using the access point specified in the parameters of the selected connection.
  • AAS request timeout. The time (in seconds) allotted for the access to the AAS service. Report generation requests should be sent for processing within this time. Otherwise, the report generation will be completed with an error. The parameter is used when generating a report in the RadixWare Designer.
  • Export language. The language in which the report is generated. The value is selected from the list of languages of all software product layers. The default value is English.
  • Export region. The two-character code of the country the report is generated for. This parameter affects the date format, thousands separator, and fractional part separator. The parameter is editable if the report language is explicitly defined.
  • Export format. The format of the report file. The value is selected from the drop-down list. The list of available values depends on the export formats available for the report. The default value is PDF.
  • Test data folder. The path to the folder with the test data prepared at step 1. The parameter is mandatory.

Reports preview.jpg

Report Generation

To generate a report, use the following buttons available on the Preview page:

  • Preview (CTRL+ P). The report is generated in the specified format.
  • Compile and preview (CTRL+SHIFT+P). The report is preliminarily complied and then generated in the specified format.

These buttons are available if all mandatory parameters are defined.

After a single-file report is generated, a temporary file will open in a third-party viewer intended for files of the specified format. This file is deleted when closing the viewer. After a multi-file report is generated, a temporary directory containing the report files will open.


Setting up Report Columns Visibility

When setting up a report publication, the RadixWare Explorer enables to define the columns to be visible or hidden in the reportn. For the mechanism of report columns visibility setup to operate correctly, the following presettings need to be made when developing a report:

1.Create a list of report columns in the Report Columns table (General page). It is recommended to define the Title parameter in the column setup dialog box for the column header to be displayed correctly in the RadixWare Explorer.

2.Set up the report cells by defining the following parameters on the General page of the dialog box used to edit each cell:

  • Associated column. The report column in which the cell will be located.
  • Snap to cell. The report cell located to the left of the current one. This parameter is used to shift the columns when they are being hidden: if the parameter is not defined for any of the cells in the column, when hiding the column located on the left of this cell, the cell will not be shifted left. The cell can be bound to another cell of the same band.
Note.jpgFor the list of cells (created when filling the Snap to cell parameter) to be displayed correctly, it is necessary to specify the name for each cell (Name).
  • Prohibit changing vertical position of cell after shift. If the flag is set, when shifting the cell left (when hiding the left column), its vertical position against other cells is not changed. If the flag is not set, when being shifted, the cell is moved vertically to the position of the cell located on the left (cell specified in the Snap to cell parameter).
Note.jpgTo apply the column settings made in a user-defined report, this report needs to be compiled.


Configuring and Using Styles in Reports

The report designer supports the capability to use styles when setting up the report appearance. Styles are set up in stylesheets. Each report can contain several stylesheets. Each stylesheet consists of:

  • Classes - attributes used when checking whether a style can be applied to a certain report object.
  • Styles - objects containing the appearance settings of different report elements, such as cells, bands or pages. A style can be associated with a certain class.

Appearance of Stylesheet Editor

Stylesheets are managed (created, deleted, edited) in a special editor available on the Stylesheets page of the report designer.

Rep stylesheets.jpg

The top part of the editor contains the toolbar with the following buttons:

Button Command Function
Add-anc.png Add Stylesheet Creates a stylesheet
Remove-anc.png Remove Stylesheet Deletes a stylesheet
Rep findUsages.jpg Find Stylesheet Usages Opens the dialog box used to search for the usages of the selected stylesheet (refer to Find Usages).
Rep goToRef.jpg Go to Referenced Style This command is available for reference stylesheets only. It is used to edit the source stylesheet.
Rep copyStyleTable.jpg Copy Referenced Style to Report This command is available for reference stylesheets only. It is used to transform the stylesheet into the own one.

The left part of the editor contains the tree of stylesheet elements. The editor workspace content depends on the element selected in the tree:

  • If a stylesheet is selected, the workspace contains the stylesheet editor with the following parameters:
  • Name. The name of the stylesheet.
  • Owner. The report to which the stylesheet belongs. The parameter is available for reference stylesheets only.
  • If the Classes branch is selected, the workspace contains:
  • Add-anc.png and Remove-anc.png commands to add and delete the class.
  • Find Usages command (Rep findUsages.jpg) to search for the report objects in which the selected class is used (for details, refer to Find Usages).
  • List of classes set up in the stylesheet.
  • If the Styles branch is selected, the workspace contains:
  • Add-anc.png and Remove-anc.png commands to add and delete the style.
  • List of styles set up in the stylesheet.
  • If the style is selected (from the child branches of the Styles branch), the workspace contains the report object appearance parameters (a set of parameters depends on the style type) and their values.

Setting up Styles

Generally, report styles are set up in the following sequence:
1. Create a stylesheet. It can be either own or refer to the stylesheet of another report. The type is defined when creating a stylesheet:

  • Own (default value). The parameters of classes and styles of such stylesheet are defined in the current report. Specify the name of the own stylesheet in the Name parameter.
  • Import. The stylesheet that refers to the stylesheet of another report. The classes and styles of the reference stylesheet are set up in the owner report, however, they can be used in the current report. When creating a reference stylesheet, select the source stylesheet using the dialog box for definition selection, which contains available stylesheets.

Rep createSlyleTable.jpg

2. Create a list of classes in the stylesheet. Specify the class name in the Name parameter. This parameter is not further editable.
3. Create a list of styles in the stylesheet. Define the following parameters for each style being created:

  • Type. The style type. This parameter determines the report object whose appearance settings will be included in the style. Available values:
  • CELL. The style of this type includes the report cell appearance parameters.
  • BAND. The style of this type includes the report band appearance parameters.
  • FORM. The style of this type includes the report page appearance parameters.
  • Class. The class with which the style is associated. The value is selected from the list of classes set up in the current stylesheet. The Add-anc.png button next to the parameter value input field is used to create a new class. The created class is automatically set as the parameter value.
Note.jpgEach <style type> - <class> pair should be unique within the list of styles in the stylesheet.

4. Define the appearance parameters for each style.
5. To apply the styles to the settings of the report object (page, band, cell), create a list of classes in the settings of the respective object. These classes will be used to select the appearance. If the list of classes is not defined, the settings of the style not associated with any class (Class=<default) will be available for inheritance for the settings of the report object.
The list of classes is created on the Classes page of the report object editor.

Rep used classes.jpg

The page contains:

  • Used Classes area with the list of classes selected by the user.
  • Available Classes area with the list of classes available for selection.
  • Rep left.jpg/Rep right.jpg buttons to move the selected class between the lists. It is also possible to double-click the selected class to move it between the lists.
  • Rep upAll.jpg/Rep up.jpg/Rep down.jpg/Rep downAll.jpg buttons to sort the classes selected by the user. The sequence of classes affects the order of inheritance of the settings from the respective styles (for details on the settings inheritance, see below).
  • Inherit all attributes command (Rep inheritAll.jpg). When executing this command, the appearance settings from the styles with the classes listed in the Used Classes area will be automatically applied in the report object editor.

Using Styles in Report Elements
The appearance settings of different report objects are arranged on one page:

  • in the band / cell editor - on the Appearance page
  • in the report page editor - on the Page page.

The values from the stylesheets can be applied to the appearance settings in two ways:

  • Group. The styles are applied to all appearance settings for which it is possible to do (in accordance with the inheritance order) by executing the Inherit all attributes (Rep inheritAll.jpg) command on the Classes page of the report object editor.
  • Single. The style is applied to the selected appearance parameter by executing the Use style (Inherit-small.jpg) command next to the parameter value input field. This command is unavailable for the appearance parameter if the appropriate value is missing in the stylesheet. If the parameter value is inherited from the style, the command will change to Use own value (Override-small.jpg). This command enables to override the inherited value.

When inheriting the appearance parameter value from the style (both group and single), the appropriate value is searched for in the following sequence:
1. The system searches for the styles of the appropriate type and associated with the classes used in the report object (Classes page | Used Classes area) are searched for in the stylesheets. The styles are searched for by classes in the order in which these classes are listed in the object settings (in the Used Classes area). The first value found is assigned to the parameter and the further search stops.
2. If the appropriate styles are not found at step 1 or the appearance parameter is not defined in the styles which have been found, the values will be searched for in the styles of the appropriate type with no link to a certain class (Class = <default>). The styles of the appropriate type will be searched for in the stylesheets in the order in which these stylesheets are listed in the editor (on the Stylesheets page). The first value found is assigned to the parameter and the further search stops.

Example.jpgTwo stylesheets "A" and "B" are configured in the report; several styles and classes are set up in each stylesheet. In the Used Classes area of the cell editor, the following classes are listed:
  • "Red" from the stylesheet "А".
  • "Header" from the stylesheet "B".

In this instance, when searching for the font size, the style of the CELL type with "А.Red" class will be checked first. If the Font size parameter is not defined in this style, then the style of the CELL type with "B.Header" class will be checked. If the Font size is not defined in both styles, the styles of the CELL type with the <default> class will be checked in the order of the stylesheets.


Charts

It is possible to create charts on the basis of the report data. The chart is added to the report as a cell of the Chart type (see how to add objects to the report page in Object Setup).

Follow the steps to add the chart:

1. Select the chart type:

chart_1.jpg

The following chart types are supported:

  • Category Chart. This chart displays values in categories corresponding to the definite report data. For example, months or account types can be used as categories.
  • XY Chart. This chart displays the relationship between the variables when their values are changed. For example, the relationship between account balance and time.
  • Pie Chart. This chart displays the relationship between values corresponding to the definite information categories. For example, the relationship between the revenue and different activities.

2. Select the chart series:

chart_setup.jpg

The buttons on the left pane of the dialog box are used to define the chart series to be displayed. One chart can comprise several series. When adding the chart series, the user is offered to select how the information will be displayed. The available chart series depend on the selected chart type. The example below displays the available chart series for the Category Chart type:

chart_select.jpg

The Chart series name parameter in the dialog box specifies the chart series name. The parameters on the right pane define the information to be displayed in the series selected in the list:

  • Title. The title of chart series. It is used if the Chart series name parameter is not defined. Otherwise, the Chart series name parameter value will be used.
  • Series info - defines chart series:
    • Property. The report field according to which the chart series must be created. For example, it is possible to create a separate chart series for each year.
    • Group level. The grouping level whose data must be used. For the data grouping parameters, refer to Band Parameters. The details value (used by default) indicates that the values in the series will change with each new line of the request but not when changing the value of the group condition.

The following parameters depend on the selected chart type:

    • For Category Chart:
    • Categories - defines information categories:
      • Property. The report field according to which the information categories will be created.
      • Axis. The coordinate axes for displaying the information categories. The default value (DomainAxis) corresponds to the categories displayed along the X axis under the chart. The parameter is edited by means of a special editor (refer to "Domain Axes" Dialog Box).
    • Values. Defines the values to be displayed:
      • Property. The report field containing the values to be displayed.
      • Axis. The axis along which the data values will be displayed. The value is selected from the set of axes defined for the chart. The default value (RangeAxis) corresponds to the data values displayed along the Y axis to the left of the chart. The parameter is editable by means of a special editor.
    • Show item labels. If the flag is set, the chart will display the labels.
    • For XY Chart:
      • X Values. Defines the data corresponding to an independent variable:
        • Property. The report field containing the values of independent variable.
        • Axis. The axis used to display values of independent variable. The value is selected from the set of axes defined for the chart. The default value (DomainAxis) corresponds to the categories displayed along the X axis under the chart. The parameter is editable by means of a special editor.
      • Y Values. Defines the data corresponding to the dependent variable:
        • Property. The report field containing the values of dependent variable.
        • Axis. The axis used to display values of dependent variable. The value is selected from the set of axes defined for the chart. The default value (RangeAxis) corresponds to the data values displayed along the Y axis to the left of the chart. The parameter is edited by means of a special editor.
      • Show item labels. If the flag is set, the chart will display the item labels.
    • For Pie Chart:
      • Key property. The report field containing the values of the key parameter. For example, the source of income.
      • Value property. The report field containing the values to be displayed. For example, the income amount from the current source.
3.Set up chart appearance:

chart_appearance.jpg

The dialog box contains the following parameters:

  • Title. The chart title.
  • Display grid. The grid display settings:
    • X-Axis Grid. If the flag is set, the horizontal grid lines will be displayed.
    • Y-Axis Grid. If the flag is set, the vertical grid lines will be displayed.
  • Orientation. The chart axis orientation. Available values:
    • Horizontal. The axes of independent variables (X) are displayed vertically, the axes of dependent variables (Y) are displayed horizontally.
    • Vertical. The axes of independent variables (X) are displayed horizontally, the axes of dependent variables (Y) are displayed vertically. The default option.
  • Set Axis Space. If the flag is set, the Top, Left, Bottom, Right parameters will define the space between the cell border and the chart border, in millimeters.
  • Show Legend. If the flag is set, the legend will be displayed on the chart. The legend location is defined by the selector. Available values:
    • Bottom
    • Top
    • Left
    • Right
  • Title font. The chart title font. If the Use cell font flag is set, the defined font will be used.
  • Axis font. The font used for the captions on chart axes. If the Use cell font flag is set, the defined font will be used.
  • Legend font. The font used for the legend captions. If the Use cell font flag is set, the defined font will be used.
  • Foreground alpha. The transparency of the chart fields filled by the solid color (0 - transparent, 1 - not transparent).

"Domain Axes" Dialog Box

To set up the coordinate axes displaying the values, use a special dialog box which looks as follows:

axis_setup.jpg

The left pane of the dialog box enables to select the axes to be displayed. The parameters in the right pane are used to set up displaying of the axis selected in the list:

  • Title. The axis name. If the parameter is not defined, the axis name is the name of the property whose values are displayed on this axis.
  • Axis Location. The axis location. For the horizontal axes, the Bottom and Top options are available. For the vertical axes, the Left and Right options are available.
  • Axis Label Position. The position of the value labels on the axis. Available values:
    • Standard. The default option.
    • Up 45
    • Up 90
    • Down 45
    • Down 90
  • Auto range includes zero. If the flag is set, the axis scale will be selected in such a way that the displayed range will include zero. The parameter is displayed only for vertical axes.
  • Visible. If the flag is set, the axis will be displayed on the chart.

Example of Developing Report with Charts

Let us consider the example of developing a report with charts for the profiler log.

Input parameters:

Time from / Time to. The period to be covered in the report.

Algorithm description:

The report provides information on the duration of time sections execution for the specified period. This information is broken down by the system instances and is based on the Profiler Log table.

The data in the report is grouped by:

1.Instance ID (time sections are grouped by instances).

2.Name of a time section to calculate the total duration (the sumDurationForSection property).

Charts constructed in the report:

  • Bar Chart. The chart located on the Group Footer 1 band shows the duration of time sections for each instance. This chart appears in the report several times depending on the number of instances that fall in the period specified in the input parameters.
  • Line Chart. The chart located on the Summary band shows the duration of time sections for all instances, where instances are data series (i.e. this chart summarizes the bar charts and presents them as lines).
  • Pie Chart. The chart located on the Summary band shows the total duration of the instances.

Example:

Report ex 1.jpg

Report ex 2.jpg

Report ex 3.jpg

Report ex 4.jpg

Report ex 5.jpg

Report ex 6.jpg

Report Implementation

Note.jpgThe process of the report implementation described below involves the objects (classes, their methods and properties) already existing in the Radix layer that do not need to be additionally customized (for example, the Radix::Profiler::ProfilerLog class).

This process can be roughly divided into several steps:

1.Defining main parameters of the report

2.Configuring visual representation of the report

3.Constructing the report charts

Defining main parameters of the report

To implement a report, perform the following actions:

1.In the ADS or UDS module, create a report definition using one of the following methods:

  • In the navigation tree of the RadixWare Designer, select the module where the definition will be created and click Add.jpg on the toolbar; in the opened dialog box, at the New Object step, specify:
  • Category=SQL Classes, Object Type=Report Class - if the report is created in the ADS module
  • Category=User Definitions, Object Type=User-Defined Report Sample - if the report is created in the UDS module.
  • In the New submenu of the module context menu, select the Report Class (for the ADS module) or User-Defined Report Sample (for the UDS module) type.
When creating a report definition, specify the name for it. For example, ReportWithCharts.

2.Define the following parameters of the report definition: on the General page, specify the definition name (the Title parameter) and, optionally, its description (the Description parameter).

3.On the SQML page of the report definition editor, add the following definitions:

  • ProfilerLog table (Radix::Profiler)
  • timeFrom and timeTo parameters with the DataTime data type
  • fields corresponding to the properties of the ProfilerLog table:
  • periodEndTime with the DataTime data type
  • instanceId with the Int data type
  • sectionId with the Int data type
  • count with the Int data type
  • duration with the Int data type
  • dynamic parameters to which the following data will be written when generating the report:
  • sectionName - to calculate the name of the time section by the section ID.
  • sumDurationForSection - to calculate and show on the chart the total duration of the time section execution for the period specified in the input parameters.
  • sumDurationForInstance - to calculate and show on the pie chart the total duration of the time sections execution for the instance for the period specified in the input parameters. The calculation is performed for each instance by its ID.

Report ex sqml params.png

4.Define the dynamic parameters created at the previous step:

  • Create get() method for each parameter - select the parameter in the navigation tree of the RadixWare Designer and execute the Use Custom Getter command from the context menu.
  • In the editor of the method created, write the JML code:
  • for the sectionName parameter:
String s=sectionId;
int index=sectionId.indexOf(":");
if(index!=-1){
   s=sectionId.substring(0,index);
}
return Radix::Profiler::TimingSection.getForValue(s).Title;
  • for the sumDurationForSection parameter:
return
Int.valueOf(getCellsSumValue(EReportSummaryCellType.SUM,idof[ReportWithCharts.
Version #1 (242):duration],1).toString()); //where getCellsSumValue() is the standard method of
the Radix::Types::Report class
  • for the sumDurationForInstance parameter:
return
Int.valueOf(getCellsSumValue(EReportSummaryCellType.SUM,idof[ReportWithCharts.
Version #1 (242):duration],2).toString()); //where getCellsSumValue() is the standard method of
the Radix::Types::Report class

5.In the SQML editor (the SQML page of the report definition editor), write the code for the request describing the conditions for data selection from the database:

Select ProfilerLog.instanceId This.instanceId,
      ProfilerLog.sectionId This.sectionId,
      ProfilerLog.periodEndTime This.periodEndTime,
      ProfilerLog.duration This.duration,
      ProfilerLog.count This.count 
From   ProfilerLog
Where  This.periodEndTime>=:timeFrom and This.periodEndTime<=:timeTo
order by  ProfilerLog.instanceId, ProfilerLog.sectionId
Working in the visual report designer

To generate the report in PDF format correctly, make the following settings on the Design page of the report designer:

1.Configure the data grouping in the report. For this purpose, in the dialog box used to edit the page parameters:

  • On the Bands page, set the respective flags for the bands to be used in the report. In this example, these bands are Title and Summary.
  • On the Groups page, define the data grouping parameters as follows:
  • Grouping level=2
  • Group 1 area (this area is used to configure grouping of data related to the duration of the time sections within a system instance): use the Group Header and Group Footer bands; in the settings of these bands (the Group Condition page), write the JML code according to which the records will be grouped by the instance ID:

Report ex groups.png

  • Group 2 area (this area is used to configure grouping of data related to the duration of a certain time section): use the Group Footer band; in the settings of this band (the Group Condition page), write the JML code according to which the records will be grouped by the time section name:

Report ex groups2.png

2.To the Title band, add a cell of the Text type with the report name.

3.To the 'Group 1' Header band, add:

  • a cell of the Text type and, in this cell, specify the caption for the instance ID to be displayed, for example, "Instance:".
  • a cell of the Property type that will display the instance ID. In the cell editor, set the Field parameter to instanceId.

4.To the 'Group 2' Footer band, add:

  • a cell of the Property type that will display the time section name. In the cell editor, set the Field parameter to sectionName.
  • a cell of the Summary type that will display the total duration of the time section execution. In the cell editor, define the parameter as shown on the screenshot:

Report ex sectionDuration.png

5.To the 'Group 1' Footer band, add:

  • a chart displaying the duration of the time sections of a certain instance. For details on how to construct charts, see below.
  • a cell of the Text type and, in this cell, specify the caption for the time section duration characteristic to be displayed, for example, "Total duration of instance sections:".
  • a cell of the Summary type that will display the total duration of the time sections for a certain instance. In the cell editor, define the parameter as shown on the screenshot:

Report ex instanceDuration.png

6.To the Summary band, add the summary charts. For details on how to construct charts, see below.

The screenshot below provides the example of how the report bands and cells are arranged in the visual report designer:

Report ex design.png

Constructing charts

1.Configuring the time section duration chart for an instance. This chart of the Category Chart type has one set of data of the Bar type with the following characteristics:

Report ex Chart1.png

The screenshot below presents the dialog box used to set up the coordinate axes where the data categories will be shown (the Axis parameter in the Categories area):

Report ex Chart1Axis1.png

The screenshot below presents the dialog box used to set up the axis where the data values will be shown (the Axis parameter in the Values area):

Report ex Chart1Axis2.png

In the editor of the created chart (the Chart Appearance page), specify the chart name (for example, "Duration of Time Sections Execution for Instance") and define other parameters of the chart appearance.

2.Configuring the time section duration chart for the system instances. This chart of the Category Chart type has one set of data of the Line type with the following characteristics:

Report ex Chart2.png

The settings of the coordinate axes are similar to the respective settings of chart 1.
In the editor of the created chart (the Chart Appearance page), specify the chart name (for example, "Duration of Time Sections Execution for Instances") and define other parameters of the chart appearance.

3.Configuring the time section duration percentage chart for the system instances. This chart of the Pie Chart type has one set of data of the Pie 3D type with the following characteristics:

Report ex Chart3.png

In the editor of the created chart (the Chart Appearance page), specify the chart name (for example, "Percentage of Time Sections Duration for Instances") and define other parameters of the chart appearance.