You are on page 1of 137

Reporting

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

Date Version Comments / Remarks


September 2011 12.1.1 Issued
January 2012 Copyright added to all pages.
Report Designer User Guide
Reporting User Guide

Reporting User Guide

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

Getting Started with Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:1


Overall Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:2
New Report Definition / Report Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:3
Open Report Definition / Report Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:11

Report Editing Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:1


Back up the Current Layout before Modification . . . . . . . . . . . . . . . . . . . . . . . . 4:1
Manually Update Report Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:2
Change Element Layout in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:2

© Copyright 1974 to current year. i 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide

Add or Modify Static Information in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:3


Delete Report Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:5
Display Values from a Database (Bind Report Elements to Data). . . . . . . . . . . 4:6
Use Mail Merge in Report Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:8
Change Formatting of Report Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:8
Change Fonts and Colours of Report Elements . . . . . . . . . . . . . . . . . . . . . . . . . 4:9
Change or Apply Data Sorting to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:10
Change or Apply Data Filtering to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:11
Change or Apply Data Grouping to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . 4:12
Add Totals to a Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:13
Create or Modify Watermarks of a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:15
Add Page Numbers and System Information to a Report . . . . . . . . . . . . . . . . 4:17
Add Calculated Fields to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:20
Add Parameters to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:23
Add Arrays to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:26
Add Project Data to a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:27

Create Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1


Basic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1
Create a New Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1
Open an Existing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:2
Change Measurement Units for a Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:4
Change Page Settings for a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:4
Save a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:7
Bind a Report to Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:7
Bind Report to Dabacon Project Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:8
Define Scope within PDMS Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:17
Bind Report to Non-Dabacon Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:19
Report Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:22
Static Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:23
Table Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:24
Master-Detail Report (Detail Report Bands). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:25
Multi-Column Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:26
Cross-Tab Report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:28
Parameterised Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:30
Chart with Static Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:32

© Copyright 1974 to current year. ii 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide

Chart with Dynamic Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:36


Styles and Conditional Formatting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:40
Styles Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:40
Use of Odd and Even Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:43
Store and Restore Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:45
Conditionally Change a Control's Appearance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:48
Conditionally Hide Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:51
Conditionally Change a Label's Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:55
Navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:56
Add Bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:57
Create Hyperlinks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:60
Add a Cross-Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:60
Miscellaneous. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:62
Handle Events via Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:62
Show the Current Row Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:66
Count the Number of Records in a Report or a Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:67
Cancel Printing If a Report Does Not Contain any Records. . . . . . . . . . . . . . . . . . . . . . . . 5:69
Limit the Number of Records per Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:70

Running Reports from outside of the Reporting . . . . . . . . . . . . . . . 6:1


PML Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1
Search Results Grid - Quick Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1
Run Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:5

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

© Copyright 1974 to current year. iii 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide

Report Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:10


Smart Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:11
Zoom Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:13
Report Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:13
Appearance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:13
Behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:16
Data ............................................................. 7:16
Design ............................................................. 7:18
Misc ............................................................. 7:19
Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:20
Page Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:20
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:21
Report Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:22
Band Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:22
Manage Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:22
Detail Band. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:24
Group Header and Footer Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:27
Report Header and Footer Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:32
Page Header and Footer Bands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:34
Page Margin Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:37
Detail Report Bands (for Master-Detail Reports) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:39
Report Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:42
Label ............................................................. 7:44
Check Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:47
Rich Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:50
Picture Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:53
Panel ............................................................. 7:56
Table ............................................................. 7:58
Table Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:61
Table Cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:62
Line ............................................................. 7:66
Shape ............................................................. 7:67
Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:70
Zip Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:76
Chart ............................................................. 7:78
Pivot Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:82
Page Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:85
Page Break. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:87
Cross-band Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:88

© Copyright 1974 to current year. iv 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide

Cross-band Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:90


Project Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:91
Preview Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:94
Print and Export Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7:96

© Copyright 1974 to current year. v 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide

© Copyright 1974 to current year. vi 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Introduction

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.

1.1 Guide Structure


The Reporting User Guide consists of the following sections:
• Overview

© Copyright 1974 to current year. 1:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Introduction

• Getting Started with Reporting


• Report Editing Basics
• Create Reports
• Running Reports from outside of the Reporting
• Reference

© Copyright 1974 to current year. 1:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Overview

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.

2.1 Report Formats


The Reporting supports two report file formats.

Layout Templates - Reportname.repx


These report files contain formatting, graphics and presentation. They contain no data
source and cannot be run. These report files may be used to distribute a common look and
feel for use in reports across a company and/or project.

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.

2.2 Sample Reports


A set of sample reports are included. These include both Layout Templates and Reports.
They are designed to work with the sample database. If you want to trial these reports on
your own project then select File > Open. From the drop-down select Browse and navigate
to the folder where the samples are located:
PDMS Installation Location\PDMSUI\dflts\data\reports
The user will now see the sample reports and may open and run them against your project.
You may also use the sample reports as the basis for your own custom reports, by opening

© Copyright 1974 to current year. 2:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Overview

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.3 Data Sources


A data source is a way of defining the data that will be available for use in a report.
Clicking the Data source button in the Reporting opens the Data Source Wizard. This
wizard takes you through the steps required to create a new data source, copy an existing
data source, or edit the data source already defined for the current report (if there is one).
Refer to Bind Report to Dabacon Project Data 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.

Refer to Preview Reports for details.

2.5 Printing and Exporting Reports


Report data may be published to AVEVA NET by clicking the Run Report button. The report
is executed and the full data set is retuned and displayed in a new window. This window
provides facilities for printing the report, exporting it in various file formats, and publishing
the report in PDF format, with data and associations if configured, to AVEVA NET. Refer to
Print and Export Reports or details.
For further details see the AVEVA Schematic Gateway Guide.

2.6 Batch Operation


A PML Object (PMLREPORT()) has been created which provides a programmatic means of
running pre-defined reports created using the Reporting. Which is provided to support
customisation, and the running of reports in batch mode.
For further details of this PML object refer to the Software Customisation Guide.

2.7 Default Display of Real Values


The display of real values in Reporting is controlled by the PRECISION command via the
PDMS Command Line. This command enables the user to specify the number of decimal
places for the displayed values of dimensions. Running reports in batch may give different
results if these formats have not been created in TTY mode. So in batch these can be
initialized as follows in a macro
!!comDefineGlobal(object COMFORMATS())

© Copyright 1974 to current year. 2:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Overview

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.

2.8 Error Reporting


If the Datasource used for a report encounters an error when attempting to collect data, and
because of this error is unable to return a Field value used on a Report, then an error
message will be substituted for the Field value. This may occur, for example, if a PML1
expression is used to determine a field value, and this expression is incorrect.
Where an error is encountered the substitution text in the report is:
!!Error

© Copyright 1974 to current year. 2:3 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Overview

© Copyright 1974 to current year. 2:4 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

3 Getting Started with Reporting

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

© Copyright 1974 to current year. 3:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

3.1 Overall Workflow


The diagram below illustrates the overall workflow for the basic use of Reporting.

© Copyright 1974 to current year. 3:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

3.2 New Report Definition / Report Layout


1. Click on Designer Menu item to open Reporting.
Note: In Hull Design and other Marine modules these functions are available in the Tools
menu.

© Copyright 1974 to current year. 3:3 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

2. Click the New menu item or Toolbar button.

3. Select the path or browse to the location containing the report layout or report definition
in report explorer.

© Copyright 1974 to current year. 3:4 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

4. Select the Report Layout for the report definition.

© Copyright 1974 to current year. 3:5 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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.

© Copyright 1974 to current year. 3:6 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

7. Provide the name and description for the Data Source and click Next.

© Copyright 1974 to current year. 3:7 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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.

© Copyright 1974 to current year. 3:8 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

10. Select the attributes to be included in report for the selected element types and click
Next.

© Copyright 1974 to current year. 3:9 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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.

© Copyright 1974 to current year. 3:10 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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.

3.3 Open Report Definition / Report Layout


1. Click the Open menu item or Toolbar button.

© Copyright 1974 to current year. 3:11 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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.

© Copyright 1974 to current year. 3:12 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

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

© Copyright 1974 to current year. 3:13 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Getting Started with Reporting

d. Apply watermarks etc.

© Copyright 1974 to current year. 3:14 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4 Report Editing Basics

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.

4.1 Back up the Current Layout before Modification


To guarantee that a user will be able to revert a report to its previous state, a backup copy
must be created. The report can then be restored to this state in case something goes
wrong while is being subsequently edited.
To save a copy of a report, select File > Save or press CTRL+S. The report will then be
saved in the application's current folder. The path to a report will be displayed in Reporting's
title bar.

© Copyright 1974 to current year. 4:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

4.2 Manually Update Report Output


Sometimes the user may only need to change a small number of values in the report before
printing it. In these cases, the best way to make these changes may be to export the report
to an editable file (e.g. an RTF file), then use an appropriate editor tool to edit values and
then print the report.
To export a report, click Run Report and use the Export options as shown below.

For more information about exporting reports, see Preview Reports.

4.3 Change Element Layout in a Report


The user can freely move report elements, e.g. labels, by dragging them. Another way to
change the element position is to select an element, and then press the arrow keys.

© Copyright 1974 to current year. 4:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

To select multiple controls, use one of the following methods:


• Click the controls while holding CTRL or SHIFT.
• Click on blank space and drag the mouse to create a selection frame around the
controls. When the mouse button is released, all controls within the selection frame's
boundaries will be selected. In this case, any previous selection is cleared.
Note: For information on how to work with tables, refer to Table.

4.4 Add or Modify Static Information in a Report


Reports display static and dynamic information.
Dynamic information is text or values that are taken from values in a database (actual report
data) or service information (such as current user name or page numbers), and therefore
changes in the report if the source data changes.
Static information is text or images that does not change in this way. For example, general
information in a report header or a page header, or text labels describing data.

© Copyright 1974 to current year. 4:3 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

Change Static Information


To change static information, locate the report element in the designer and display the
element's smart tag. The smart tag will contain a link or a button enabling the user to edit
the element's content.

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.

Add Information to a Report


To add information to a report, select the appropriate element from the Control Toolbox,
such as a Label, Rich Text Box or Picture Box. Once an element has been placed at the
appropriate position, specify its content using the smart tag. For instance, the following
instructions describe how to add a rich text box into a report.
• Drop the Rich Text control from the Toolbox onto the Detail band.

• Select the created control and click its Smart Tag. In the displayed actions list, click the
Load File... context link.

© Copyright 1974 to current year. 4:4 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

4.5 Delete Report Element


To delete a report element (band or control), use one of the following methods:
• Select the element in the Design Panel or Report Explorer, and press DELETE. To
select multiple elements, hold down the SHIFT key while selecting them.
• Select the element or elements then select Edit > Delete from the Main Menu.

• Right-click the report element, and in the Context menu, choose Delete.

Note: To undo a deletion press CTRL+Z.

© Copyright 1974 to current year. 4:5 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4.6 Display Values from a Database (Bind Report


Elements to Data)
Report elements can display dynamic data from a bound database. For example, an
employee list report may need to display birth dates. If a database contains this information,
it can easily be added to the report using one of the methods described below.
Databound elements are indicated in the Reporting by a yellow database icon in their top-
right corners.

Use Field List


• To bind an existing report element to database data, click the required field item in the
Field List window, and then drag and drop it onto the element. The yellow database
icon inside the control will then appear.

• 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.

© Copyright 1974 to current year. 4:6 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

Use Smart Tag


Click an element's Smart Tag, and in the displayed menu, expand the Data Binding
drop-down list and select the required data field.

Use Property Grid


Click an element to show its properties in the Property Grid. Expand the Data Bindings
branch that holds the bindable attributes. Specify a data field for the required attribute (e.g.
Text).

© Copyright 1974 to current year. 4:7 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4.7 Use Mail Merge in Report Elements


Several report elements support the Mail Merge feature. To use this feature, insert field
names surrounded by square brackets into the element's text.

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.

4.8 Change Formatting of Report Elements


To change formatting, locate the element, click its smart tag, and then click the ellipsis next
to Format String.

© Copyright 1974 to current year. 4:8 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

4.9 Change Fonts and Colours of Report Elements


To change the fonts and colours, as well as paddings, text alignment and other appearance
properties of report controller bands, select an element and use one of the following
methods:
• Use the Formatting Toolbar.

© Copyright 1974 to current year. 4:9 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

• Use the Property Grid.


Note: All appearance-related properties are located under the Appearance category.

Note: For more information on customizing the appearance of report elements, refer to
Styles and Conditional Formatting.

4.10 Change or Apply Data Sorting to a Report


To sort a report's data, use a report containing a Label control bound to a CategoryID data
field. This field will be used as a sorting criteria.
• Click a Detail band's Smart Tag. In the displayed menu, locate the Sort Fields section,
and click the ellipsis.
• In the displayed window, click Add to add a new entry, and set the FieldName property
to a data field against which the data is to be sorted. The user can also define a sorting
order (ascending or descending).

© Copyright 1974 to current year. 4:10 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

• To apply the settings and close the window, click OK.


The sorting is now applied to the report. Switch to the Preview tab to view the result.

4.11 Change or Apply Data Filtering to a Report


To filter a report's data, select the report, and in the Property Grid, locate the Filter String
property and click the ellipsis. The FilterString Editor is displayed, enabling the user to
define a required expression.

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.

© Copyright 1974 to current year. 4:11 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4.12 Change or Apply Data Grouping to a Report


Data grouping can be performed only if a report is bound to a data source.
To group records in a report, follow these instructions.
• Add a Group Header band to the report.
Right-click anywhere on the report, and in the displayed Context Menu, point to Insert
Band and click GroupHeader.

• 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.

© Copyright 1974 to current year. 4:12 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

• 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.

• To apply the settings and close the window, click OK.


• Click the GroupHeader band's Smart Tag again, and in the Group Union dropdown
menu, select Whole Page, so that a report group starts on a new page if it does not fit
entirely on the previous one.

The grouping is now applied to the Report. Switch to the Preview tab to view the result.

4.13 Add Totals to a Report


To calculate summaries (totals) within a report, follow these instructions:
• If the Report Footer band is not present in a report, it must be added by right-clicking
anywhere on the report, and in the Context Menu, selecting Insert Band >
ReportFooter.

© Copyright 1974 to current year. 4:13 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

• 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.

© Copyright 1974 to current year. 4:14 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

• To save the settings and close the window, click OK.


Switch to the Preview tab to view the result.

Note: Summary field results cannot be used in calculated fields.

4.14 Create or Modify Watermarks of a Report


To create or modify a watermark, add a text watermark, or turn a picture into a report's
background follow these instructions:

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.

© Copyright 1974 to current year. 4:15 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

• 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.

© Copyright 1974 to current year. 4:16 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

4.15 Add Page Numbers and System Information to a


Report
Page numbers or other system information (e.g. current date and time, user name, etc.) can
be inserted into a report.

© Copyright 1974 to current year. 4:17 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

Follow the instructions below for the following specific tasks:


• Add Page Numbers
• Add System Date and Time
• Add the User Name.
Add Page Numbers
• Select the Page Info control, then in the Property Grid locate the Page Information
property, and display its dropdown list.
There are several options available. Select whether to display only the current page
number (Latin or Roman, uppercase or lowercase) or the current page number and the
of total number of pages.

• Formatting of the control's text can be defined. In the Property Grid, set the Format
property to Page {0} of {1}.

© Copyright 1974 to current year. 4:18 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

Add System Date and Time


• Select the Page Info control, then in the Property Grid, locate the Page Information
property and set it to Current Date and Time.

• Define the formatting of the control's text using its Format property.

The result is shown below.

Add the User Name


• Select the Page Info control, then in the Property Grid, locate the Page Information
property and set it to User Name.

© Copyright 1974 to current year. 4:19 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

Define the formatting of the control's text. In the Property Grid, set the Format property to
Current User: {0}.

The result is shown below.

4.16 Add Calculated Fields to a Report


The main purpose of calculated fields is to perform calculations using data in multiple data
fields. To learn how to perform calculations within a single data field, refer to Add Totals to a
Report.

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.

Note: Summary field results cannot be used in calculated fields.

To add a calculated field to a report, follow the instructions below:


• To create a calculated field, right-click any item in the Field List and choose Add
Calculated Field from the displayed menu.

© Copyright 1974 to current year. 4:20 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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:

© Copyright 1974 to current year. 4:21 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

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.

© Copyright 1974 to current year. 4:22 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

The calculated field is now set up. Switch to the Preview tab to view the result.

4.17 Add Parameters to a Report


Parameters can be used to filter the data in a report or specify a that will be used to
calculate other values (in the latter case, use calculated fields).
To add parameters and filter a report based on their s, follow the steps below:
• In the Field List window, right-click on the Parameters section, and in the displayed
menu, click Add Parameter.

© Copyright 1974 to current year. 4:23 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

Repeat this action to create the second parameter.


• In the Field List, select the first parameter, and in the Property Grid, set its (Name) to
FromDate, Description to From: and Parameter Type to Date Time.
For the second parameter, set these properties as shown in the following image.

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.

© Copyright 1974 to current year. 4:24 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

In this window, define the required expressions for the parameters.


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.

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.

© Copyright 1974 to current year. 4:25 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4.18 Add Arrays to a Report


Reporting does not support the dragging and dropping of an Array field from the Reporting
Field List.
To bind a report control to an Array, place the control on the report as normal, then set the
Data Binding property of the control to that of the Array field.
For example:

© Copyright 1974 to current year. 4:26 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

4.19 Add Project Data to a Report


PDMS project data can be added to a report. Generally such information will be placed in
Header and Footer bands.
To add project data to a report band, drag and drop the Project Info control from the AVEVA
Toolbox onto the band.

© Copyright 1974 to current year. 4:27 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Report Editing Basics

© Copyright 1974 to current year. 4:28 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.1 Basic Operations


Basic Operations covers the basic procedures carried out when working with reports in
Reporting, and consists of the following topics:
• Create a New Report
• Open an Existing Report
• Change Measurement Units for a Report
• Change Page Settings for a Report
• Save a Report.

5.1.1 Create a New Report


To create a new report in the Reporting, in the main menu, click File and then New (or press
CTRL+N). The Main Toolbar contains a button with the same function.

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:

© Copyright 1974 to current year. 5:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

These locations correspond to the following folders:


Product: %PDMSDFLTS%\Data\Reports
Project: %<PRJ>INFO%\Reports
User: %PDMSUSER%\Data\Reports
Select Browse… to look for layout templates in an alternative folder.
Once a folder has been selected, the layout templates in that folder are listed in the Layout
Template tab. Click on a template to view a preview of it.
To select a template and exit the window, click on it and then click Create.
A new report is then created based on the selected template and displayed in the Designer
tab.

5.1.2 Open an Existing Report


To open a report in the Reporting, in the main menu, click File and then Open (or press
CTRL+O). The Main Toolbar contains a button with the same function.

© Copyright 1974 to current year. 5:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

The Open Report window is then displayed:

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:

These locations correspond to the following folders:


Product: %PDMSDFLTS%\Data\Reports
Project: %<PRJ>INFO%\Reports
User: %PDMSUSER%\Data\Reports
Select Browse… to look for reports or templates in an alternative folder.
Once a folder has been selected, the reports or templates in that folder are listed in the
current tab. Click on a report or template to view a preview of it.
To select a report or template and exit the window, click on it and then click Open.
The selected report or template is then opened in the Designer tab.

© Copyright 1974 to current year. 5:3 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.1.3 Change Measurement Units for a Report


Units of measurement are determined by the report's Measure Units property. It defines the
basic measurement unit for all the unit-related properties of the report and its elements
(such as location, size, border width, etc.). It is set to one hundredth of an inch by default.
If required, the user can change the units to a tenth of a millimeter, by setting the Measure
Units property, either using the Property Grid:

... or via the report's Smart Tag:

5.1.4 Change Page Settings for a Report


In Reporting, each page setting of a report can be specified in one of two ways. They can
either be set to use the default printer settings when the report is printed, or use report-
specific printer settings.
• Default Printer Settings
The orientation, margins and paper size can be set to use printer settings instead of the
report's settings. This is useful for reports that could be printed in several places with
different printers and printer settings.
In the example below, the page properties in the Property Grid are set the default
printer settings and are disabled (displayed as greyed out).

© Copyright 1974 to current year. 5:4 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• Specify the Report's Page Settings


Report specific page settings are specified using the Property Grid:

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.

© Copyright 1974 to current year. 5:5 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

To change the measurement units shown in the margins tooltips, customise the report's
Measure Units property.

Measure Units = Hundredths of an Inch

• Modify the Settings in Run Report Window


The Run Report window toolbar (see Print and Export Reports) has an icon that
enables the user to modify the page settings. Clicking this icon displays the Page
Setup window, which allows the user to adjust the page layout before printing or
exporting, and to select the printer.

The margins can also be set visually by dragging the dashed lines in the Run Report
window.

© Copyright 1974 to current year. 5:6 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.1.5 Save a Report


To save a report or template in the Reporting, in the main menu, click File and then Save (or
press CTRL+S). The Main Toolbar contains a button with the same function.
To save a report or template with a different name and/or in a different format, in the main
menu, click File and then Save As....
A standard Windows Save As dialog is then displayed.
As required, enter a new name for the report or template in the File name field.
To save the report or template in a different format, select the required format from the Save
as type drop-down, either Report Definition (.repv) or Layout Template (.repx).

5.2 Bind a Report to Data


The main purpose of Reporting is to create and customise data-aware reports which take
data from an external data source (many types of which are supported), to which the report
is bound, with controls in the report linked to data fields in the data source.
A Report can be bound to data from the PDMS Dabacon project database, or from another
database such as an Access database. A report cannot be bound to both types of database.
Once a data source has been defined, the elements from within that source can be further
restricted by defining a data source scope.
Continue at:
• Bind Report to Dabacon Project Data
• Define Scope within PDMS Data Source

© Copyright 1974 to current year. 5:7 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• Bind Report to Non-Dabacon Data

5.2.1 Bind Report to Dabacon Project Data


To bind a report to the project data, click Data Source on the AVEVA toolbar. The Data
Source Wizard window is displayed.

There are three options:


• Use New to define a new data source
• Use Copy to select an existing data source, editing it if required
• Use Edit to modify the data source of the current report (this option is not available if
the current report does not have a data source defined for it).
Select the required option and click Next.
Continue at:
• Defining a New Data Source
• Copying a Data Source
• Editing a Data Source

© Copyright 1974 to current year. 5:8 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Defining a New Data Source


To define a new data source, start the Data Source Wizard and click New, then Next.
The Properties page of the wizard is then displayed:

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:

© Copyright 1974 to current year. 5:9 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:10 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

© Copyright 1974 to current year. 5:11 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

© Copyright 1974 to current year. 5:12 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

© Copyright 1974 to current year. 5:13 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Click Finish when the data source definition is complete.


The new data source is now available for use in the report. The data source is saved inside
the report. For example:

It may be edited by selecting Edit option of the Data Source Wizard (see Editing a Data
Source).

Copying a Data Source


To create a new data source by copying an existing data source, editing it if required, select
the Copy option of the Data Source Wizard.

© Copyright 1974 to current year. 5:14 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

The Copy Data Source page of the wizard is then displayed:

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

© Copyright 1974 to current year. 5:15 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

Select the data source to be copied and click Next.


The subsequent steps of the wizard are the same those of the New option, as described
above, but with the details of the selected data source populating the wizard so that they
can be edited if required. See Defining a New Data Source for details.

Editing a Data Source


To modify the data source of the current report, select the Edit option of the Data Source
Wizard (this option is not available if the current report does not have a data source defined
for it).

© Copyright 1974 to current year. 5:16 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.2.2 Define Scope within PDMS Data Source


Once a PDMS data source has been defined, the elements from within that source can be
further restricted by defining a data source scope.
Only the elements within the chosen scope will be examined by the data source, and only
those that meet the selection criteria of the data source (Element type(s), filters) will be
returned in the report.
Click Scope on the AVEVA toolbar. The Scope window is displayed.

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

© Copyright 1974 to current year. 5:17 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

© Copyright 1974 to current year. 5:18 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Specify the required volume and click OK.


From the From drop-down list specify whether the scope is to be restricted to elements in
the drawlist or in the obstruction list. Otherwise leave the drop-down set to the default
selection of MDB, meaning that all elements in the database may be in the scope.

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.

5.2.3 Bind Report to Non-Dabacon Data


To bind a report to data from a non-Dabacon, proceed as follows:
• Create a new report.
• To bind the report to data, click its Smart tag. In the displayed actions list, expand the
Data Source dropdown menu and click Add New DataSource.

© Copyright 1974 to current year. 5:19 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:20 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:21 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.3 Report Types


The Report Types provide instructions on how to create reports of different types with
Reporting and consists of the following:
• Static Report
• Table Report
• Master-Detail Report (Detail Report Bands)
• Multi-Column Report
• Cross-Tab Report
• Parameterised Report

© Copyright 1974 to current year. 5:22 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• Chart with Static Series


• Chart with Dynamic Series.

5.3.1 Static Report


A static report is a report that is not be bound to a data source. In the following example, a
one-page announcement will be created which will then be repeated 20 times in a report.
To create a static report, follow the steps.
• Create a new report.
• Drop the Rich Text control from the Toolbox onto the Detail band.

• 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.

© Copyright 1974 to current year. 5:23 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

The static report is now complete. Switch to the Preview tab to view the result.

5.3.2 Table Report


To create a table report, follow these steps:
• Create a new report.
• Bind the report to a data source.
• Add two Table controls, one to the Page Header band and one to the Detail band of
the report.
To do this, click Table in the Toolbox. Then, in the Page Header band's content area,
click and hold down the left mouse button while dragging the mouse cursor across the
Detail band.

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.

© Copyright 1974 to current year. 5:24 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

5.3.3 Master-Detail Report (Detail Report Bands)


To create a master-detail report (report with hierarchically linked data) using the Detail
Report band, follow these steps.
• Create a new report.
• Bind the report to a data source containing a data relationship.

• 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.

© Copyright 1974 to current year. 5:25 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

5.3.4 Multi-Column Report


To create a multi-column report, follow these steps.
• Create a new report.
• Bind the report to a data source.
• Add a Group Header band to a report.
To do this, right-click anywhere on the report, point to Insert Band on the menu that is
then displayed, and click GroupHeader.

© Copyright 1974 to current year. 5:26 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:27 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

5.3.5 Cross-Tab Report


Cross-tab reports are created using a Pivot Grid control, using the following steps.

Create a Pivot Grid and Bind it to Data


• Create a new report.
• Drag a Pivot Grid control from the Toolbox onto the report's Detail band.

• 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.

© Copyright 1974 to current year. 5:28 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

Manage the Grid's Fields


• Click the grid's Smart tag, and in the displayed actions list, click Run Designer. The
Property Editor is displayed.
• In this window, click Retrieve Fields and switch to the Layout section in the navigation
bar on the left.
• Drag and drop the required fields to the Row Fields, Column Fields and Data Items
areas.

© Copyright 1974 to current year. 5:29 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• Click Apply and close the Property Editor.

The cross-tab report is now complete. Switch to the Preview tab to view the result.

5.3.6 Parameterised Report


To create a report with parameters, proceed as follows.
In this example, a report with two parameters of the Date Time type will be created, defining
the time period for data that will appear on the report.
• Create a new report.
• Bind the report to a data source and drop the required fields from the Field List onto
the report's Detail band.
• In the Field List window, right-click on the Parameters section, and in the displayed
menu, click Add Parameter.

© Copyright 1974 to current year. 5:30 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Repeat this action to create the second parameter.


• From the Field List, select the first parameter, and in the Property Grid, set its (Name)
to FromDate, Description to From: and Parameter Type to Date Time.
For the second parameter, set the properties as shown in the following image:

• 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.

In this window, define the expressions required to created the parameters.

© Copyright 1974 to current year. 5:31 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.3.7 Chart with Static Series


To create a report with a Chart control bound to a data source, so that a particular series has
its own data source, proceed as follows.
This example describes how to construct a chart of products and their prices for a chosen
category using the data from the Northwind database (the sample nwind.mdb database).

Note: In this simple example, the series has a single data source. However, different data
sources can be used for different series if required.

• Create a new report.


• Drag the Chart control from the Toolbox onto the report's Detail band.

© Copyright 1974 to current year. 5:32 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:33 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:34 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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:

To save the changes and close the editor, click Close.


Repeat the same actions for Series2, i.e. choose its Data Filters property, add a filter
and define its Column Name.
• To improve a chart's appearance a number of changes can be made, for example:
• Remove the chart's legend, as it shows the same data for the series, select the
legend item in the chart, and in the Property Grid, set its Visible property to No.
• The point labels for Series1 are unnecessary, so select the label and set its Visible
property to No.
• Customise the Series2 marker's appearance. Replace the default circle with the
upside-down triangle by the View.Point Marker Options.Kind property and set its
Size to 12.
• Rotate the X-axis labels for better readability. Click the AxisX item in the chart to
select it, and the adjust properties for its labels (via the Label property). In this
example, setting the Angle property is 20 and the Antialiasing property set to Yes,
improves the appearance of the labels.
It is possible to customise many other properties for the chart, which are not described
here.
The chart is now complete. Switch to the Preview tab to view the result.
For details of another method of binding a chart to data, refer to Chart with Dynamic Series.

© Copyright 1974 to current year. 5:35 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.3.8 Chart with Dynamic Series


To create a report with a Chart control bound to data, in which the all series will be auto-
created using the series template specifying common data binding properties for all series,
proceed as follows.
The data for all series (the series names along with series points' arguments and s) must be
stored in the same data table. Also, the series view type and certain other settings should be
the same for all the created series.
In this example the 'GSP' table of the sample gsp.mdb database will be used. This table
contains the Gross State Product (GSP) statistics for some US regions.

The main steps of the procedure are:


• Create a chart and bind it to data
• Specify a series data member and adjust a series template
• Customise the chart
• View the result

Create a Chart and Bind it to Data


• Create a new report.
• Drag Chart from the Toolbox onto the report's Detail band.

© Copyright 1974 to current year. 5:36 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

Specify a Series Data Member and Adjust a Series Template


In this example, all series will be created using a series template which is common to all of
them.

© Copyright 1974 to current year. 5:37 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• To specify the data field which is to provide data for the series names, the Series Data
Member property must be set.

• Next, set the Argument Data Member property.

• Define the of the Data Members property, specifying the data fields from which the
series obtains the data values of its points.

© Copyright 1974 to current year. 5:38 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Customise the Chart


• Adjust the Series Name Template
By default, the name for every series automatically generated by the chart using its
Series Data Member property's is obtained directly from a data field in the bound data
source. However, it may be necessary to add prefixes or suffixes to these names. The
user may therefore customise the Series Name Template object returned by the
Series Name Template property to add some text to the beginning or to the end of the
series names. For instance, set the Series Name Template.Begin Text property to
GSP in.
• Customise Series Labels
Set the Series Template.Label.Visible property to No, to hide labels for all series
points, and prevent the chart from being crowded with numerous overlapping labels.
• Customise Axis Labels
Initially, all axis labels (which in this example show the names of the US regions) are
lined up and overlap. To avoid this, select the X-Axis (which is also accessed via the
Chart Control.Diagram.Axis X property) and set its Label.Staggered property to Yes.
It is possible to customise many other properties for the chart, which are not described
here.
View the Result
The chart is now complete. Switch to the Preview tab to view the result.

© Copyright 1974 to current year. 5:39 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

For details of another method of binding a chart to data, refer to Chart with Static Series.

5.4 Styles and Conditional Formatting


The appearance of reports is controlled by styles and conditional formatting. For detailed
information refer to:
• Styles Concepts
• Use of Odd and Even Styles
• Store and Restore Style Sheets
• Conditionally Change a Control's Appearance
• Conditionally Hide Bands.
• Conditionally Change a Label's Text

5.4.1 Styles Concepts


Each report element (band and control) and the report itself, has a group of properties
specifying the element's appearance, such as Background Color, Borders, Border Color,
Border Width, Font, Foreground Color, Padding and Text Alignment. By default, these
properties are set to no, meaning that their’s are obtained from their parent element control
or band. In turn, this means that these appearance-related properties, defined for a parent,
are inherited by their child elements.

© Copyright 1974 to current year. 5:40 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

If it is subsequently required to reset a child element’s appearance property to that of the


parent, right-click the property in the Property Grid, and in the displayed menu, click Reset.

© Copyright 1974 to current year. 5:41 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:42 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.4.2 Use of Odd and Even Styles


Use of Odd and Even Styles describes how to create a report using odd and even styles.
For more information on using styles in Reporting, refer to Styles Concepts.
To utilise odd and even styles, follow these steps:
• Create a new report.
• Bind the report to a data source.
• Drag the required fields from the Field List onto the report's Detail band.

© Copyright 1974 to current year. 5:43 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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).

The xrControlStyle1 will be assigned to the Even Style property.


• Expand the Even Style property and set the Background Color property to Beige (or
any other of the properties available in this section as required).

© Copyright 1974 to current year. 5:44 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

5.4.3 Store and Restore Style Sheets


It is possible to store a report's style sheet (containing all the report's styles) in an external
REPSS file and to restore a report's appearance from this file. For more information on

© Copyright 1974 to current year. 5:45 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

using styles in Reporting, refer to Styles Concepts.


To store and restore report style sheets, follow these steps:
• Create a new report.
• Bind the report to a data source.
• Click the report's Smart Tag, and in the displayed actions list, locate the Style Sheet
property and click the ellipsis.

• 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.

© Copyright 1974 to current year. 5:46 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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

© Copyright 1974 to current year. 5:47 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.4.4 Conditionally Change a Control's Appearance


To conditionally change a control's appearance, follow these steps.
For more information on using styles in Reporting, refer to Styles Concepts.
• Create a new report.
• Bind the report to a data source.
• Drag the required fields from the Field List onto the report's Detail band.

• 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.

© Copyright 1974 to current year. 5:48 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

To save the condition and close the window, click OK.


• Now, define the formatting to be applied.

© Copyright 1974 to current year. 5:49 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:50 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.4.5 Conditionally Hide Bands


Bands may be conditionally hidden. In this example the Group Header and Detail bands will
be hidden if a grouping field meets a certain condition.

Note: That no scripts are required to accomplish this task.

• 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.

• 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.

© Copyright 1974 to current year. 5:51 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:52 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

• Construct the required boolean expression to be met (e.g. [ShipCountry] ==


'Argentina'), and click OK.

© Copyright 1974 to current year. 5:53 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Click Close to close the Formatting Rule Sheet Editor.


• In the Formatting Rules Editor, move the rule from the Available Rules list to the
Applied Rules list (using the > button) to apply it to the band.
Repeat this step for the report's Detail band (e.g. click its Formatting Rules property's
ellipsis, and in the window, make the same rule apply to this band, as well). Otherwise,
only the Group Header band will not be displayed when the rule's condition is met,
while the detailed section of this group will still be visible.

Switch to the Preview tab to view the result.


In this example, the Argentina section has not been added to the report as a result of
the conditional formatting.

© Copyright 1974 to current year. 5:54 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.4.6 Conditionally Change a Label's Text


To conditionally format a label's text, follow these steps.
• Create a new report.
• Bind the report to a data source.
• To create a calculated field, in the Field List, right-click any item inside the dataset, and
from the menu, choose Add Calculated Field.

• 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.

© Copyright 1974 to current year. 5:55 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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

© Copyright 1974 to current year. 5:56 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• Add a Cross-Reference

5.5.1 Add Bookmarks


Reports may be created with bookmarks (or a Document Map). The feature enables users
to navigate through the report during its print preview.
To create a report with bookmarks, follow these steps.
• Create a report
• Define bookmarks
• View the Result

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.

© Copyright 1974 to current year. 5:57 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:58 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

View the Result


The report with bookmarks is now complete. Switch to the Preview tab or the Run Report
window to view the result.

© Copyright 1974 to current year. 5:59 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.5.2 Create Hyperlinks


The following example demonstrates how to create a hyperlink in a report.

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.

• Create a new report.


• Drop a label onto the report and change its Text to that which is required for the link.
• In the Property Grid, set its Navigation Target property to the required (either _blank,
_parent, _search, _self, or _top), and for the Navigation URL property, define the URL.

The hyperlink is now ready. Switch to the Preview tab to view the result.

5.5.3 Add a Cross-Reference


Cross-references are links the targets of which are located within the current document and
are used to help navigation through a report.
In this example, a grouped report is created with a link at the bottom of each group, linking
to the beginning of the report.
To create a report with a cross-reference, follow these steps:

• Create a report with grouping.


• To add a Report Header band to the report, right-click anywhere on the report, and on
the Context menu, point to Insert Band and click ReportHeader.

© Copyright 1974 to current year. 5:60 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

• Add a Group Footer band to the report.

• 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.

© Copyright 1974 to current year. 5:61 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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

5.6.1 Handle Events via Scripts


Reporting includes a scripting feature to handle the events of report controls, report bands,
or reports themselves. The basic principles of scripting are described in this topic.

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),

© Copyright 1974 to current year. 5:62 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

© Copyright 1974 to current year. 5:63 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

Example: Custom Summary


In this example, the total number of product unit packs in a group will be displayed.
Execute steps similar to those described in Add Totals to a Report, except that for the
summary field, the Function property should be set to Custom.

© Copyright 1974 to current year. 5:64 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

The additional events must then be added to the label's Scripts property.

Handle these events in the following way:

© Copyright 1974 to current year. 5:65 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Finally, switch to the Preview tab to view the result.

5.6.2 Show the Current Row Index


To show the current row index in a report, follow these instructions.
• Create a new report or open an existing one.
• Bind the report to a data source.
• Drop the required fields from the Field List onto the report's Detail band.

• 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.

© Copyright 1974 to current year. 5:66 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

Next, set the Summary Running option to Report (Group or Page if required) and
click OK.

5.6.3 Count the Number of Records in a Report or a Group


To count the number of records in a report or a group, follow these instructions:
• Create a new report or open an existing one.
• Bind the report to a data source.
• Add a Report Footer band to a report. Right-click anywhere on report and in the
Context menu, point to Insert Band and select ReportFooter.

© Copyright 1974 to current year. 5:67 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:68 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

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.

5.6.4 Cancel Printing If a Report Does Not Contain any Records


To cancel printing when a report does not contain any records, set the Detail band's Print
when Data Source is Empty property to No.
The user can quickly perform this via the band's Smart tag.

© Copyright 1974 to current year. 5:69 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

5.6.5 Limit the Number of Records per Page


The number of records shown in a report can be limited by means of conditional formatting.
In particular, a formatting rule is applied to the Visible property of the Page Break control. In
this example, the number of data rows is passed to the report as a parameter.
To limit the number of records per page, follow these instructions.
• Create a new report or open an existing one. In this example, a data-aware table report
is used as a starting point.

• To add a parameter to the report, in the Field List, right-click the Parameters section,
and in the dropdown menu, choose Add Parameter.

© Copyright 1974 to current year. 5:70 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:71 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• 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.

© Copyright 1974 to current year. 5:72 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

• In this editor, define the following expression for the rule:


([DataSource.CurrentRowIndex] % [Parameters.rowsNumber] == 0) And
([DataSource.CurrentRowIndex] != 0).

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.

© Copyright 1974 to current year. 5:73 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Create Reports

To close the editor, click OK.


The report is now complete. Switch to the Preview tab, and in the Parameters section,
define the required and then click Submit.

© Copyright 1974 to current year. 5:74 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Running Reports from outside of the Reporting

6 Running Reports from outside of the Reporting

Reports can be run from outside of Reporting in three ways. Refer to:
• PML Object
• Search Results Grid - Quick Reports
• Run Report

6.1 PML Object


A PML Object is provided to support batch operation of the reporting tool. This object is
described in the Software Customisation Reference Manual.

6.2 Search Results Grid - Quick Reports


The results of a search may be sent from the Search Results grid to the reporting tool for
formatting. Where you want to use a frequently used Saved Search as the basis for a Quick
Report you may save and re-use the Report Layout you design for use with this Saved
Search.
To use the Quick Reports feature, activate the right-click menu available from any column
heading in the Search Results grid, and select Quick Report.

© Copyright 1974 to current year. 6:1 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Running Reports from outside of the Reporting

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.

© Copyright 1974 to current year. 6:2 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Running Reports from outside of the Reporting

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.

© Copyright 1974 to current year. 6:3 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Running Reports from outside of the Reporting

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:

© Copyright 1974 to current year. 6:4 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Reporting User Guide
Running Reports from outside of the Reporting

6.3 Run Report


Reports created using Reporting may be shared across a project or organisation and run
directly without the need to use Reporting.
The Run Report feature opens the Run Report window. You may navigate to the Product,
Project or User areas or Browse elsewhere to select the report you want to run. A preview of
the Report will be shown.

If the report is parameterised, or a scope needs to be defined, you will be prompted to


provide the information the report requires to run.
The Report output will then be displayed.

© Copyright 1974 to current year. 6:5 12 Series


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.

You might also like