Documente Academic
Documente Profesional
Documente Cultură
User Guide
AVEVA Solutions Limited
Disclaimer
1.1 AVEVA does not warrant that the use of the AVEVA software will be uninterrupted, error-free or free from
viruses.
1.2 AVEVA shall not be liable for: loss of profits; loss of business; depletion of goodwill and/or similar losses; loss of
anticipated savings; loss of goods; loss of contract; loss of use; loss or corruption of data or information; any
special, indirect, consequential or pure economic loss, costs, damages, charges or expenses which may be
suffered by the user, including any loss suffered by the user resulting from the inaccuracy or invalidity of any data
created by the AVEVA software, irrespective of whether such losses are suffered directly or indirectly, or arise in
contract, tort (including negligence) or otherwise.
1.3 AVEVA's total liability in contract, tort (including negligence), or otherwise, arising in connection with the
performance of the AVEVA software shall be limited to 100% of the licence fees paid in the year in which the user's
claim is brought.
1.4 Clauses 1.1 to 1.3 shall apply to the fullest extent permissible at law.
1.5 In the event of any conflict between the above clauses and the analogous clauses in the software licence under
which the AVEVA software was purchased, the clauses in the software licence shall take precedence.
Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every part of it
(including source code, object code, any data contained in it, the manual and any other documentation supplied
with it) belongs to, or is validly licensed by, AVEVA Solutions Limited or its subsidiaries.
All rights are reserved to AVEVA Solutions Limited and its subsidiaries. The information contained in this document
is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without
the prior written permission of AVEVA Solutions Limited. Where such permission is granted, it expressly requires
that this copyright notice, and the above disclaimer, is prominently displayed at the beginning of every copy that is
made.
The manual and associated documentation may not be adapted, reproduced, or copied, in any material or
electronic form, without the prior written permission of AVEVA Solutions Limited. The user may not reverse
engineer, decompile, copy, or adapt the software. Neither the whole, nor part of the software described in this
publication may be incorporated into any third-party software, product, machine, or system without the prior written
permission of AVEVA Solutions Limited, save as permitted by law. Any such unauthorised action is strictly
prohibited, and may give rise to civil liabilities and criminal prosecution.
The AVEVA software described in this guide is to be installed and operated strictly in accordance with the terms
and conditions of the respective software licences, and in accordance with the relevant User Documentation.
Unauthorised or unlicensed use of the software is strictly prohibited.
© Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved. AVEVA shall
not be liable for any breach or infringement of a third party's intellectual property rights where such breach results
from a user's modification of the AVEVA software or associated documentation.
AVEVA Solutions Limited, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom.
Trademark
AVEVA and Tribon are registered trademarks of AVEVA Solutions Limited or its subsidiaries. Unauthorised use of
the AVEVA or Tribon trademarks is strictly forbidden.
AVEVA product/software names are trademarks or registered trademarks of AVEVA Solutions Limited or its
subsidiaries, registered in the UK, Europe and other countries (worldwide).
The copyright, trademark rights, or other intellectual property rights in any other product or software, its name or
logo belongs to its respective owner.
Report Designer User Guide
Revision Sheet
Contents Page
Reporting
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Guide Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1
Report Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1
Sample Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1
Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2
Previews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2
Printing and Exporting Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2
Batch Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2
Default Display of Real Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2
Error Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:1
User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:1
Component Tray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:2
Context Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:2
Control and AVEVA Toolboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:3
Design Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:5
Designer Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:6
Preview Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:7
HTML View Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:7
Field List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:7
Formatting Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:8
Layout Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:9
Main Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:9
AVEVA Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:9
Property Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:10
1 Introduction
The Reporting User Guide guide contains information on how to create reports using
Reporting within the AVEVA Plant suites.
Reporting enables users to create new reports, bind them to data, and pass them to another
workstation for loading into another instance of the Reporting. In addition to report editing
capabilities, it allows the user to display print previews and to print reports and export
reports to files.
Note: Some features described may differ depending on the version of Reporting in use.
This depends on the application vendor.
2 Overview
The Reporting add-in is an interactive visual report designer. Data from stored queries
shared across a project (Database Views), locally stored queries (User Views) and ad-hoc
queries (Data Source Wizard or the Search Grid) can be presented and formatted to meet
project and customer requirements.
This topic provides an overview of features which are particular to the version of Reporting
provided with AVEVA PDMS.
Reports - Reportname.repv
These report files may contain formatting, graphics and presentation, and may have been
created from a Layout Template. However, in addition to layout, they also contain a data
source, and can be run. A .repv file may be saved as (File > Save As) a .repx file. For
example the user may want to save the formatting and layout of a report (.repv) but discard
its data source. Choosing this option displays a warning that the data source will be lost.
Reports contain a data source and are independent of user or project settings. Reports may
be shared across projects, as long as each project has the same element and attribute
structures defined in the report’s data source.
Refer to Create a New Report and Save a Report for details.
a sample report, and then selecting File > Save As. You may rename and save the sample
report, and then modify it to meet your own project needs.
Refer to Open an Existing Report and Save a Report for details.
2.4 Previews
Where a preview of a report is displayed in the Reporting, any data returned is limited to the
first 20 records. This preview will be cached and any changes to he underlying data will not
be shown until your run the report, or close and re-open the Reporting.
Note: If filters are added to a data source this may impact on the performance of previews.
Where previews are shown in a Quick Report all data is shown.
In addition to this, real unit qualified values may be formatted using the FormatDouble
function. See Add Calculated Fields to a Report. For details refer to the Design Reference
Manual - General Commands, Setting Output Precision of Distance Units and Switching
between Actual and Nominal Bores.
This section describes the basic procedures for creating reports using Reporting. Refer to:
• Overall Workflow
• New Report Definition / Report Layout
• Open Report Definition / Report Layout
3. Select the path or browse to the location containing the report layout or report definition
in report explorer.
5. On clicking Create in report explorer, the selected Report Layout will be opened in
Reporting. Change the layout using the various controls.
6. Click the Data Source button to bind the data from PDMS to current report definition.
The report Data source wizard will allow the user to define the data for the report.
• Select New to define a new data source.
• Select Copy to copy an existing data source defined in LEXICON or the file system.
• Select Edit to modify the existing data source associated with report definition
Click Next.
7. Provide the name and description for the Data Source and click Next.
8. Select the element type for which the element's attributes will be displayed in the report
and click Next.
9. To limit the number of elements returned by the Data Source define attribute filters, and
click Next.
10. Select the attributes to be included in report for the selected element types and click
Next.
11. Click Finish if the required data for the report has been defined, or else use the Back
button to modify the data.
12. On clicking Finish, the Field List on the right-hand side will display the attributes
selected in the Data Source.
13. Drag and drop or use smart tags to bind the attributes from the field list to various
controls in the report.
14. Click Preview to see a preview of current layout with the first 20 records available from
the associated data source.
15. Click on Run Report to run the report definition with the actual data available from the
currently bound data source.
16. Click the Save toolbar button or menu option to save the current report definition as a
report definition or report layout.
2. Select the path or browse to the location containing the report layout or report definition
in the report explorer.
3. Select the report definition or report layout from the report definition or the report layout
tab respectively.
4. A preview of the selected item will be displayed with first 20 records.
5. On clicking Open, Reporting will open the selected report layout or report definition.
6. Change the layout using the various controls available in the toolbox.
7. Click the Preview button to view a quick preview of the report definition/report layout.
8. The AVEVA Toolbar button will work only for report definitions.
9. Click the Data Source button to modify the associated Data Source.
10. Change the binding after changing the Data Source.
11. Click on Run Report to run the report definition with the actual data available from
currently bound data source. The Run Report dialog will allow the user to perform the
following operations on the report:
a. Export the report to various file types
b. Print the report
c. Publish the report to AVEVA NET
The Report Editing Basics topic describes the basic tasks the user may need to carry out
when editing a report using Reporting:
• Back up the Current Layout before Modification
• Manually Update Report Output
• Change Element Layout in a Report
• Add or Modify Static Information in a Report
• Delete Report Element
• Display Values from a Database (Bind Report Elements to Data)
• Use Mail Merge in Report Elements
• Change Formatting of Report Elements
• Change Fonts and Colours of Report Elements
• Change or Apply Data Sorting to a Report
• Change or Apply Data Filtering to a Report
• Change or Apply Data Grouping to a Report
• Add Totals to a Report
• Create or Modify Watermarks of a Report
• Add Page Numbers and System Information to a Report
• Add Calculated Fields to a Report
• Add Parameters to a Report
• Add Arrays to a Report
• Add Project Data to a Report.
To manually specify the folder to save a report to, select File > Save As from the main
menu, which will display the standard Save File window.
To load a saved report, click File > Open in the main menu, or press CTRL+O. The
standard Open File window is then displayed, which will allow the user to locate and open
the report.
To resize an element, select it and then drag one of the small boxes shown on its edges and
corners. To resize an element using keyboard shortcuts, press SHIFT+ARROW or
CTRL+SHIFT+ARROW.
The user can also easily align controls to each other or make them the same size, by
selecting the multiple controls and using the Layout Toolbar.
Text elements, such as labels and rich text boxes, also allow in-place editing of their
content. Double-click an element and activate the editor. When working with rich text, use
the Formatting Toolbar.
• Select the created control and click its Smart Tag. In the displayed actions list, click the
Load File... context link.
In the displayed window, define the path to the RTF or TXT file containing the text of the
information, and click Open.
Note: Additional text formatting can be performed using the Formatting Toolbar.
• Right-click the report element, and in the Context menu, choose Delete.
• To add a new data-bound report element, drag the required field item from the Field List
window onto a report band. This will create a Label bound to the selected data field.
• A more flexible way to create data-bound elements is to right-click a Field List item,
and then drag and drop it onto a report. This will display the context menu shown in the
image below. Choose the element type that will represent the data, and it will be
automatically created and bound to the selected data field.
As shown in the image above, the user can apply formatting to database values when using
the Mail Merge feature. Place the cursor on the field name inside the square brackets and
click the control's Smart Tag. In the displayed actions list, define the required formatting in
the Format String section.
The FormatString Editor window will be displayed, allowing the user to choose one of the
predefined formatting styles.
Select the required style and click OK to close the window and save the changes.
Note: For more information on customizing the appearance of report elements, refer to
Styles and Conditional Formatting.
Note: Data can be sorted against multiple data fields. If this is required, add more entries
and specify their data field and sort order settings as described above.
Click OK. The filtering is then applied to the report. Switch to the Preview tab to view the
result.
It is also possible to request a filtering parameter each time a report is previewed. Refer to
Add Parameters to a Report for details.
• The Field List is then displayed. Drop a field, which will be used as the grouping
criteria, from the Field List onto the GroupHeader band.
• Drop a field, representing the report’s general data onto the report's Detail band.
• Click the Smart Tag of the GroupHeader band, and in the displayed actions list, click
the ellipsis in the Group Fields section. The GroupField Collection Editor window is
displayed.
• In this window, click Add to add a new grouping field, and set its Field Name property
to the required field.
Note: To define whether the sort order for this grouping field should be ascending or
descending, use the Sort Order property.
The grouping is now applied to the Report. Switch to the Preview tab to view the result.
• Click the field for which a summary will be calculated, to select it. Then, hold down
CTRL and drag the field onto the Report Footer area to create an exact copy of the
label that will display the summary.
Note: A new label can also be created for the total by dragging it from the Control Toolbox.
• Select the newly created label. In the Property Grid, locate the Summary property
and click the ellipsis. The Summary Editor is then displayed.
The following image shows an example of how to set up a total.
Note: The Summary Running option is set to Report to make sure that all values from the
specified data field are taken into account.
Note: The Ignore NULL Values option will not affect the result in this example, since by
default NULL values are treated as if they were zeros. So the Sum will not be
affected whether or not these values are taken into account. This option applies to
functions like Count or Average, because it affects the number of elements counted.
Note: Watermarks are visible only in Preview and HTML View modes.
Note: Watermarks are not included when a reports are exported to HTML format.
• Select the report and click on any blank area surrounding its bands area.
In the Property Grid that is then displayed, locate the report's Watermark property,
and click the ellipsis. The Watermark window is then displayed.
• If a text watermark is to be used, in the Text Watermark tab of this window, define the
required properties, such as Text, Direction, Color, Font, Transparency, Page Range,
etc.
• If a picture watermark is to be used, in the Picture Watermark tab load the image to be
used as a watermark, and define its properties, such as Size mode, Alignment (vertical
and horizontal), Tiling, Transparency, Page Range, etc.
As shown above, it is possible to use both text and picture watermarks simultaneously.
Note: All the watermark options can be defined without using the Watermark window. In
the Property Grid, expand the Watermark property and set the required properties
directly.
Once the watermark has been set up, switch to the Preview tab to view the result.
Generally, this information is displayed within Page Headers and Footers and in Page
Margin bands. To add page numbers or system information to a report, drag and drop the
Page Info control from the Control Toolbox.
• Formatting of the control's text can be defined. In the Property Grid, set the Format
property to Page {0} of {1}.
• Define the formatting of the control's text using its Format property.
Define the formatting of the control's text. In the Property Grid, set the Format property to
Current User: {0}.
Note: It is recommended that all fields based on expressions are given a description in the
database view which includes the expression used. This makes it clear to the user
that an expression has been used to calculate the data, and what that expression is.
This is approach is followed in the supplied sample views.
The calculated field is added to the field list. In the Field List, select the created field to
show its properties in the Property Grid. Change the Field Type property to an
appropriate value.
• To create an expression for the calculated field, click the ellipsis in the Expression field
of the Property Grid.The Expression Editor is then displayed. The user can also
open the editor by right-clicking on the field in the field list and choosing Edit
Expression from the displayed menu.
Click Fields to display the field list. Double-click field names to add them to the
expression string. Use the toolbar to add operators between field names.
Note: Calculated fields are not included in the list of fields in the Expression Editor. Users
must type the name of a calculated field into the expression to use result of that
calculated field in that expression.
Two custom functions are available to support the extraction of values, units or
dimensions from a unit qualified attribute returned from string. These functions are:
GetDouble([FieldName])
Returns the value of a unit qualified value.
GetUnits([FieldName])
Returns the unit.
GetDimension([Attribute name])
Returns the dimension.
The function FormatDouble([attribute], ‘units’, precision, 'label', fraction) may be used in
a calculated field to convert the value of an real attribute from current units to given
units and precision. Label and fraction parameter are optional where label is string for
overriding the default unit label and fraction is boolean value to indicate whether
decimal or fractional value for the unit should be displayed. For example, the following
converts HBOR to millimeters with two decimal places, regardless of the units and
precision of the current session.
FormatDouble([HBOR], ‘millimeter’, 2)
FormatDouble([HBOR], 'inch', 2, 'in', true) will convert the HBOR to inches with two
decimal place and will display the inches value with unit label 'in' and fraction.
Quick reports created from Tags, where the units of a real attribute can be changed, will
be displayed in the same units by creating calculated fields for each real attribute using
this function.
Please note:
• These functions are not available from the list of functions available in the
expression builder, and must be manually typed into the expression. The function
name should be used followed by brackets.
• GetDouble, GetUnits and GetDimension will not work in conjunction with other
functions. For example GetDouble([HBOR]) + [NUMB] or GetDouble([HBOR]) +
GetDouble([HBOR]) will not work. A calculated field should therefore contain only
one of the above functions as an expression.
Whenever the calculated field uses the attribute name having ] in the attribute name,
use the escape sequence \] for correct calculation of expression.
For example to get length of attribute name test pressure [1], use the following in
expression Len([test pressure[1\]]).
Same will apply to GetDouble, GetUnits, GetDimension and FormatDouble function.
In addition, the following Summary Functions are available for use with unit qualified
attributes:
• Min
• Max
• Avg
• Sum
These are available in the expression builder, and when setting the summary function
for a form control bound to a field.
• To close the window and save the expression, click OK.
• Drag the calculated field from the Field List onto a control or a table cell.
The calculated field is now set up. Switch to the Preview tab to view the result.
Note: Every time a report is previewed, the user will be asked to enter the values of any
parameters. The following instructions explain how to use these values to filter a
report's data.
• Select the report (by clicking anywhere on the blank space of the report), and in the
Property Grid, locate the Filter String property and click the ellipsis. The FilterString
Editor is displayed.
The parameter filtered report is now ready. To view the results, switch to the Preview tab,
and in the Parameters section, define the required values and click Submit.
5 Create Reports
Using Reporting, the user can edit existing reports and create new reports. The procedures
for editing and creating reports are described in the following topics:
• Basic Operations
• Bind a Report to Data
• Report Types
• Styles and Conditional Formatting
• Navigation
• Miscellaneous.
Note: Reports can also be created by opening an existing report or layout template and
saving it as a new report. See Open an Existing Report and Save a Report.
If there is another report already loaded in the Designer, then the user is asked whether this
report should be saved before it is replaced with the new one.
The New Report window is then displayed:
The window is used to select the template (a .repx file) to be used as the basis for the new
report.
To select a template, first select the template location from the Look In drop-down:
To open a report definition (a .repv file), click the Report Definition tab. To open a template,
(a .repx file) click the Layout Template tab.
To select a report or template, select the report or template location from the Look In drop-
down:
The user can set the page orientation and modify the margins. The margin values are
expressed in the report's measurement units. The user can select from the predefined
paper sizes (Paper Kind property) or choose Custom and create a paper size, or
select one which is already defined for this printer (Paper Name property).
These settings affect the layout of the report's design area. After their modification, red
warning marks might be displayed, indicating that the controls go beyond the page
dimensions. These warnings can be switched off by setting the Show Printing
Warnings property of the report to No.
To change the measurement units shown in the margins tooltips, customise the report's
Measure Units property.
The margins can also be set visually by dragging the dashed lines in the Run Report
window.
A name for the new data source is automatically generated. This may be changed to a
name which describes the element(s) the data source will use.
Enter a description if required.
Click Next.
The Base Element Types page of the wizard is then displayed:
At least one element type must be selected. This will be the element type used to populate
the report.
The list of elements shown may be filtered by typing in the filter box.
Select the element or elements required by clicking on them. The Ctrl and Shift keys may be
used to make multiple selections. Use the arrow buttons to move the selected elements for
the data source to the Base Element Types box.
Click Next.
The Filters page of the wizard is then displayed:
Using this page, filters may be added to limit the elements retuned by the data source.
These filters maybe simple attribute based comparisons, or more complex PML1
expressions.
Enter attribute based comparison filters in the Attribute Filters box. Enter PML1 expression
filters in the Expression Filters box.
To add a new filter click the appropriate Add Filter button and enter or select the filter
details in the row of fields that is then provided. Multiple filters may be defined.
To delete a filter, select it from the list of filters and select the appropriate Delete Filter
button.
Click Next.
The Columns page of the wizard is then displayed:
The attributes of the base elements of the data source are displayed in the Available
Columns box.
If multiple elements have been selected for the data source, then either all attributes of
these element types may be listed by clicking All Attributes, or only those common to all
the selected element types may be selected by clicking Common Attributes.
Select the columns that are to be available for use in the report by clicking on them. Use the
Ctrl and Shift keys to make multiple selections.
Use the arrow buttons to move the selected columns to the Data Source Columns box.
Once one or more columns have been selected PML1 expressions may be typed into the
Data Source Columns box, the results of which will be available for use in your report. For
example:
It may be edited by selecting Edit option of the Data Source Wizard (see Editing a Data
Source).
The existing data sources are listed. Data sources may come from three sources.
Element
Element Views are created automatically by the system. One element view is created
for every base element type. Selecting an element view is an easy way to include data
from one type of element in a report.
Project
Project Views are stored in a LEXICON dictionary database. A user must have read
access to the LEXICON database to see Project Views. Project Views may contain
more complex data, and will be set up by an administrator. A set of sample project
views are include in the sample project.
User
User views may be copies of Project or Element views, or maybe data sources users
have created and stored locally.
Whichever view is chosen to use for a report a copy of it is taken. The original view is left as
it is. Write access to important project resources such as the LEXICON dictionary database
is therefore not required.
The views shown may be filtered based on the type of the owning database of the elements
in the view.
View sets are a way of grouping views together. Currently from the data source Wizard this
is used purely to help the administrator to group logically related views together, for ease of
distribution and use. However, in later releases it will be possible to build relationships
between single views in one view set, in the same way that tables are related in a relational
database. When the view set is selected for use in a report these relationships will be
resolved and the results presented for use in Reporting as a Report data source.
The subsequent steps of the wizard are the same those of the New option, as described
above, but with the details of the current data source populating the wizard so that they can
be edited as required. See Defining a New Data Source for details.
The window is used to specify a list of elements. The report will be restricted to source data
at and below the level of these elements in the element hierarchy.
If the current element is always to be within the scope, click the CE checkbox. Note this will
mean that if/when the CE changes, so will the scope of the data source.
To add the current element to the source, click the Add CE button. The current element is
then added to the Root Elements list. To add further elements, make those elements the
Current Element and click the button again. A list of root elements can be compiled in this
way.
To remove an element from the list of Root Elements, select it in the list and click Remove.
If the scope of the data source is to be restricted to elements either partially within or
completely within a specified volume, select either the Partially Within... or Completely
Within... option from list of values in the Volume field.
The Volume window is then displayed:
Click OK to save the scope settings and exit the window. Click Cancel to exit the window
without saving.
Note: When root element(s) added in scope are no longer available in current database
then the DbRef will be displayed in scope with "=dbref[0]/dbref[1]" format.
• A window appears allowing a name to be defined for the dataset being created.
• Click Next. On the next page, specify the database to be used. If it is absent in the
dropdown menu containing existing connections, click New Connection to display the
Data Link Properties window.
In Provider tab of this window, choose a data provider (the database). Then switch to
the Connection tab to specify the path to the data source. Click OK, then Next.
• The next page allows tables to be selected and obtained from the database. Select the
required table and click Finish.
Note: If several tables are chosen, Reporting creates a data relationship between them (if
possible), which is used to create master-detail reports.
• After performing the steps above the report is now bound to the data source and the
report's Data Source, Data Member and Data Adapter properties are set.
After binding a report to a data source, each data-aware report control must be bound
to a data field from that source. Refer to Display Values from a Database (Bind Report
Elements to Data) for further details.
• Select the created control and click its Smart tag. In the displayed actions list, click
Load File.
In the window then displayed, define the path to the RTF or TXT file containing the text
of the announcement, and click Open.
Note: Additional text formatting can be performed using the Formatting Toolbar.
• To repeat the content of the report 20 times, select the Detail band and in the Property
Grid set its Repeat Count when Data Source is Empty property to 20.
Also, to make the announcement print on separate pages (so that each instance of the
announcement is on a separate page), set the band's Page Break property to After
the Band.
The static report is now complete. Switch to the Preview tab to view the result.
As a result, two tables are created. The one placed in the Page Header band will be
used as a header, while the other one will contain the report's detail information.
• Type the headers into the upper table's cells, and bind the cells in the detail section to
the appropriate data fields. This can be done by dropping these fields from the Field
List onto the cells.
• Various properties of the tables can be customised. For example the Property Grid can
be used to define Borders property and the Background Color. Text appearance can
be customised using the Formatting Toolbar and an odd-even page style can be
applied to the table.
The table report is now complete. Switch to the Preview tab to view the result.
• To add a Detail Report band, right-click Reporting, and in the displayed Context
Menu, point to Insert Detail Report. If the bound data source contains a data
relationship, the submenu will contain an item with the name of that relationship. Select
this item to create a Detail Report band, already bound to the detail table.
• Drop the required data fields from the Field List onto the report's Detail and Detail
Report bands.
Regarding the Detail Report band, note that only items from the relation section (in this
example it is the Categories Products section) should be dropped, or there will be
incorrect output in the report.
The master-detail report is now complete. Switch to the Preview tab to view the result.
• Drop a field, which will be used as a grouping criteria, from the Field List onto the
created GroupHeader1 band.
• To define the report's grouping, select the GroupHeader1 band and click its Smart
Tag. In the displayed actions list, locate the Group Fields option and click the ellipsis.
The GroupField Collection Editor is displayed. In this window, click Add, to create a
grouping field and set its Field Name to the same field as was selected for use as the
grouping criteria.
• Now, drop the required fields onto the report's Detail band.
• Select the Detail band, and in the Property Grid, expand the Multi-Column Options
section. Set the Column Count property to 3, Column Spacing to 20 and Direction to
First Across, then Down.
• On the Detail band's surface a grey area appears, delimiting the available column's
width. A blue area also appear, representing a space between columns.
The multi-column report is now compete. Switch to the Preview tab to view the result.
• To bind the grid to a data source, click its Smart tag, and in the XRPicotGrid Tasks
menu, expand the Data Source dropdown menu and click Add New DataSource. The
Report Wizard window is displayed.
The wizard will guide the user through the process of assigning a data source to the
grid. For detailed instructions on the wizard's steps, refer to Bind Report to Non-
Dabacon Data, as this process is similar.
• The specified data source is then assigned to the grid's Data Source property. The
Data Member property is also set, which specifies which table or view of the dataset
the grid should obtain data from, as is the Data Adapter property.
Note: The report's Data Source property must be set to None. Otherwise, the grid will be
blank when it is previewed.
The cross-tab report is now complete. Switch to the Preview tab to view the result.
• Select the report (by clicking anywhere on the blank space surrounding the band area),
and in the Property Grid, locate the Filter String property and click the ellipsis. The
FilterString Editor is displayed.
Note: Make sure that the report's Request Parameters property is set to Yes (which is the
default setting). Otherwise, the parameters will not be requested when the report is
previewed, and a blank report will be the result.
• Finally, drop the required data fields from the Field List onto the report bands to create
the report layout.
The parameterised report is now complete. To view the results, switch to the Preview tab,
and in the Parameters section, define the required values and click Submit.
Note: In this simple example, the series has a single data source. However, different data
sources can be used for different series if required.
Note: The Chart Wizard may be displayed at this point (if its 'Show wizard every time a
new chart is added' option is enabled). Click Cancel to close the wizard's window
and manually customise the chart.
• To bind the chart to a data source, click its Smart tag, and in the displayed actions list,
expand the Data Source dropdown selector and click Add New DataSource. The
Report Wizard is displayed.
The wizard guides the user through the process of assigning a data source to the chart.
For detailed instructions on the wizard's steps, refer to Bind Report to Non-Dabacon
Data, as this process is similar.
• The specified data source is then assigned to the chart's Data Source property. The
Data Member property is also set, which specifies which table or view of the dataset
the chart should obtain data from, as is the Data Adapter property.
Note: The report's Data Source property must be set to None. Otherwise, the chart will be
blank when previewed.
• To add a series to the chart and specify its data binding properties, use the Series
Collection Editor. It can be displayed either via the Property Grid, or via the Series
link in the chart's Smart tag.
In the editor, create a series by clicking Add and selecting the Bar view.
Switch to the Properties tab.
Set the series' Data Source property to the created dataset, define the Argument Data
Member and Data Members properties.
Click Copy to create another series with the same properties, and set its View property
to Point.
To save the changes and close the editor, click Close.
Note: After this step, there are maybe too many data points, making the chart difficult to
interpret. The chart's Data Filters property is used to limit the number of data points
shown by applying a filtering criterion. Click Series1 in the chart to select it, then in
the Property Grid locate the Data Filters item and click the ellipsis to display the
Data Filter Collection Editor.
• Click Add to add a criterion, and define its properties as shown in the following image:
Note: At this point, the Chart Wizard may be displayed (if its Show wizard every time a
new chart is added option is enabled). Click Cancel to close the wizard's window
and manually customise the chart.
• To bind the chart to a data source, click its Smart tag, and in the displayed actions list,
expand the Data Source dropdown selector and click Add New DataSource. The
Report Wizard is displayed.
The wizard will guide the user through the process of assigning a data source to the
chart. For detailed instructions on the wizard's steps, refer to Bind Report to Non-
Dabacon Data, as this process is similar.
• The specified data source is then assigned to the chart's Data Source property. The
Data Member property is also set, which specifies which table or view of the dataset
the chart should obtain data from, as is the Data Adapter property.
Note: The report's Data Source property must be set to None. Otherwise, the chart will be
blank when previewed.
• To specify the data field which is to provide data for the series names, the Series Data
Member property must be set.
• Define the of the Data Members property, specifying the data fields from which the
series obtains the data values of its points.
For details of another method of binding a chart to data, refer to Chart with Static Series.
If required, the default inherited appearance properties of a child element can be overridden
and set to difference properties, independent of parent element appearance properties.
Note: Some of these properties are only applicable to certain controls. For example, the
Text Alignment properties of Line container bands are ignored and not inherited by
Line controls.
Additionally, there can be styles created in a report. A report's styles are stored in the
report's Style Sheet collection. A style stored within this collection has a set of the same
appearance properties as a control or a band has.
There are two ways to store a report's style sheets. The first approach is to save them to
external files (with the REPSS extension), and then load them into a report using its Style
Sheet Path property in read-only mode (this is described at Store and Restore Style
Sheets). The second is to store the style sheets within the report (using the Style Sheet
property), so that they can be modified, if required, and saved with the report itself.
Finally, the styles can be assigned to a report's bands and controls. A band or control can
therefore obtain its appearance either from a style assigned to it, or from the control's own
appearance properties. In this case, the control's Style Priority property allows the user to
define the required behaviour of the control's final appearance.
By default, all the Style Priority's options (Style Priority.Use Background Color, Style
Priority.Use Border Color, etc.), which follow the structure of the style and appearance
properties, are set to Yes (except the Use Text Alignment). Which means that if any style is
assigned to a control via its Styles property, all its properties will have a higher priority than
the properties stored in the control or in its parent. If some of the properties are to be
determined by a control, rather than its style, set the corresponding Use* property to No.
Note: If styles contained in a style sheet loaded in the Style Sheet Path property have the
same names as styles already contained in a report, the latter ones are overriden.
The following image demonstrates how the Style Priority property works.
Note: When conditional formatting is used, the appearance defined by the conditional
formatting has a higher priority than the properties described above.
Another commonly used feature is odd-even styles. These allow the user to visually delimit
alternating data fields in a report, for better readability. More information about this can be
found in Use of Odd and Even Styles.
• Select the Detail band, and in the Property Grid, expand the Styles property.
Display the dropdown list for the Even Style property and click (New).
• Repeat the last two steps for the Odd Style property, i.e. create a new style and set its
Background Color property to Ivory.
• If the report is previewed using the Preview tab at this stage, the created styles are
applied to all the controls contained in the Detail band.
• If a different style is required for one of the fields. Select the required field, and in the
Property Grid, expand its Styles property and open the dropdown list for the Style
property. Click (New).
Expand the Style property, and for the created xrControlStyle3, set the Background
Color property to White.
• The style of this control has priority over the Detail band's styles. Switch to the Preview
tab to view the result.
• In the Styles Editor that is then displayed, click , to create new styles. Define their
properties and click Save.
In the Save File window, define a name for the style sheet file (.REPSS) and click
Save.
• In the Styles Editor window, click to delete the created styles, and close the window.
• Select the report by clicking anywhere on the blank area around its bands. In the
Property Grid, locate the Style Sheet Path property and click the ellipsis. Using the
Open File window, select and load the created REPSS file.
Click the Style Sheet properties ellipsis. In the Styles Editor, observe that the
properties of the styles are read-only. This is because the Style Sheet Path property is
being used to define the styles.
If the Style Sheet Path property is subsequently set to None, and a style sheet is
loaded into a report using the Style Sheet property, all the styles loaded from the style
sheet file will still be stored in the report, but will become editable.
• Next, assign the styles to the report controls by using their Styles properties. In this
example, the created styles are assigned to the control's Odd Style and Even Style
properties. For more information, refer to Use of Odd and Even Styles.
Note: The styles loaded from a style sheet file have a higher priority than the styles which
exist in a report's style sheet, returned by the Style Sheet property. This means that
if the styles stored in the report have the same names as the styles loaded from a
style sheet file, then the styles in the file will substitute for their namesakes. The
styles loaded from a file cannot be edited in a report. For more information, refer to
Styles Concepts.
• Select the report by clicking anywhere on the blank area around its band. In the
Property Grid, locate the Formatting Rules Sheet property and click the ellipsis. The
Formatting Rule Sheet Editor is then displayed. This is used to manage and
customise formatting rules, which then can be applied to the report's bands and
controls.
In this window, create a new formatting rule (click ), locate its Condition property and
click the ellipsis.
• In the displayed Condition Editor, define the required Boolean condition. In this
example, the condition defined is that if the UnitPrice is greater than 30 the fields will
be formatted.
• Select the band or control to which the formatting rule must be applied (in this example
it is the Detail band), and in the Property Grid, locate the Formatting Rules property
and click the ellipsis. In the Formatting Rules Editor that is then displayed, move the
formatting rule from the Available Rules list to the Applied Rules list (using the >
button) in order to apply the rule to the control.
It is possible to customise the precedence of formatting rules by using the up and down
arrow icons at the right of the window. Rules are applied in the order that they appear in the
list, with the last rule in the list having the highest priority.
• Drag the field which will be used as a grouping criteria from the Field List onto the
created GroupHeader1 band.
• Click the Smart Tag of the GroupHeader1 band, and in the actions list, click the
ellipsis in the Group Fields section. The GroupField Collection Editor window is
then displayed.
In this window, click Add to add a new grouping field, and set its Field Name property
to the required field.
To apply the settings and close the window, click OK.
• Drag the fields representing the general report's data onto the report's Detail band from
the Field List.
• Select the Group Header band's strip, and in the Property Grid, locate the
Formatting Rules property, and click the ellipsis.
In the Formatting Rules Editor, click Edit Rule Sheet.
• In the Formatting Rule Sheet Editor, click , to create a new rule. Then set its
Visible property to No, and for the Condition property, click the ellipsis.
• In the Property Grid, set the field's Field Type property to String. Locate its
Expression property and click the ellipsis. The Expression Editor is then displayed.
In this window, define the required condition for the calculated field (e.g.
Iif([UnitsOnOrder] == 0, 'None', [UnitsOnOrder]), which means that if the
UnitsOnOrder data field's is equal to 0, the appropriate control's text will be replaced
with None).
To close the window, click OK.
• Drag the required data fields (and the created calculated field as well) from the Field
List onto the report's Detail band.
The report is now complete. Switch to the Preview tab to view the result.
5.5 Navigation
Navigation covers the navigation-related features of Reporting and consists of the following
topics:
• Add Bookmarks
• Create Hyperlinks
• Add a Cross-Reference
Create a Report
• Create a new report.
• Bind the report to a data source.
• Add a Group Header band to the report.
Right-click anywhere on the report, and in the Context Menu, point to Insert Band and
click GroupHeader.
• From the Field List, drag fields onto the created GroupHeader1 band.
• Click the Smart Tag of the GroupHeader1 band, and in the displayed actions list, click
the ellipsis in the Group Fields property. The GroupField Collection Editor window
is then displayed.
In this window, click Add to add a new grouping field, and set its FieldName property to
the required field.
To apply the settings and close the window, click OK.
• To add a Report Header band to the report, right-click anywhere on it, and in the
dropdown menu, point to Insert Band and click ReportHeader.
• From the Toolbox panel, drop a label onto the created Report Header band, and set
its text to Products by Categories.
• Drop a field representing the general report's data onto the created Detail band.
Define Bookmarks
• Click the label in the Report Header band to select it, and in the Property Grid set its
Bookmark property to the same as its text (i.e. Products by Categories).
• Select the label in the report's Group Header band. As this control is bound to data, its
Bookmark property will be bound to the same data field, using the (Data Bindings)
property.
• Set the Parent Bookmark property for the field to the Report Header's label, to define
the document map's hierarchy.
Note: A label will behave as a hyperlink both in a report's Print preview, HTML preview and
when the report is exported to PDF, HTML, MHT, RTF and XLS formats.
The hyperlink is now ready. Switch to the Preview tab to view the result.
• Drop a label onto the created ReportHeader band to serve as the report's headline.
Click the label to type the desired contents into it. In the Property Grid, set its Name
property to reportTop.
• Drop another label onto the band. As it will be the link, change its text to Top of Report,
and apply the formatting to it that will indicate that it is a hyperlink (i.e. blue colour and
underlined text).
Finally, set its Navigation Target property to _self. Click the dropdown menu of the
Navigation URL property to view the controls available in the report, and select
reportTop.
The cross-reference is now set up. Switch to the Preview tab to view the result.
5.6 Miscellaneous
Miscellaneous covers Reporting features which do not fall into other categories:
• Handle Events via Scripts
• Show the Current Row Index
• Count the Number of Records in a Report or a Group
• Cancel Printing If a Report Does Not Contain any Records
• Limit the Number of Records per Page
Overview
Scripting enables the user to insert scripts into a report, and execute them when the report
is previewed, printed or exported. Script commands should be placed within the event
handlers of the report objects. When the corresponding event occurs (e.g. a mouse click),
the script code runs.
Generally scripts are used for data-aware report formatting. Though Reporting enables
users to perform such tasks without any scripting (see Conditionally Change a Control's
Appearance, Conditionally Change a Label's Text and Conditionally Hide Bands),
sometimes it may be required to use scripts, for example to achieve more specific results.
The report's layout can be fully customised using of scripting.
Scripting also is the only way to calculate custom summaries.
Every report object has a set of events that can result in a script being run. The set of events
depends on a particular element type. For example, the Label control's events are shown in
the following image:
When the ellipsis is clicked for any event, the Script Editor window is displayed:
If there is no script defined for this event, the window contains a script template in the
language specified by the Script Language property of the report (C#, Visual Basic or J#).
Insert the script code with the help of this simple editor. Since there are no syntax checks or
a debugger, the user must ensure that the entered script is correct. If there are errors in the
script, an error message will display on previewing the report.
To restore the default script, in the Script Editor window, click Default Script which will
eliminate all the changes made to scripts.
The scripts are saved along with the report layout to a file (for details on this, refer to Back
up the Current Layout before Modification).
Specifics
1. Scripting Language
The report scripts may be written in the following languages that the .NET framework
supports: C#, Visual Basic and J#. Since J# is not installed with the framework
installation by default, make sure it has been installed before writing code in it. The
scripting language is specified via the Script Language property of the Report object.
It is set to the C# language by default.
2. Scripting Scope
Script execution is performed in the following way:
• The report engine generates a temporary class in memory. The names of the
variables are defined by the Name properties of the controls and objects they
represent. When the script is pre-processed, its namespace directives are taken
from the script code and added to the namespace where the temporary class is
defined.
• After pre-processing, all scripts are placed in the code of the temporary class. The
resulting class is then compiled in memory, and its methods are called when events
occur.
• Scripting offers many advantages: to declare classes (they will become inner
classes), variables, methods, etc. A variable declared in one script is accessible in
another script, because it is in fact a variable of the temporary class.
3. Reference External Assemblies
The Script References property of the Report object specifies the full paths (including
the file names) to the assemblies that are referenced in the scripts used in a report.
These paths should be specified for all the assemblies that are included in scripts via
using (C#), Imports (Visual Basic) or import (J#) directives.
Note: Assembles do not usually need including, because most standard assemblies that
may be required in scripts are already referenced by Reporting.
The additional events must then be added to the label's Scripts property.
• Select the field for which the current row index will be displayed by clicking on it. Then
hold down CTRL and drag the field to create an exact copy of the Label, which will
display the index.
• Select the created Label, and in the Property Grid, locate the Summary property and
click the ellipsis. The Summary Editor is displayed.
In this window, the Bound field is already set to the required data field. So for the
Summary function select RecordNumber and check Ignore NULL Values to avoid
these data fields from affecting the calculation.
Next, set the Summary Running option to Report (Group or Page if required) and
click OK.
• In the same manner, add GroupHeader and GroupFooter bands to the report.
• Drop the required data fields from the Field List onto the Report bands.
• Click the field for which the number of records will be calculated to select it. Then hold
down CTRL and drag the field onto the Group Footer area to create an exact copy of
the label, which will display the number of records for a group.
• In the same way, create a copy of this field in the Report Footer area, to display the
number of records for the report.
• Click the Smart Tag of the GroupHeader1 band, and in the displayed actions list, click
the ellipsis in the Group Fields section. The GroupField Collection Editor window is
then displayed.
In this window, click Add, to add a new grouping field, and set its FieldName property
to the required field.
To apply the settings and close the window, click OK.
• Select the Label in the Group Footer area, and in the Property Grid, expand the
Summary property.
Set the Running property to Group, the Function property to Count and (if required)
the Ignore Null Values property to Yes. Set the Format String property to Products
in the Group: {0}.
• Similarly, select the label in the Report Footer area, and in the Property Grid, expand
the Summary property.
Set the Running property to Report, the Function property to Count, the Ignore Null
Values property to Yes and the property Format String to Products in the Report:
{0}.
The report is now complete. Switch to the Preview tab to view the result.
• To add a parameter to the report, in the Field List, right-click the Parameters section,
and in the dropdown menu, choose Add Parameter.
• Set the (Name) property of the parameter to rowsNumber, the Parameter Type
parameter to Int32 and the Description property to Rows per Page:.
• Drag the Page Break control from the Toolbox onto the report's Detail band and place
it at the top of the detail table.
• For the created control, set the Visible property to No, and for its Formatting Rules
property, click the ellipsis to display the Formatting Rules Editor.
In this window, click Edit Rule Sheet. The Formatting Rule Sheet Editor is then
displayed.
• Click , to create a new formatting rule. Set its Visible property to Yes, and for the
Condition property, click the ellipsis, to display the Condition Editor.
Click OK to save the changes and close the window. Then click Close to close the
Formatting Rule Sheet Editor.
• In the Formatting Rules Editor, the created rule is displayed. Move it to the list of
applied rules on the right, use the > button.
Reports can be run from outside of Reporting in three ways. Refer to:
• PML Object
• Search Results Grid - Quick Reports
• Run Report
The Report Manager will open. Select a Layout Template to use for the quick report. If you
are using a Saved Search as the basis for the quick report and you have already designed a
layout template for use with this Saved Search, then select that Layout Template.
Note: Group sorting applied to search results (using the Enable Group Sorting menu option
and associated functionality) will not be applied to Quick Reports generated from the
search results.
After you have selected the layout template you want to use for your Quick Report, you will
be asked if you want a default layout to be applied.
If you select Yes, the Reporting Tool will automatically place the fields in your Search
Results grid into a system generated table placed directly in your Quick Report. Select this
option when your search results grid contains a small number of fields.
If you are using a Saved Search and have selected a Layout Template which you have
already designed for use with this Search then do not select Yes, as the Default Layout will
overwrite your Layout Template layout.
If you would like more control over the placement of your search results grid fields in your
quick report, then do not select the Default Layout.
If you selected the Default layout option, the columns displayed in your Search Results grid
will be automatically placed in a system generated table on the report.
If you did not select the default layout option, you will be able to drag and drop the fields
from your saved search from the Field List onto your Report Layout.
The Preview shown in a Quick Report includes all data supplied by the Search Results grid.
Data Source, Scope and Run buttons are disabled in a Quick Report preview. Datasource is
not required as the source of data for a Quick Report is the Search Results Grid. Scope is
defined in the Search. Run is not required, as a Quick Report can be exported from the
Preview, which in a Quick Report contains all of the data from the Search Results grid.
You may only save a Quick Report as a Layout Template, as there is no binding to a
Datasource. Save your Quick Report layout so you may use it again for any Search Results
grid where the Column Headings match, as the Column Heading is used to identify where to
place Search Results on a Report Layout.
For example, the Search Results Column OWNER…
Will be placed in the Layout Template label mapped to the Field OWNER: