Report Definition form
|
|
Settings on this tab determine the basic content and layout of the report. Complete the Columns To Include section at the top of the tab to define the columns to include, and how to format and display their values, and the Rows To Include section to describe which class instances or records to include.
This tab can become wide if you include many columns on your report, since columns are displayed horizontally. To display more of the content, use the slider control on the border between the navigation and the work area to temporarily hide the navigation panel. When you finish working with this tab, user the slider control to display the navigation panel again.
This section defines the columns in the report. They appear in the report in the same order that they appear on this tab. To change the column display order, click and hold the small circle at the top of the column, and drag the column to the left or right until it is where it should be. Then release the mouse button.
At the top right of this tab is a Save & Preview button. Click to save the rule and preview the report it creates. This provides a quick way to evaluate changes you make to the columns and rows in the report.
For each column in the report, the following fields are available:
Field |
Description |
Column Name |
Choose a Instead of an existing single value, you can use the Calculation Builder to select a function template and provide database columns for it to operate on. The column in the report then displays the result of the SQL function. PRPC includes an extensive set of SQL functions: see Atlas — Standard SQL function rules. If none of them exactly satisfy application requirements, you can create a custom SQL function template that can be selected in the Calculation Builder: see About Function Alias rules. To start the Calculation Builder, click the Calculation Builder icon ( ) to the right of the column for which you want to display the results of a SQL function. See Calculation Builder. If your application has declare index rules, you can choose one as the property for a column. Type part of the declare index name, then click the down-arrow. The rule appears as one of the "Best Bets":
Do not enter a linked property reference. You can't display properties accessed through linked properties in report definitions. If you enter the name of property that has not been optimized, your system may experience a performance slowdown when running the report. You may want to use unoptimized properties while working out the report's structure and contents, but it's a good practice to make sure all properties are optimized before moving the code to a production system. See How to expose a property as a database column. In many situations you can use a linked property to populate a column (or the right side of a filter condition; see below). So, if you were building a report on unresolved work items, you could include a column with the access group of the creator of the work item by using this linked property: .pxCreateOperator.pyAccessGroup. |
Column Heading |
Enter a column heading to be used for this column on the report. By default, the label defined for the selected property will appear as the Column Heading for the column. This field is required for most columns, but is not required when the Summary Function field has a value. |
Column Width |
Optional. Enter the desired column width for the column as a percentage of the window's width or in pixels. Enter an integer in the first field and, in the second field, select either |
Summary Function |
Choose one of the built-in functions |
Format Values |
Optional. Select a control to use in formatting the values for the column. Leave blank to use the control associated with the property. |
Sort Type |
Optional. For each sorted column, choose one of the following:
|
Sort Order |
Optional. If you are sorting the values for more than one column on the report, enter a unique value for each sorted column as an integer between 1 and the number of sorted columns. |
Display Values Across Columns |
Optional. If this option is checked, values for the column will be displayed horizontally. Each value for the column will appear as a column on the report. Displaying one or more columns horizontally lets you create cross-tab and pivot table reports. |
Hide |
Optional. If this option is checked, this column is not displayed on the report. This option lets you, for example, sort rows on a report based on a column that is not displayed. |
At the bottom of this section is the Categorize By checkbox. Check this to group report data by one or more of the columns which have numbers in their Sort Order fields. When you check this option, a line of text and a number entry field appear to its right: "Display values in columns 1 - [1] as group headings." This allows you to select as many columns having sort order numbers as you wish. Your selection must be something like 1- [3], not 1 - [2, 4]; that is, the selection must start with the first sort-order column and continue without skipping any sort-order column numbers.
The result of using this feature is that report data displays categorized by the specified columns' values, and the column names appear as the heading for each category.
This section defines filter conditions, tests which determine which rows qualify to appear in the report display. If you leave this section empty, the report selects all instances of the Applies To class (or instances or records of whatever sources are indicated on the Data Access tab) up to the limit in the Maximum Number of Rows to Retrieve field on the Data Access tab.
There are three controls at the top of the section:
Control | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Remove Duplicate Rows | When this option is selected, the report discards rows that have duplicate values for the columns selected for the report. This action does not modify the stored data. | ||||||||
Filter By Application Context |
For Report Definition rules that are saved into Rule- or a class derived from Rule-, you can opt to restrict report coverage to a certain application context. When you check this checkbox, additional fields appear to let you set application context filters:
When using the application context filtering option, you can add and sort report results by the values in a hidden column like pyRulesetVersion. |
||||||||
Filter Caption Settings | This control lets you determine, by checking the appropriate radio button, whether the caption you set for each condition applies to the left side of the condition ("customer = 'brown'"), or to the entire condition ("customer"). |
Each row of the array in this section identifies a filter condition. The order of rows is not significant. PRPC converts information in this array to an SQL WHERE
clause when retrieving data from the database.
If you define filter conditions in this section, you must enter a logical expression in the Filter Conditions text box in the section header. Using the labels entered in the Conditions array, the logical expression defines how the system is to combine the conditions. The expression can include parentheses and the operators AND and OR. For example, if the table contains four rows labeled A, B, C, and D, you can enter an expression like (A
OR B
OR C
) AND D
in this text box. The notation is the same as for the logic statement in When condition rules.
Field |
Description |
Condition |
Enter a letter or letters that uniquely identifies this row, to reference this row in the Logic field. These can be as simple as The Logic value must mention the condition label for each Condition in this section. |
Caption |
Provide a caption to identify the filter condition in the Filters list that displays above the data when the report runs. Depending on which radio button you selected in the Filter Caption Settings control above the conditions list, the caption you set for each condition applies to the left side of the condition (if the caption is "customer", then "customer = 'brown'"), or to the entire condition ("customer"). Captions help make readable complex sets of filter conditions. |
Column |
Enter a property reference for the conditions. The property referenced must be exposed as a database column in the Applies To class for the report value, or else be a fully qualified value to a clipboard page that is always present on the clipboard, such as the requestor page or process page.
You can specify only Note, however, that you can specify single value properties that are produced by a SQL function. To use the result of a SQL function query, click the Calculation Builder icon to the right of the field. The Calculation Builder displays, and there you can select a SQL function and specify any parameters it needs.
If the Type of this property is If you enter .pxObjClass here and the Applies To key part of this report definition is a framework class, and if the developer has checked the Report on Descendant Class Instances checkbox in the Report Definition form, at runtime the report execution can use the corresponding implementation class, not the framework class, for comparisons and report content. This feature eliminates the need to copy each framework class-based report definition into the implementation class. |
Relationship |
Select a logical operator for the comparison condition, such as |
Value |
Enter one of the following options as a comparison value:
If the Relationship field is set to IS NULL or IS NOT NULL, leave this field blank. Commas correspond to an OR test: if the Value field contains two or more entries separated by commas, the comparison is true at runtime if the value of the Column field equals (or is greater than, or is contained in, and so on) any one of the entries. When the Value field contains a When evaluating either of the two Condition values For guided assistance in completing this field, click the magnifying glass icon . A pop-up window appears with one or more of these tabs:
|
Prompt Mode |
Select a value to determine how a user of this report can modify the condition in this row when the report is run and displayed in the Report Viewer.
|
Use Null, If Empty |
This box is important only when there is no value at runtime specified in the Value field. By default, when the Value field is empty at runtime, the criterion defined by this row is ignored; processing is the same as if this row is not present. For example, assume the criteria is that the customer's last name starts with a given letter, and the value set in the Value field is param.Letter. If this report rule executes at a time when Param.Letter has the value "C", this criterion limits the report to contain only instances in which the Lastname property value starts with the letter C. However, if the same rule executes again when the Param.Letter parameter has no value, this criterion is dropped, so instances with any Lastname value (or none) are selected. In situations where this default behavior is not desirable, select the Use Null* box to force the Condition value to become |
Ignore Case |
Select to have runtime comparisons of the Field value and the Value value be case-insensitive; that is. "Smith" matches "SMITH" and also matches "sMiTH". If selected, then at runtime " Clear to cause tests of the Field value and the Value value to occur without case conversion. In this case, " In most cases, leave this box cleared. Select this box only when necessary to obtain the rows of the report:
|
For list-type reports, you can limit the number and type of rows of data the report returns. The instruction is in this format: "Display [top ranked / bottom ranked] [QUANTITY] Rows [by group?] based on [COMPARISON]". The comparison value can be a column or other exposed property, or the result of a SQL expression :
Field |
Description |
top ranked/ bottom ranked | Depending on your choice, the report will return either the rows of data that satisfy the criteria best or worst. |
quantity | The maximum number of rows |
by group? | Choose Overall to apply the maximum number to the whole report. Choose For Each Group in a group-by report to apply the maximum number to each group. |
based on | Choose from the options provided the data column that will be evaluated. Click the function icon to the right of the field to select a function to process the data in the selected column to simplify its ranking; for instance, for a column displaying numbers in text form, you might convert the values using the function [Text Value] converted to an Integer value . |
This section does not appear for summary-type reports.
Field |
Description |
Report Title |
Enter the title of the report. |
Header Display Options |
Select one of the options from the drop-down list:
Note that if you select Hide Column Headings, context (right-click) menu options for the header are not available for the report. |
Use custom section for displaying rows |
Optional. Check this option to use a custom row section to format the rows in the report this rule generates. A field appears where you can select the section; select the edit icon that appears beside the selection field to create a new custom section. If you want the user to provide values for the filters before the report runs, check the Prompt for filter changes before displaying report checkbox on the User Interactions tab. Sections used for this purpose can have simple controls such as text fields, but cannot use complex controls such as grids or trees. Note: test carefully any custom sections you use for displaying rows and headers. You may get unexpected results as the report definition tries to populate a section which, for instance, does not account for all the properties it is asked to display Note: Nested sections may not render properly when used as custom sections. PRPC cannot tell the width a custom section requires. When a window is resized, PRPC does not automatically resize the width of the custom section. Design the custom section to fit into the smallest display size possible. |
Use custom section for displaying group header |
Optional. This checkbox appears only for list-type reports (those that have no columns using a summary function), and only when the Enable Grouping checkbox at the bottom of the Columns to Include section has been selected. When this checkbox is checked, a field appears where you can specify the section to use to display group headers. Click the edit icon to the right of the field to create a new section for this purpose. Sections used for this purpose can have simple controls such as text fields, but cannot use complex controls such as grids or trees. Note: test carefully any custom sections you use for displaying rows and headers. You may get unexpected results as the report definition tries to populate a custom section which, for instance, does not account for all the columns it is asked to display |
Select this option to use a custom section to display filtering options for the report user, replacing the default filter display. The custom section can include basic controls (drop-down menu, text entry field, and so on), and the controls can only provide values for the filter functions established in the Rows To Include section, above. When the checkbox is checked, new fields appear:
To create the section, provide controls where the user can enter or select values the filter functions in this report require. |
|
Display in Report Browser |
Optional. Select have a shortcut to this report display in the Report Browser. When this checkbox is selected, a field appears where you specify the Category in which the report shortcut appears in the Report Browser. See Using the Report Browser. This checkbox operates as a one-way control:
|
Working with the Report Viewer
Working with the Chart Editor |
|
Atlas — Standard Report Definitions | |
Filter |