Aveva

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 134

AVEVA Plant

(12.1)

TRAINING GUIDE
Reporting

TM-1004

www.aveva.com
AVEVA Plant (12.1)
Reporting TM-1004

www.aveva.com
© Copyright 1974 to current year. 2
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Revision Log
Date Revision Description of Revision Author Reviewed Approved
06/02/2012 0.1 Issued for Review IS
28/02/2012 0.2 Reviewed IS GE/SB/KB
01/03/2012 1.0 Approved for Training: PDMS 12.1 SP2 IS GE/SB/KB NG

Updates
In general, all headings containing updated or new material will be highlighted. However, highlighting has
not been employed at Revision 1.0 due to the guide being created for the PDMS 12.1 release.

Suggestion / Problems
If you have a suggestion about this manual or the system to which it refers, please report it to AVEVA
Training & Product Support (TPS) at tps@aveva.com

This manual provides documentation relating to products to which you may not have access or which may
not be licensed to you. For further information on which products are licensed to you please refer to your
licence conditions.

Visit our website at http://www.aveva.com

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.

www.aveva.com
© Copyright 1974 to current year. 3
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

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.

www.aveva.com
© Copyright 1974 to current year. 4
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
Contents

1 Introduction .............................................................................................................................................. 7
1.1 Aim..................................................................................................................................................... 7
1.2 Objectives ......................................................................................................................................... 7
1.3 Prerequisites .................................................................................................................................... 8
1.4 Course Structure .............................................................................................................................. 8
1.5 Using this guide ............................................................................................................................... 8
1.6 Entering a PDMS Design Session .................................................................................................. 8
2 Standard Reporting - Quick Reports ..................................................................................................... 9
2.1 Creating a Quick Report .................................................................................................................. 9
2.1.1 The Create a Quick Report form ................................................................................................ 9
2.1.2 Running the Report .................................................................................................................. 11
2.1.3 Creating a Quick Report (Worked Example) ............................................................................ 11
Exercise 1 Standard Reporting - Quick Reports .................................................................................... 13
3 Standard Reporting - Report Templates.............................................................................................. 15
3.1 Creating a New Report Template .................................................................................................. 16
3.1.1 Destination ............................................................................................................................... 16
3.1.2 Selection ................................................................................................................................... 17
3.1.3 Columns ................................................................................................................................... 22
3.1.4 Running a System Command .................................................................................................. 26
3.1.5 Creating a Report Template (Worked Example) ...................................................................... 27
3.2 Modifying a Report Template ........................................................................................................ 34
3.2.1 Subtotals and Totals ................................................................................................................ 34
3.2.2 Runtime Prompts...................................................................................................................... 35
3.2.3 Other Formats .......................................................................................................................... 36
3.2.4 Page Info Options..................................................................................................................... 36
3.2.5 Modifying a Report A Worked Example .................................................................................. 39
Exercise 2 Standard Reporting - Report Templates .............................................................................. 43
4 Report Designer Overview .................................................................................................................... 44
4.1 Accessing Report Designer .......................................................................................................... 44
4.2 Report Designer User Interface .................................................................................................... 45
4.2.1 Designer Mode ......................................................................................................................... 46
4.2.2 Preview Mode........................................................................................................................... 47
4.3 Printing & Exporting Reports ....................................................................................................... 48
4.4 Report Designer Workflow ............................................................................................................ 49
5 Report Designer – Report Creation ...................................................................................................... 51
5.1 Creating a New Report - A Worked Example ............................................................................. 51
5.1.1 Saving the Report..................................................................................................................... 52
5.2 Report Data Source........................................................................................................................ 52
5.2.1 New Data Source from Individual Queries ............................................................................... 53
5.2.2 Pre-defined Data Source from Stored Queries ........................................................................ 53
5.3 Data Source Wizard ....................................................................................................................... 53
5.3.1 Data Source Wizard: Defining a New Data Source ................................................................. 54
5.3.2 Data Source Wizard: Copying a Data Source - A Worked Example ....................................... 60
5.4 Populating the Report Canvas ...................................................................................................... 64
5.4.1 Report Bands ........................................................................................................................... 64
5.4.2 Adding Data Fields to a Report - A Worked Example .............................................................. 65
5.4.3 Adding Column Headings (Worked Example) ......................................................................... 69
5.4.4 Formatting Styles & the Report Explorer ................................................................................. 71
5.4.5 Changing the Label Size .......................................................................................................... 73
Exercise 3 Report Designer - Additional Fields & Formatting ............................................................. 74
6 Report Designer - Advanced Formatting............................................................................................. 75
6.1 Adding Borders - A Worked Example .......................................................................................... 75
Exercise 4 Report Designer - Formatting a Report ............................................................................... 78
6.2 Rule based Formatting - A Worked Example .............................................................................. 78
6.2.1 Adding Styles to the Style Sheet .............................................................................................. 78
6.2.2 Applying Styles from the Style Sheet ....................................................................................... 80
6.3 Defining Formatting Rules – A Worked Example ....................................................................... 81
6.3.1 Creating a Formatting Rule ...................................................................................................... 81
6.3.2 Assigning a Formatting Rule to a Control ................................................................................ 84
© Copyright 1974 to current year. 5
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.4 Calculated Fields - A Worked Example ...................................................................................... 85


6.4.1 Calculated Fields – Units Conversion ...................................................................................... 86
6.4.2 Calculated Fields – Using String Functions ............................................................................. 89
Exercise 5 Report Designer - Calculated fields ..................................................................................... 93
6.5 Sorting & Grouping – A Worked Example ................................................................................... 94
6.5.1 Defining a Group ...................................................................................................................... 94
6.5.2 Defining a Sort.......................................................................................................................... 97
6.6 Final Formatting Tasks (Worked Example) ................................................................................. 99
6.6.1 Project Info Control................................................................................................................... 99
6.6.3 Page Numbering .................................................................................................................... 101
6.6.4 Adding the Date and Time ..................................................................................................... 101
6.7 Setting the Scope of the Report – A Worked Example ............................................................ 102
6.7.1 Setting the Scope ................................................................................................................... 104
6.8 Reporting via Charts – A Worked Example ............................................................................... 105
6.8.1 Chart Wizard: Adding a Chart ................................................................................................ 105
6.9 Summarising Report Data - A Worked Example ....................................................................... 114
Exercise 6 Report Designer - Summarising Structural Steel Report ................................................. 118
Exercise 7 Report Designer – Branch Members Report ..................................................................... 118
7 Report Designer - Quick Reports ....................................................................................................... 119
7.1 Creating a Quick Report from Search Results .......................................................................... 119
7.1.3 Running the Search ............................................................................................................... 122
7.1.4 Create Quick Report .............................................................................................................. 123
7.1.5 Creating a Quick Report – A Worked Example...................................................................... 124
Exercise 8 Report Designer - Quick Reports ....................................................................................... 130
8 Report Designer - Running a Report ................................................................................................. 131
8.1 Running a Report A Worked Example ...................................................................................... 131
Exercise 9 Report Designer - Quick Reports ....................................................................................... 134

www.aveva.com
© Copyright 1974 to current year. 6
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 1

1 Introduction

The PDMS databases hold a large amount of data regarding the Plant that is being modelled. This data
may be extracted from the databases as graphical information, i.e. drawings; interface information, i.e. for
pipe stressing; structural analysis and structural detailing; or in textual form, i.e. for reports, material take-
off/bill of materials (MTO/BOM), weights and centre of gravities, etc.

PDMS provides two styles of reporting:

 Standard Reporting - used for creating reports that are textual

 Report Designer - enables users to easily produce high-quality deliverable style reports in
various output formats, including CSV, PDF, and MHTML. These reports can include images i.e.
Company Logos, information displayed as charts, information based colouring, and include
headers and footers.

1.1 Aim

The aim of this training module is to introduce the Reporting facilities that exist within AVEVA Plant Design,
to enable the User to choose a reporting methodology that complements project requirements and best
represents the model data.

1.2 Objectives

Through the completion of the training, the Trainee will have sufficient knowledge to complete the following
tasks:

 Understand the basic concepts of reporting using Standard and Designer Reporting.

 Enable a User to create and run Quick Reports based on Standard Reporting facilities.

 Enable a User to produce templates for Standard Reporting.

 Run and Modify existing Standard Reporting templates.

 Enable a User to create and run Report Designer Quick Reports based on search results.

 Allow the User to set the reporting criteria based on Hierarchy or Volumes.

 Explain the principles of Filtering, Sorting, Grouping, Sub-totalling and Totals.

 Introduce some of the formatting that is available in Report Designer.

 Explain and implement calculated fields.

 Use Charts to display data on reports.

 Create summaries of reported data.

 Be able to create deliverable reports using Report Designer.

© Copyright 1974 to current year. 7


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

1.3 Prerequisites

Trainees must have attended the TM-1001 AVEVA PDMS Foundations course and be familiar with Microsoft
Windows.

1.4 Course Structure

Training will consist of oral and visual presentations, demonstrations and set exercises.

Each workstation will have a training project, populated with model objects. This will be used by the trainees
to practice their methods, and complete the set exercises.

1.5 Using this guide

Certain text styles are used to indicate special situations throughout this document:

 Menu pull downs and button press actions are indicated by bold dark turquoise text.

 Information the user has to key-in indicated by bold red text.

Supplementary information or guidance notes will be distinguished by a turquoise information symbol and
accompanying text:

 Additional information

References to other training guides/sections and documents will be distinguished by a book symbol and
accompanying text:

 Refer to other documentation

System prompts will be displayed in inverted commas using italicised bold text e.g. 'Choose function'.

Example files or inputs will be in the courier new font, utilising colours and styles outlined above where
appropriate.

1.6 Entering a PDMS Design Session

Login to PDMS using the details provided by the Trainer, for example:

Project Training

Username A.PIPER (A.PIPER)

Password A

MDB A-PIPING

Click the Login button

www.aveva.com
© Copyright 1974 to current year. 8
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 2

2 Standard Reporting - Quick Reports

PDMS provides two methods for creating Standard Reports:

 Quick Reports - created ‘on the fly’ and last for the current session.

 Report Templates - a template of the report is created that may be re-used in any session.

 See Chapter 3 for detailed information on the use of Report Templates.

The Standard Reporting method for creating reports is available within the PDMS Design, Draft and Paragon
modules

 For further information refer to the Standard Reporting Reference Manual, that is available as part of
the PDMS On-Line Help.

2.1 Creating a Quick Report

Selecting Utilities > Standard Reporting > Quick Reports… from the main menu displays the Create a
Quick Report form.

2.1.1 The Create a Quick Report form

The form contains textboxes that enable the User to specify the output destination, which element types will
be included in the report, the report contents and the places to search for the element types.

The textboxes are detailed in the following sections.

2.1.1.1 File

The File textbox enables a path name and filename to be specified for the report destination in the format
<pathname>\<filename>.

 By default if no pathname is entered, the file will be created in the %PDMSUSER%

Checking the Term checkbox sends the report output to the Command Window, if open, or to an AVEVA
PDMS Design Command Output window, which opens automatically if the Command Window is not open.

© Copyright 1974 to current year. 9


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

2.1.1.2 Types

The Types textbox may contain any valid PDMS element type, e.g. SITE, ZONE, PIPE, BRAN, ELBO,
VALV, FRMW, SBFR, SCTN, GENSEC, EQUI, etc. that will form the basis of the data produced in the
report.

More than one element type may be specified in the textbox separated by a space.

 Consideration should be given when entering multiple element types, to the attributes that will be used
in the report. Element types that have few attributes in common may, depending on the attributes
used, have many ‘null’ text column entries.

The reserved word MEMBERS may be used in conjunction with different element types. For example,
entering BRAN MEMBERS will report on all of the members of a Branch, e.g. ELBO, TEE, VALV, GASK,
FLAN, etc.

2.1.1.3 With

The With textbox is a filter to further refine the element types to be used in the report. If left blank, all
elements of the specified types will be reported.

The With textbox may contain any valid PDMS expression, for example:

Element Type(s) With syntax Elements Reported

PIPE PSPEC EQ /A3B Pipes with a Pipe Spec. of /A3B.

Branches with Head Bore greater or equal


BRAN HBOR GE 100
to 100 NB.

Branch members where the Head Bore of


BRAN HBOR OF BRAN GT 100 AND HBOR
the Branch is greater than 100 NB but
MEMBERS OF BRAN LT 200
less than 200 NB.

Sections with a Specification Reference of


SCTN SPREF EQ /DIN-SPEC/HE300A
DIN Spec HE300A.

PANE MATREF EQ /A36 Panels with a Material Reference of /A36

All Equipment whose Function is not


EQUI FUNC NE ‘FUTURE’
equal to FUTURE.

All Equipment where the UDA :MANUF


:MANUF EQ ‘Best Pumps Inc.’ OR
EQUI (Manufacturer) is either Best Pumps Inc.
:MANUF EQ ‘Better Pumps Ltd.’
or Better Pumps Ltd.

www.aveva.com
© Copyright 1974 to current year. 10
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

2.1.1.4 Columns

The Columns textbox is where the PDMS attributes, pseudo-attributes or UDAs are specified. Each
attribute forms a column in the report, in which the attribute for each element specified in Types, and filtered
by With, is output.

Multiple attributes must be space separated. A column may be a valid expression, for example
(SUBS(FULLNAME, 2)) which will return the elements full name starting at character 2.

The attribute or expression text will form the column header.

2.1.1.5 Hierarchy

The Hierarchy textbox enables the elements to search for the specified Types to be defined. A named
element may be specified, e.g. /SITE-PIPING-AREA01, by entering the name in the textbox. Multiple
named elements may be entered but must be space separated. The report will look for the specified
element type(s) below the named element(s)

The World may be specified by entering /* or World. Leaving the textbox blank will also use the World as
the starting point.

CE may be entered in the textbox so that the report will start at the current element, whatever that may be.

2.1.2 Running the Report

Clicking the Apply button runs the report and outputs it to the specified location.

2.1.3 Creating a Quick Report (Worked Example)

In the worked example a simple report of the pipe branches in the ZONE /ZONE-PIPING-AREA01 will be
produced. The report will be modified to show only branches of specific bore sizes.

Select Utilities > Standard Reporting > Quick Reports… from the main menu to display the Create a
Quick Report form.

Check the Term checkbox and enter BRAN in the Type textbox.

Enter HBORE GE 100 in the With textbox. This will only include those branches in the report whose head
bore is greater or equal to 100mm.

In the Columns textbox enter NAME PSPEC HBORE HCON HPOS TBORE TCON TPOS CLLE, i.e. name,
pipe specification, head bore head connection, head position, tail bore, tail connection, tail position and
centreline length.

In the Hierarchy textbox enter /ZONE-PIPING-AREA01, i.e. the name of the Stabilizer ZONE containing the
pipes.

The Create a Quick Report form


should now look like this:

www.aveva.com
© Copyright 1974 to current year. 11
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Click the Apply button to output the report to the Command Window (if open) or the AVEVA PDMS
Command Output form and check the output.

 The report will not be formatted correctly, i.e. in regular columns, as the Command Window uses a
kerned font, i.e. the character spacing is not equal.

Uncheck the Term checkbox and enter Branches.txt in the File textbox.

Click the Apply button to run the report.

 The file can be located in C:\AVEVA\PLANT\Data<Version>\pdmsuser

Use Windows Explorer to navigate to the file and open it using Notepad or Wordpad. The results should
look like this:

Change the With textbox entry to HBORE LT 100. This will only include those branches in the report whose
head bore is less than 100mm.

Click the Apply button again and check the results in the editor, before clicking the Dismiss button on the
Create a Quick Report form.
www.aveva.com
© Copyright 1974 to current year. 12
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 1 Standard Reporting - Quick Reports

Using Chapter 1 as guide, complete the following tasks:

 Create a quick report for all nozzles of the equipment in the ZONE /ZONE-EQUIPMENT-
AREA01 of the Training Project. The report must include its owners name, the nozzle name, the
nozzle nominal bore, the nozzle position and orientation and the connection reference, if any.

 Syntax for a nozzle nominal bore is ( P1 BORE ), and the owners name is (NAME OF
OWNER), in both cases you must include the brackets, to separate the commands.

 Output the report to the Command Window and then to a file named Nozzles.txt.

 Use the With textbox to report only nozzles with a nominal bore of 100mm or greater.
Output the report to a file named Nozzles.txt.

www.aveva.com
© Copyright 1974 to current year. 13
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

www.aveva.com
© Copyright 1974 to current year. 14
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 3

3 Standard Reporting - Report Templates

Reports that are required to be run regularly or standard reports that are used from project to project may be
run from a saved Report Template.

Report Templates offer improved reporting features compared to Quick Reports, for example:

 Improved formatting options.

 Sub-totals and totals may be added to the report.

 Data may be sorted on one or several reporting columns.

 Units may be specified for numeric columns and headers.

 Report footers and summaries may be added.

 Reports Templates may be output in comma separated value (.csv) format.

Selecting Utilities > Standard Reporting > Reports from the main menu displays a sub-menu with the
following options:

 Run…
Displays the Run Report… file browser that enables the User to select a previously defined
Report to run.

By default, the browser opens in the directory specified by the % PDMSREPDIR% environment
variable and is usually located at <pdms_installed_dir>\pdmsui\reports where
<pdms_installed_dir> is the PDMS installed directory.

 Create…
Displays the New Report Template form - see Section 3.2.1 for details of how to use this form.

 Modify…
Displays the Modify Report… file browser that enables the User to select a previously defined
Report to modify.

Once the template has been selected, clicking the Open button on the file browser opens the
Modify Report Template form. This form is the same as the New Report Template form but is
pre-populated with the selected template’s definition.

 Delete…
Displays the Delete Report… file browser that enables the User to select a previously defined
report to delete.

Once the template has been selected, clicking the Open button on the file browser displays a
confirmation message prior to deleting the file.

© Copyright 1974 to current year. 15


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.1 Creating a New Report Template

The New Report Template form is divided into three areas which, set the Destination for the report; set the
Selection of the element types, filter criteria and report start point; define the report Columns. The three
areas are detailed in the following sections.

3.1.1 Destination

The Destination area of the form contains radio buttons to set the destination of the report and, if written to
a file, how the file is to be handled.

Selecting the Screen radio button will write the report to the Command Window, if open, or to an AVEVA
PDMS Design Command Output window, which opens automatically if the Command Window is not open.

Selecting the Overwrite radio button will write to the report to the filename specified in the Filename
textbox. If the file does not exist, it is created. If the file does exist it will be overwritten with no warning.

Selecting the New radio button will write the report to the
filename specified in the Filename textbox. If the file does
not exist, it is created. If the file does exist a confirmation
message is displayed.

Clicking the Yes button overwrites the existing file and


clicking the No button aborts the writing of the report. www.aveva.com
© Copyright 1974 to current year. 16
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Selecting the Append radio button will write the report to the filename specified in the Filename textbox. If
the file does not exist, it is created. If the file does exist it is opened and the Report appended to the file.

The destination pathname and filename are entered into the Filename textbox.

If the report destination is a file and there is no filename in the Filename textbox
the following error is displayed:

If the User does not have write access to the destination pathname to create a file, a suitable warning
message is displayed.

3.1.2 Selection

The Selection area of the New Report Template form enables the contents and scope of the report to be
specified. It contains Type(s) and With textboxes that function in the same way as described for Quick
Reports, as well as a Hierarchy textbox and button.

Clicking the Hierarchy… button displays the Hierarchy form.

The form list displays any elements that are specified to be included in
the report. The WORLD is the default element.

Clicking the Add CE button adds the current element to the list.

Clicking the Remove button removes the highlighted element from the
list.

Any elements entered in the hierarchy list will override any options set
in the Volume or From options lists.

3.1.2.1 Using the Volume Options

The Volume options list enables a Report Volume to be specified


and has the following options:

 Off this option turns the use of a Report Volume off.

 Completely Within… specifying this option requires that any elements of the specified type(s)
found must lie completely within the Report Volume.
www.aveva.com
© Copyright 1974 to current year. 17
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 Partially Within… specifying this option requires that any elements of the specified type(s) found
may lie only partially within the Report Volume.

Selecting either the Completely Within… or Partially Within… option displays the Report Volume form.

Co-ordinates for opposing corners of the Report Volume box may be


entered in the appropriate From: and to: textboxes.

Alternatively, options from the form menus may be used to determine


the Report Volume co-ordinates.

The From and to co-ordinates are auto-filled on the Report Volume


form and may be manually adjusted, if required.

The form menu has the following options:

 Report Volume form - General menu

The General menu has the following options:

 CE - this option sets the Report Volume to the limits of the CE.

 Clear CE - this option sets the Report Volume to the limits of the CE plus a small clearance.

 Owner - this option sets the Report Volume to the limits of the owner of the CE.

All options show a limits box, in the Aids colour, around the Report Volume and display the co-ordinates in
the appropriate From and To textboxes.

 Report Volume form - Cursor menu

The Cursor menu has the following options to define the opposing corners of the Report Volume:

 Elements – this option prompts for the identification of two elements by using the cursor.
Having selected two elements, pressing the Esc key ends the selection. The volume is determined
using the origins of the selected elements.

 Design Points – this option prompts for the selection of Design Points, e.g. Ppoints, Pane
vertices, construction pin, etc., using the cursor. Having selected two Design Points, pressing the
Esc key ends the selection

 Plines – this option prompts for the selection of Plines by using the cursor. Having selected
two Plines, pressing the Esc key ends the selection. The volume is determined using the start
points of the selected Plines.

 3D Picks – this option prompts for 3D Positions to be picked, using the cursor. Essentially,
four 3D positions must be identified, two for each opposing corner of the volume. The view
direction of the 3D view must be orthogonal. To assist in the selection, the viewing direction
changes automatically after the first and third picks to a direction perpendicular to that at which
these picks were made.

www.aveva.com
© Copyright 1974 to current year. 18
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The view direction changes back to the original direction after the second and fourth picks, for
example:

Plan View – First 3D Position Pick East View – Second 3D Position Pick

Plan View – Third 3D Position Pick East View – Fourth 3D Position Pick

The resultant volume would be similar to:

www.aveva.com
© Copyright 1974 to current year. 19
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

If the 3D positions are picked in a non-orthogonal view an


Error message is displayed.

 2D Picks – this option prompts for 2D positions to be picked from an orthogonal view. Two
points are required, one for each opposing corner of the volume. Two of the co-ordinates for each
point are derived from the 2D pick and the co-ordinate is derived from the current working plane.

If the 2D positions are picked in a non-orthogonal view an


Error message is displayed.

 Report Volume form - Intersections menu

Points for the opposing corners of the Report Volume may be specified as being at the intersection of two
directional design items picked from the 3D view.

The Intersections form menu has the following options to define the opposing corners of the Report Volume

 Grid Lines… - this option displays the Volume from Grid form:

The form works in conjunction with


rectangular User Grid Systems and
displays any currently defined rectangular
grids in the Grid Systems area of the form.

Selecting a Grid System changes the


settings in the Limits From and To areas of
the form to reflect the values of the current
grid and places a ‘bounding box’ around the
entire volume of the grid in the 3D view.

The From and To co-ordinates may be specified by selecting a gridline from the grid axes options
lists. The selected point will be at the intersection of the specified grid lines. The position may be
refined by entering a +ve or –ve value in the +/- textboxes adjacent to the grid axes options lists to
modify the point by the specified distance along the specified axis.

Alternatively, the Pick buttons may be used to specify a From or To point graphically using the
grid.

Clicking the buttons activates the Positioning Control toolbar; however, to select a position
graphically the required grid must be displayed using the User Grid Systems form.

www.aveva.com
© Copyright 1974 to current year. 20
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 Element – this option has a sub-menu that enables two directional elements to be selected
whose intersection will define the point. The Design Point and Pline options have similar sub-
menus.

Design Points have a direction as well as a position


and, therefore, can be considered as to represent
lines for this purpose.

If the picked items lie in different planes so they do


not actually intersect, the derived point will be at the
intersection of the projection of the second item
onto the first.

3.1.2.2 Using the From Options

The From options list enables elements to be selected from different sources. If
the Hierarchy list is empty and no volume is specified the following options are
available:

 MDB – this option selects elements of the specified type in all databases of the current
MDB.

 Drawlist – this option selects all elements of the specified type that are in the Drawlist.

 Obstruction List - this option selects all elements of the specified type that are in the
Obstruction List.

 Emptying the hierarchy list and entering CE in the Hierarchy textbox specifies that only members of
the CE will be reported.

www.aveva.com
© Copyright 1974 to current year. 21
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.1.3 Columns

Every report consists of a number of columns that contain data for the selected element types(s). The
Columns area of the New Report Template form enables the columns to be specified together with their
layout, sorting, display units, sub-totalling and totalling.

The listed columns can be selected and the four buttons, for creating, modifying, moving and deleting
columns utilised depending on the requirement. Their use is detailed in the following sections.

3.1.3.1 Creating New Columns

Clicking the New… button on the New Report Template form displays the Creating Column form.

A valid attribute, pseudo attribute or expression


for the selected element type(s) may be entered
in the Expression textbox.

The expression may contain mathematical and


string manipulation operators.

The Sorting options list contains different sorting methods for


alphanumeric and numerical column content.

The report may be sorted on more than one column. If sorting is


specified for a column it is given a Precedence number which
determines the order in which the columns will be sorted, i.e. 1 being the
first column to be sorted, 2 the second column to be sorted, etc.

The sorting precedence will appear in the Precedence options list. If the report is sorted on more than one
column, the precedence may be modified by selecting a different precedence number from the options list.

The Units options list contains different unit options, both metric and
imperial, for length, area and volume.

The Any/mm units may be used for any other measurement unit, e.g.
weight, the values for which will be in kilograms.

Alphanumeric columns do not require units to be set.


www.aveva.com
© Copyright 1974 to current year. 22
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Clicking the Column Layout… button displays the


Layout for Column <n> form, where <n> is the
sequential number of the column in the Columns list.

The form has four main areas where different aspects of the column layout may be specified.

 Layout area

The Spaces before column textbox enables the number of spaces before the column contents are
displayed to be specified. The default is 2.

The Column Width textbox enables a number of characters for the column width to be specified. If the
column entry is longer than the column width it will be truncated at the specified number of characters.

Leaving the Column Width textbox blank (the default) sets the column width to the longest column entry in
the report is used as the column width.

The Justify options list enables the column entry to be Left, Right or Centre justified.

By default, alphanumeric columns are left justified and numeric columns are right justified.

 Numeric Display area

www.aveva.com
© Copyright 1974 to current year. 23
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Numeric Display area enables the formatting of numeric columns to be specified. The values may be
output as Decimal or Fractions by selecting the appropriate radio button.

If Decimal is selected the Decimal Places textbox enables the number of decimal places to be specified.
The default is 2.

If Fraction is selected the Denominator textbox enables the denominator for the fraction may be specified.
The default is 64.

The Style options list has two choices that enable the formatting of feet and inch output to be specified:

 US – this option formats feet and inch output as 12'- 5 11/16".

 PDMS – this option formats feet and inch output as 12'05.11/16.

The default setting is US.

The Leading Zeroes options list enables leading zeroes for the output to be On (the default) or Off.

 Text Display area

The Text Display area enables unset text and column headings to be specified.

A text string may be entered in the Unset Text textbox. This string will be displayed whenever a column
value is unset. The textbox is blank by default.

The Headings options list enables column headings to be set On, Off or by Page. The Page option is used
in conjunction with PageInfo options, see section 3.2.4.

The Heading Text radio buttons enable the type of heading text to be specified. The following options may
be selected:

 Expression Text – this option uses the expression text entered in the Expression textbox
on the Creating Column form.

 Default – this option uses the PDMS attribute name, where possible. This may be the same
as the expression text.

 Custom – this option enables multiple lines of text to be entered in the activated Custom
text textbox.

 Values, Totals and Subtotals


www.aveva.com
© Copyright 1974 to current year. 24
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

At the bottom of the form three options lists may be used to specify how the values of the columns will be
displayed.

The Values options list has the following options:

 On – this option displays the column expression for each element included in the scope of
the report.

 Off – this option displays no values for the column.

 Sub – this option displays a value only when a subtotal is created.

 1st – this option is only available if the column is sorted and enables only the first instance
of the column expression value to be displayed until the value changes.

The default value is On.

The Totals options list has two options, On and Off (the default). If set to On numeric columns will be
totalled at the bottom of the report. Totalling has no affect on alphanumeric columns.

The Subtotals options list has a variable amount of entries depending on how many columns are sorted.
The default value is Off, i.e. no subtotals will be displayed. Subtotalling has no effect on alphanumeric
columns.

See section 3.2.1 for details of subtotals and totals.

Clicking the OK button on the Layout for Column <n> form saves the column layout settings. Clicking OK
on the Creating Column form saves the column details and displays it in the list on the Create New
Template form.

3.1.3.2 Modifying Columns

Selecting a column in the list and clicking the Modify… button on the New Report Template form displays
the Modifying Column <n> form, where <n> is the column number.

The form is identical in functionality


to the Creating Column form
described earlier and all aspects of
the column definition may be
modified.

The Previous Column and Next Column buttons may be used to navigate between the columns

3.1.3.3 Moving Columns

Selecting a column in the list and clicking the Move… button on the New Report Template form displays
the Move Column form. www.aveva.com
© Copyright 1974 to current year. 25
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The current column number is displayed and the To options


list displays the column numbers. Selecting a column number
from the options list re-orders the columns with the current
column in the selected location.

3.1.3.4 Deleting Columns

Selecting a column in the list and clicking the Delete button displays a confirmation message.

Clicking the Yes button deletes the column and clicking the No
button retains the column.

 If columns are deleted, any custom column headings should be checked to make sure they remain as
specified.

3.1.4 Running a System Command

The System Command text box on the New Report Template form enables a system command to be
entered that will be run when the report has been completed.

For example, this option could be used to send the report output to a printer, to open another program to
display the report or to run a macro to process the report.

The command is entered as an expression in single quotes. Other programs executable that are called
must be in the search path or their search path must be explicitly given. Filenames passed as arguments
must also have their full paths given unless they are in the search path.

If the System Command is complex a batch file may be called to execute the commands.

www.aveva.com
© Copyright 1974 to current year. 26
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.1.5 Creating a Report Template (Worked Example)

This worked example creates a simple report of quantities of piping components in the AVEVA Plant
Training project.

3.1.5.1 Creating the Report

Select Utilities > Standard Reporting > Reports > Create… from the main menu to display the New
Report Template form

Leave the Destination set to Screen.

Enter BRAN MEMBERS in the Type(s) textbox and press the Return key.

 MEMBERS is a key word in reporting. It means that the members of the preceding element will be
reported, not the element type.

Click the Hierarchy… button on the New Report Template form to display the Hierarchy form.

If World is listed, select WORLD in the list and click the Remove
button to empty the list.

Click the OK button to set an empty hierarchy list and dismiss the
form.

On the New Report Template form enter CE in the Hierarchy textbox and press the Return key.

In the Column section of the New Report Template form, select the <end> entry to highlight it and click
the New… button at the bottom of the form to display the Creating Column form.

Enter TYPE in the Expression


textbox. This will display the Type
attribute of the elements.

Select A to Z (Ignore Case) from


the Sorting options list. This will
sort this column in ascending
alphanumeric order, ignoring the
case of the text.

Note that a 1 is displayed in the Precedence options list - the report will be sorted on this column first.
www.aveva.com
© Copyright 1974 to current year. 27
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Click the OK button on the Creating Column form.

The TYPE column is displayed in the list at the bottom of the New Report Template form:

Select the <end> entry in the list again and click the New… button to display the Creating Column form.

Enter DTXR in the Expression textbox and select A to Z (Ignore Case) from the Sorting options list. The
Precedence options list will be set to 2 automatically. Click the OK button on the Creating Column form
and note that the new column is added to the list on the New Report Template form.

Repeat the procedure to create three more columns, entering MTXX, ITLE and QUANTITY respectively in
the Expression textbox. Leave the Sorting set to Off for these columns and for the ITLE column select
Any/mm from the Units option list.

None of the new columns need to be sorted.

The New Report Template form should now resemble the following:

Note that the sort precedence is shown in the list after the expression.

www.aveva.com
© Copyright 1974 to current year. 28
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 The expressions used are:


 DTXR is a pseudo attribute for the S text of an STDE element.
 MTXX is a pseudo attribute for the X Text of an SMTE element.
 ITLE is a pseudo attribute for the implied tube centreline length
 QUANTITY is a keyword and is usually used in conjunction with subtotalling and totalling.

3.1.5.2 Running the Report

Close the Command Window, if open, and navigate to the ZONE /ZONE-PIPING-AREA01 in the SITE
/SITE-PIPING-AREA01.

Make the Pipe /150-A-3 the CE and click the Apply button on the New Report Template form.

An AVEVA PDMS Design Command Output form


opens and displays the report.

 The columns are not aligned because the form


uses a kerned font.

In the Destination area of the form click the New radio button and enter Branch_Members.txt in the
Filename textbox.

Click the Apply button on the New Report Template form again. This time the report is sent to the
specified filename and not to the screen. Locate the file in Windows Explorer and open it with a suitable
editor.

The report should be as follows:

 Note that the ITLE attribute is only applied to the TUBI (tubing). This is an example of using attributes
that do not occur on every element type that the report may contain.

3.1.5.3 Adding Additional Columns

The report does not show the nominal bore of the piping components. As reducing components will have a
different arrive and leave bore, two additional columns are required to show these values. The columns will
be sorted numerically and will be the highest precedence.
www.aveva.com
© Copyright 1974 to current year. 29
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

On the New Template Report form, select the MTXX entry in the column list. The new columns will be
placed before this attribute.

Click the New… button to display the Creating Column form. Enter ABOR in the Expression textbox and
select 0 to 9 in the Sorting options list. Select Any/mm from the Units options list.

Click the OK button on the Creating Column form.

With MTXX selected in the list, repeat the


procedure using an expression of LBOR, a 0 to
9 sort and Any/mm units.

3.1.5.4 Modifying the Sort Precedence

Select the ABOR column form the list and click the Modify… button to display the Modifying Column 3
form.

Open the Precedence options list, select 1 and click the OK button on the Modifying Column 3 form. The
sort precedence of the ABOR column is now 1.

Repeat for the LBOR column, setting the


precedence to 2.

Select the Screen radio button from the Destination area and click the Apply button on the New Report
Template form to re-run the report. Note the change in the report format due to the change in sort
precedence.

In the Destination area of the form click Overwrite, and click the Apply button again. Locate the file in
Windows Explorer and open it with a suitable editor. The report should look like this:

www.aveva.com
© Copyright 1974 to current year. 30
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Sorting the report on type and detail text, before arrive and leave bore makes the report easier to read. To
this end, change the precedence of the TYPE and DTXR columns to 1 and 2 respectively thereby setting
ABOR and LBOR to 3 and 4 respectively.

3.1.5.5 Formatting the Columns

Having created the columns and specified the sorting precedence, the columns may be formatted so that the
desired appearance of the report is achieved. This may include changing the spaces between columns,
fixing the column width, specifying the number of decimal places or fraction denominator and specifying
custom column headings.

 Column 1

Select the TYPE column in the New Report Template form list and click the Modify… button to display the
Modifying Column 1 form.

Click the Column Layout… button on the Modifying Column 1 form to display the Layout for Column 1
form and make the following settings:.

 Enter 0 in the Spaces before column textbox. This


is the first column and no spaces are required.

 Leave the Column Width textbox blank so that the


column width is variable and the leave the Justify
options list set to L.

 As this is an alphanumeric column the Numeric


Display area may be ignored for this column.

 In the Text Display area of the form, make sure the


Headings options list is set to On and click the
Custom radio button.

 In the Custom text textbox enter COMPONENT,


press the Return key and ‘underline’ the text using a
row of equal (=) symbols.

Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 1 from to modify the settings and dismiss the form.

 Column 2

On the Modifying Column 1 form, click the Next Column button. This makes column 2 the current column
and changes the form name to Modifying Column 2 and modifies the content of the form to display the
DXTR column details.

Click the Column Layout… button to display the Layout for Column 2 form and make the following
settings:

 In the Layout area of the form leave the Space before column, Column Width and Justify settings
at the default values.
www.aveva.com
© Copyright 1974 to current year. 31
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 In the Text Display area of the form ensure Headings are set to On, click the Custom radio button,
enter DESCRIPTION in the Custom text textbox and underline with = symbols.

 Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 2 form to modify the settings and dismiss the form.

 Column 3

On the Modifying Column 2 form, click the Next Column button. This makes column 3 the current column
and changes the form name to Modifying Column 3 and modifies the content of the form to display the
ABOR column details.

Click the Column Layout… button to display the Layout for Column 3 form and make the following
settings:

 In the Layout area of the form leave the Space before column, Column Width and Justify settings
at the default values. Note that the Justify default is R as this is a numeric column which is normally
right justified.

 In the Numeric Display area of the form make sure the Decimal radio button is selected and enter 0
in the Decimal Places textbox.

 In the Text Display area of the form ensure Headings are set to On, click the Custom radio button,
enter ARRIVE BORE (mm) in the Custom text textbox and underline with = symbols.

 Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 3 from to modify the settings and dismiss the form.

 Column 4

On the Layout for Column 4 form make the following settings:

 Use the same settings as Column 3 but change the Custom text to LEAVE BORE (mm).

Click the OK button on the Layout for Column 4 from to modify the settings and dismiss the form.

 Column 5

On the Layout for Column 5 form make the following settings:

 Ensure Layout area options remain as the defaults.

 In the Text Display area of the form ensure Headings are set to On, click the Custom radio button,
enter MATERIAL in the Custom text textbox and underline with = symbols.

 Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 5 from to modify the settings and dismiss the form.

 Column 6

On the Layout for Column 6 form make the following settings:

 Ensure Layout area options remain as the defaults.

 In the Numeric Display area of the form make sure the Decimal radio button is selected and enter 0
in the Decimal Places textbox. www.aveva.com
© Copyright 1974 to current year. 32
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 In the Text Display area of the form ensure Headings are set to On, click the Custom radio button,
enter LENGTH (mm) in the Custom text textbox and underline with = symbols.

 Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 6 from to modify the settings and dismiss the form.

 Column 7

On the Layout for Column 7 form make the following settings:

 Ensure Layout area options remain as the defaults.

 In the Numeric Display area of the form make sure the Decimal radio button is selected and enter 0
in the Decimal Places textbox.

 In the Text Display area of the form ensure Headings are set to On, click the Custom radio button,
enter NO. OFF in the Custom text textbox and underline with = symbols.

 Ensure the Values options list is set to On and the Subtotals and Total options lists are set to Off.

Click the OK button on the Layout for Column 7 form to modify the settings and dismiss the form.

Click the OK button on the Modifying Column 7 form to save the settings for all columns and dismiss the
form.

Make sure the Screen radio button is checked in the Destination area of the New Report Template form,
and click the Apply button to display the report on the screen. Check the column headings and other
formatting have been applied. The result should look like this:

3.1.5.6 Filtering the Output

Make Branch /100-B-1/B1 the CE and click the Apply button on the New Report Template form.

For the purposes of this report a Fabrication Yard report is required to be produced. To this end, the GASK,
VALV and INST types of branch members will be excluded by filtering.

Enter TYPE NE 'GASK' AND TYPE NE 'VALV' AND TYPE NE 'INST' in the With textbox.
www.aveva.com
© Copyright 1974 to current year. 33
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Re-run the report to ensure the element types have been omitted.
3.1.5.7 Applying a System Command

Click the New radio button in the Destination area of the form and make sure the Filename is set to
Branch_Members.txt.

Enter ‘NOTEPAD Branch_Members.txt’ in the System Command textbox.

Click the Apply button on the New Report Template form.

Click the Yes button on the Confirmation message to overwrite the existing file.

The report will run and Notepad will open, displaying the report.

3.1.5.8 Saving the Template

Using the New Report Template form menu select File > Save As… to display the Save Report As… file
browser.

Browse to the My Documents folder; enter Branch_Members.tmp in the File name textbox and click the
Save button to save the report to the specified file name.

3.2 Modifying a Report Template

Having created and saved a Report Template, it may be modified at any time. The following section
describes the use of subtotals and totals in addition to runtime prompts, alternative report formats and
advanced report features.

To open an existing report template Utilities > Standard Reporting > Reports > Modify… may be selected
to display the Modify Report… file browser.

The required report template file is located using standard Windows techniques and, once highlighted,
clicking the Open button or double-clicking the identified file opens the Modify Report Template <path>
<filename>, where <path> and <filename> are the path and filename of the template respectively.

The form has exactly the same functionality as the New Report Template form.

3.2.1 Subtotals and Totals

Subtotals and Totals may be used on any numeric column. The Units for the column to be totalled or
subtotalled must be set otherwise an error message is displayed when the OK button on the Modifying
Column <n> form, where <n> is the column number, is clicked.

www.aveva.com
© Copyright 1974 to current year. 34
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.2.1.1 Subtotals

Subtotals may be generated for a numeric column when the value of a sorted column changes.

The number of the sorted column on which a change in value will trigger the subtotal is selected from the
Subtotals options list. If, for instance, columns 1, 2, 4 and 6 are sorted, the respective column numbers will
appear in the options list. The sort precedence has no meaning in this context.

Having selected the sorted column to trigger the subtotal, the User should ensure the Values option list on
the Layout for Column <n> form is set to Sub. This results in the value of the column only being displayed
when a subtotal is generated.

In practice, a subtotalled report normally requires that all column values be set to Sub. It is possible to
subtotal different columns on different ‘trigger’ columns; however, the report output may be difficult to read
unless correctly formatted.

A column may only be subtotalled on one sorted column. If this does not present the desired result, a
‘hidden’ column, i.e. a column which is used for subtotalling but whose contents are not displayed, may be
used. This is normally a column whose expression is a concatenation of other columns values that make
the column values unique, thus producing the subtotal(s) at a change in value of multiple columns.

3.2.1.2 Totals

Totals may be generated for any numeric column and are not dependant on further columns. The totalled
column may also be subtotalled; however, the total will always be displayed at the bottom of the column list.

Totals are set or unset by selecting On or Off from the Totals options list on the Layout for Column <n>
form.

3.2.2 Runtime Prompts

Runtime prompts enable the User to specify various report parameters e.g. types, filters, hierarchy, etc., at
runtime rather than modifying the template.

Selecting Options > Runtime Prompts… from the New or Modify Report Template form menu displays
the Runtime Prompts form.

Each definable parameter may be activated by checking the checkbox next to the appropriate prompt. A
suitable prompt is displayed when the report is run. For example, if the Filename checkbox is activated, the
Report Details form is displayed at runtime prompting for the filename to be entered.

Note: Any filename specified on the template is offered as the default


filename in the runtime prompt but may be overwritten. This principle
applies to other runtime prompts.

Clicking the OK button the Report Details form runs the report.

 A filename runtime prompt should not be set if the template destination is set to Screen as it will be
ignored. If no filename is entered, the report will be displayed on the screen.

www.aveva.com
© Copyright 1974 to current year. 35
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

If multiple runtime prompts are specified, the


Report Details form expands to display the
prompts:

The Volume and From prompts have options


list that are used in the same way as
described earlier, see section 3.1.2.

 Runtime prompts should not be set for report templates that may be run in batch mode.

3.2.3 Other Formats

In addition to standard text format, reports may be generated in comma separated value (.csv) file format
that may be directly opened in Microsoft Excel.

Selecting Options > Other Formats… from the New or Modify Report Template form menu displays the
Report Format form.

The Format options list has two options Normal (text) and CSV.

If CSV is selected, the Field Separator and Text Delimiter may be


specified by entering the desired characters in the relevant textbox. The
Text Delimiter may also be left blank.

Clicking the OK button sets the report format.

 If CSV is selected any specified filename, in the report template or in a runtime prompt should have a
.csv extension.

3.2.4 Page Info Options

The Page Info options enable the User to stipulate additional information to be added that is not specified in
the body of the report.

Each option displays a form with a text pane where the information can be defined. The information may be
text entered between single quote marks, or any PML variable, including some specific report variables.

PML variables, as described on the following page, must be preceded by one of the functions vtext, vval or
vlog, which ensure the late evaluation of the variables, i.e. the variables aren’t evaluated until the
expression is evaluated. If this logic is not adhered to, the system will try and substitute a value when it’s
entered on the form.

For example, to show the page number on every page of the report, the following syntax would be added to
either the header or footer: vtext(!pageno)

If text and variables are required in the same expression, i.e. on the same line, they must combined using
the text operator +.

For example, if the page numbers are to have the format Page 1, Page 2, etc., the following syntax would
be used: 'Page ' + vtext(!pageno)

www.aveva.com
© Copyright 1974 to current year. 36
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

PML Variables are described as follows:

PML Variable Description

!criteria Inserts the complete selection criteria for the report


!date Inserts today’s date.
!filename Inserts the specified filename to which the report will be sent.
!pageno Inserts page numbers.
!projcode Inserts current project 3 character code.
!projdesc Inserts current project description.
!projname Inserts current project name.
!projnumb Inserts current project number.
!projmess Inserts current project message.
!selfrom Inserts MDB, Drawlist or Obstruction List, as specified on the Hierarchy form.
!selhierarchy Inserts the contents of the Hierarchy textbox.
!selno Inserts the sequence number of an element in a selection.
!seltype Inserts the contents of the Type textbox.
!selvolspec Inserts Off, Completely within or Partially within, as specified on the Hierarchy form.
!selvolume Inserts the co-ordinates defining the volume, as specified on the Hierarchy form.
!time Inserts the time.

The options for the Page Info form menu on the New or Modify Report Template form are described in the
following sections.

3.2.4.1 Header…

Selecting the Header… option displays the Header form.

The contents will be displayed at the


top of every page of the report.

3.2.4.2 Footer…

Selecting the Footer… option displays the Footer form.

The contents will be displayed at the


bottom of every page of the report.

www.aveva.com
© Copyright 1974 to current year. 37
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 The page length must be set between 5 and 500 lines, see 3.2.4.5, before headers and footers will be
displayed. Headers and footers are not available for screen reports.

3.2.4.3 Introduction…

Selecting the Introduction… option displays the Intro form.

The contents will be displayed at the beginning of the


report, before the column data.

3.2.4.4 Summary…

Selecting the Summary… option displays the Summary form.

The contents will be displayed at the end of the


report, after the column data.

3.2.4.5 Page Length…

Selecting the Page Length… option displays the Page Length form.

The required page length may be entered in the Page Length


textbox.

www.aveva.com
© Copyright 1974 to current year. 38
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.2.5 Modifying a Report A Worked Example

The following worked example modifies the Report Template created earlier to add subtotals and totals, a
runtime prompt, and a header and footer. A .csv version of the report will be created.

3.2.5.1 Setting-up Subtotals and Totals

If the report template has been closed, select Utilities > Standard Reporting > Reports > Modify… from
the main menu to display the Modify Report… file browser form. Locate the previously saved template and
click open to prompt the Modify Report Template <path> <filename> form.

Subtotals for quantity and implied tube length are required whenever the component type, detailed text,
arrive and leave bores and material changes. Therefore, a ‘hidden’ column is required that sorts the column
values such that subtotals are given when the content of any of the columns changes.

Totals are required for component quantity and implied tube length.

Click the <end> entry in the columns list on the Modify Report Template form. Click the New… button to
display the Creating Column form.

 Enter TYPE + DTXR + STRING(ABOR) + STRING(LBOR) + MTXX in the Expression column, select
A to Z (Ignore Case) from the Sorting options list and click the Column Layout… button to display
the Layout for Column 8 form.

 Select Off from the Headings options list. As this is a hidden column no headings are required.

 Select Off from the Values options list so that the contents of the column are not shown in the report.

Click the OK button on the Layout for Column 8 form and then click the OK button on the Creating
Column form. The Modify Report Template form should now look like this:

www.aveva.com
© Copyright 1974 to current year. 39
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

As the report will be using column 8 for subtotalling, the supplementary columns must be modified to only
show a value when a subtotal is displayed. Columns 6 and 7, i.e. the subtotalled columns, require the
subtotals to be set for column 8 changes. Columns 1 to 4 inclusive do not need to be sorted as the sorting
is done by column 8.

Select Column 1 in the columns list and click the Modify… button to display the Modifying Column 1 form.

 Select Off in the Sorting options list and click the Column Layout… button to display the Layout for
Column 1 form.

 Select Sub from the Values options list and click OK on the Layout
for Column 1 form.

Click the Next Column button on the Modifying Column 1 form to display the Modifying Column 2 form.

 Select Off in the Sorting options list and click the Column Layout… button to display the Layout for
Column 2 form.

 Select Sub from the Values options list and click OK on the Layout for Column 2 form.

Click the Next Column button on the Modifying Column 2 form to display the Modifying Column 3 form.

 Select Off in the Sorting options list and click the Column Layout… button to display the Layout for
Column 3 form.

 Select Sub from the Values options list and click OK on the Layout for Column 3 form.

Click the Next Column button on the Modifying Column 3 form to display the Modifying Column 4 form.

 Select Off in the Sorting options list and click the Column Layout… button to display the Layout for
Column 4 form.

 Select Sub from the Values options list and click OK on the Layout for Column 4 form.

Click the Next Column button on the Modifying Column 4 form to display the Modifying Column 5 form.

 Click the Column Layout… button to display the Layout for Column 5 form.

 Select Sub from the Values options list and click OK on the Layout for Column 5 form.

Click the Next Column button on the Modifying Column 5 form to display the Modifying Column 6 form.

 Click the Column Layout… button to display the Layout for Column 6 form.

 Select Sub from the Values options list and select 8 from the Subtotals options list. This will create
the subtotal when column 8 changes value.

 Select On from the Total options list. This will create a total for the
implied tube of all sizes.

 Click OK on the Layout for Column 6 form.

Click the Next Column button on the Modifying Column 6 form to display the Modifying Column 7 form.

 Click the Column Layout… button to display the Layout for Column 7 form.
www.aveva.com
© Copyright 1974 to current year. 40
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 Select Sub from the Values options list and select 8 from the Subtotals options list. This will create
the subtotal when column 8 changes value.

 Select On from the Total options list. This will create a total for all the components.

 Click OK on the Layout for Column 7 form.

 Select Any/mm from the Units option.

Click the OK button on the Modifying Column 7 form to save the changes.

Make PIPE /100-B-1 the CE and ensure the report destination is set to a New file and the Filename is
entered in the textbox.

Click the Apply button on the Modify Report Template form.

Click the Yes button on the overwrite confirmation message. The report will be displayed by Notepad:

3.2.5.2 Saving the Modifications

Select File > Save from the Modify Report Template form menu to display an overwrite confirmation
message.

Click the Yes button to save the template to the same filename.

3.2.5.3 Adding a Header and Footer

Select Page Info > Header… from the Modify Report Template form menu to display the Header form.

Add the following text:

'Filename ' + vtext(!filename)  The two single quotes will produce a blank line in the report
''

Select the OK button on the Header form to set the header information and dismiss the form.

Select Page Info > Footer… from the Modify Report Template form menu to display the Footer form.

Add the following text:

'Page ' + vtext(!pageno)


''
'Date: ' + vtext(!date) + ' ' +  The two single quotes will produce a blank line in the report
vtext(!time)
''
www.aveva.com
Select the OK button on the Footer form to set the footer information and dismiss the form.

© Copyright 1974 to current year. 41


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

3.2.5.4 Adding a Runtime Prompt

Select Options > Runtime Prompts… from the Modify Report Template form menu to display the
Runtime Prompts form.

Check the Filename checkbox on the form and click the OK button.

Remove the text from the System Command textbox.

Make the Zone /ZONE-PIPING-AREA01 the CE and test the changes by clicking the Apply button on the
Modify Report Template form. Enter a filename when prompted, and click OK. The report will be created.
Locate the file in Windows Explorer and open it with a suitable editor to check the formatting and contents.

3.2.5.5 Creating a CSV Report

To display the Report Format form select Options > Other Formats… from the Modify Report Template
form menu.

Select CSV from the Format options list and remove the default text
delimiter (“) from the Text Delimiter textbox so that it is blank.

Click the OK button on the Report Format form.

Change the filename in the Destination area of the Modify Report Template form from
Branch_Members.txt to Branch_Members.csv.

Select Page Info > Page Length… from the Modify Report Template form menu to display the Page
Length form. Empty the Page Length textbox so that headers and footers are not added to the csv file.

Click the OK button on the Page Length form.

Click the Apply button on the Modify Report Template form and enter a suitable filename (.csv extension)
when prompted.

Locate the file with Windows Explorer and double click it to open it in Excel and check the report.

www.aveva.com
© Copyright 1974 to current year. 42
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 2 Standard Reporting - Report Templates

Using Chapter 3 as guide, complete the following tasks:

 Create a Report Template for summarising structural steel profiles in the Training Project.

 The report must include the profile name; the description of the material reference, the profile cut
length, the gross weight, the net weight, the gross surface area, the net surface area and the
number of pieces.

 The report must be subtotalled when the profile name and description of the material reference
change.

 All numeric columns must be subtotalled and totalled.

 The following table gives a list of attributes and pseudo attributes that might be useful:

Name Description Type


CATREF Catalogue Reference Pseudo
MATREF Material Reference Standard
DERLEN Derived Length (mm) Pseudo
CUTL Cut Length (mm) Pseudo
TCTL True Cut Length (mm) Pseudo
GWEI Gross Weight (Kg) Pseudo
NWEI Net Weight (Kg) Pseudo
GSRF Gross Surface Area Pseudo
NSRF Net Surface Area Pseudo

The resulting report should be as follows:

www.aveva.com
© Copyright 1974 to current year. 43
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 4

4 Report Designer Overview

PDMS provides a method of creating reports using a Report Designer; an add-in to the application
comprising an interactive, visual report designing tool. The Report Designer add-in is available in PDMS
Design, Draft and Paragon modules.

The Report Designer utilises two file formats:

 Layout Templates (.repx) - contains the report presentation i.e. formatting and graphics. The Layout
Template is used to define the basic structure for Report Designer reports but do not contain data and
cannot be run.

 Report (.repv) – in addition to containing the report presentation, this file format also contains the
data source and may be run.

Report files do not contain any project settings and are therefore transportable between projects.
However, the transfer is only successful where the projects share the same element and attribute
structures.

 See Chapter 5 for details of Report Designer reports.


 See Chapter 7 for details of Report Designer Quick Reports, using Layout Templates.

4.1 Accessing Report Designer

Report Designer is initiated via the Utilities menu: Utilities > Reporting > Designer…

 Report Designer opened in a separate window to the main PDMS session.

© Copyright 1974 to current year. 44


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

On access to Report Designer, selecting the option File > New from the main
menu initiates a new report creation process.

 See Chapter 5 for further details on the creation of new Reports and the use of the Data Source
Wizard.

Alternatively, Report Designer may be populated by opening a pre-defined report


by selecting File > Open… from the main menu and selecting the required report
via a Browser.

 See Chapter 6 for further details on the running of a pre-defined report, including direct access via the
utilities menu in PDMS Design.

4.2 Report Designer User Interface

The Report Designer user interface has the following main elements:

Main menu Toolbars

Field List &


Tool Box Report Explorer

Report Canvas

Property Grid
Mode Tabs Sorting & Grouping

www.aveva.com
© Copyright 1974 to current year. 45
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Toolbars - Reporting tasks are aided by quick access to Toolbar functions, including the
opening and saving of reports, Formatting, Layout, and Zooming.

The AVEVA Toolbar allows the definition of a Data source; setting the report scope
and subsequent running of the report. Visibility of the Toolbars is controlled by the
User right-clicking in the main menu toolbar area and distinguishing the required
toolbars by a tick.

Tool Box - Contains standard controls that may be added to a report e.g. Shapes, and Charts.

Report Canvas - Main working area where the report is designed, formatted and previewed.

Field List - Displays the Data Source Columns.

Report Explorer - Presents a tree-view of the Report structure and allows quick navigation to report
presentation controls.

Property Grid - Contains and defines report settings and controls. The grid is context sensitive to
the current selection in the Report Canvas.

Grouping and - Allows application of grouping and sorting to the reported data.
Sorting

Mode Tabs - Allows the User to switch between reporting modes. The User will principally work
in, and switch between, the Designer and Preview modes.

4.2.1 Designer Mode

A general view of Report Designer in Designer mode is shown below:

www.aveva.com
© Copyright 1974 to current year. 46
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Designer Mode allows the User to define the layout, format and contents of a report. The task is aided
by the Standard Controls allowing, for example, the addition of labels, picture files i.e. a company logo, and
graphical charts derived from the report data. In addition, the User is able to create and modify special
calculation fields. Such fields are used to manipulate data returned from standard PDMS attributes,
applying expressions to control the reported output.

4.2.2 Preview Mode

A general view of Report Designer in Preview mode is shown below:

The Preview Mode allows the User to display the report as it will appear when printed. When working in the
Preview Mode the reported fields are replaced with the relevant data from the bound Data Sources.

A specific Preview Toolbar is available to the User, enabling preview zooming, navigation and the addition of
a watermark. A complete list of the Toolbar actions is outlined below:

Search
Scale
Hand / Magnifier Mouse Tools
Zoom Functions
Page Navigation
Multiple Pages
Background Colour
Watermark

www.aveva.com
© Copyright 1974 to current year. 47
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Where a preview of a report is displayed, returned data is limited to the first twenty records. The report
preview will be cached and any changes to the underlying data will not be shown until the User runs the
report or re-opens the Report Designer.

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

4.3 Printing & Exporting Reports

The opportunity to print and export reports is presented to the User on running the report (initiated via the
Run Report button from the AVEVA Toolbar). The report is executed and a full data set is returned and
displayed in a new Run Report window. The window provides the User with facilities for printing, exporting
to various file formats, and publishing the report in PDF format, with data and associations if configured, to
AVEVA NET.

The Run Report window toolbar provides the same facilities described with the Preview mode toolbar with
the addition of the following:

Print Options.
Page Setup Options.

Export Report (in one of the available formats) and


Save to File.

Export Report (in one of the available formats) and


Attach to Email.

Publish to AVEVA NET.


www.aveva.com
© Copyright 1974 to current year. 48
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

4.4 Report Designer Workflow

The flowchart outlined below summarises the basic workflow a User will follow when working with the Report
Designer.

 A set of sample reports are included with the Report Designer tool, including both Layout Templates
and Reports. The reports are designed to work with the sample database and may be accessed by
selecting File > Open… and using the navigation Browser to locate the required folder e.g.
C:\AVEVA\Plant\Data12.1.xx\pdmsui\DFLTS\data\reports www.aveva.com
© Copyright 1974 to current year. 49
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

www.aveva.com
© Copyright 1974 to current year. 50
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 5

5 Report Designer – Report Creation

Having established a context to the Report Designer in the previous Chapter, the following Chapter will
detail the creation of a report.

Ensuring Report Designer has been selected from the main PDMS Design menu; create a report through
the completion of the following Sections and by following the lead of the Trainer.

5.1 Creating a New Report - A Worked Example

The report creation process begins with the instigation of a new report and the definition of a layout.

On access to Report Designer, select File > New from the main menu to initiate a
new report.

The New Report form is displayed.

The New Report form allows the selection of a pre–defined Layout Template. The User is able to locate a
required template via the Look In pull-down menu and selecting Product, Project, User or <Browse…>

© Copyright 1974 to current year. 51


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

location. The latter option prompts a Browse For Folder window in which, the User may select an
appropriate location e.g. C:\AVEVA\Plant\Data12.1.xx\pdmsui\DFLTS\data\reports. The selected location is
subsequently added to the Look In pull-down menu and the Layout Template list is updated.

The selection of a required template from the Layout Template list displays the identified template in the
Layout Preview window.

 The Layout Templates (.repx) have only presentation items and are not bound to any data. A Template
may incorporate tables for laying out the data, company logos etc….

From the Look In pull-down menu select the Product storage location.

Select an A4-Portrait Layout Template and click Create to create the new report.

 The Property Grid can be used to define or modify the page size at any time during report creation.
With the report section selected, the Paper Kind property pull-down list is used to select an appropriate
page size e.g. A4. The Paper Kind property is located in the Page Settings section of the Property
Grid.

5.1.1 Saving the Report

On report creation it is prudent to save the report; this has the associated action of naming the Report.

Select File > Save As… from the main-menu to prompt the Save As form.

Navigate to C:\AVEVA\Plant \Data12.1.xx\pdmsuser\TPS\Data\Reports or as directed by the Trainer and


save the Report as Training_Report.repv.

The Report Designer window is updated to reflect the new report name within the Title Bar.

5.2 Report Data Source


www.aveva.com
© Copyright 1974 to current year. 52
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The following sections outline the sources of project data that can be used to create and customise data-
centric reports to meet project and customer requirements.

The data source is integrally bound to the report with controls in the report linked to data fields in the data
source.

A Report can be bound to data from the PDMS project database.

Once a data source has been defined, the elements from within that source can be further restricted by
defining a data source scope.

5.2.1 New Data Source from Individual Queries

In this instance, the data to be reported is created as required by the User using the Report Designer Data
Source Wizard, or the Search utility within PDMS Design.

 Refer to Section 5.3 for further information on the use the Data Source Wizard and Chapter 7 for
further information on the use of the Search Utility and Quick Reports.

5.2.2 Pre-defined Data Source from Stored Queries

Report Designer is able to report and bind to pre-defined data from stored queries known as Database
Views. A Database View may be shared across a project.

There are three types of Database Views available:

Element Views An Element View is automatically created and maintained by the system. These Views
are provided for all base Element Types within the project schema and are available to
all Users.

Project Views A Project View is a user-defined View of the data and is stored within a Lexicon
dictionary database. The Views are available to all Users. These Views may contain
more complex data i.e. the combining of an element’s attributes (UDA and Pseudo),
from associated items, and attribute based expressions.

User Views User Views may be copies of Project or Element Views, or views an Administrative
User has created and stored locally.

It is envisaged that an Administrator would create and refine individual User Views prior
to exposing the View to all Users by copying it to a project dictionary database, where it
would become a Project View.

 Refer to TM-1308 AVEVA Plant (12.1) Lexicon Training guide for further information on the formation
of Database Views.

5.3 Data Source Wizard

The Data Source Wizard may be used to define and bind a Data Source (new or pre-defined) to a report.

The wizard is initiated by clicking the Data source button on the


AVEVA Toolbar.

www.aveva.com
© Copyright 1974 to current year. 53
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Through a series of steps the Data


Source Wizard enables the user to
create or modify a Data Source.

New Initiates a series of steps to


define a New Data Source based on
an individual query.

Copy Initiates a series of steps to


define a Pre-defined Data Source to
be copied and edited as the basis of a
report. The User is able to select
from Element, Project and User
Database Views.

Edit Allows modification of the


data source for the current report.
This option is not available if the
current report does not have a
defined data source.

 The Data Source Wizard form can be resized to show more information if required.
5.3.1 Data Source Wizard: Defining a New Data Source

A new data source is defined by the User selecting the New radio button and Next> on the initial Data
Source Wizard window.

The Properties page of the wizard is then displayed.

A name for the new data source is automatically generated within the Name: textbox. The Name and
Description may be altered by the User to better describe the element(s) the data source will use

www.aveva.com
© Copyright 1974 to current year. 54
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

5.3.1.1 Base Element Types

On clicking Next>, the Base Element Types page of the wizard is displayed.

At least one Available Element Type must be selected. The element type will be used to populate the
report.

 For an MTO report is likely that more than one Base Element Type will be selected.

The Database Types Filter pull-down menu is used to filter the available elements i.e. to display only
Design elements. The list of available elements shown may be filtered further by typing in the filter box at
the top of each column within the Available Element Types grid.

In the example here, the Database Type


has been filtered to Design and the
Available Element filtered to Branch by
typing BRAN in the filter box for the Name
column.

www.aveva.com
© Copyright 1974 to current year. 55
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Selecting the required available element type, the element may be added to and removed from the Base
Element Types list using the central arrow buttons. In the example below, the Branch Element Type has
been added to the Base Element Types list and will consequently be reported as the data source.

 The Ctrl and Shift keys may be used to make multiple element selections.

5.3.1.2 Filters

On clicking Next>, the Filters page of the wizard is displayed.

Using this step of the wizard, filters may be added to limit the elements returned by the data source. There
are two types of filtering available: Attribute Filters and Expression Filters. A new filter is added by
clicking the Add Filter button beneath the respective filter lists. Multiple filters may be defined and
combined.

www.aveva.com
© Copyright 1974 to current year. 56
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Attribute Filter allows a simple


attribute based comparison through
entry or selection in the fields provided:
Attribute, Operator and Value.

The Expression Filter allows for the


direct entry of more complex PML1
expressions e.g. PURP OF SITE eq
‘Pipe’ will return elements where the
Purpose of the owning SITE is set to
Pipe

A Filter may be deleted by selecting the required filter and clicking Delete Filter.

5.3.1.3 Columns

On clicking Next>, the Columns page of the wizard is displayed.

The attributes of the base elements of the data source are displayed in the Available Columns box. From
this list, the User is able to choose the Attributes (Fields) required for the report by populating the Data
Source Columns list.

If multiple elements have been selected for the data source, then either all attributes of these element types
may be listed by clicking the All Attributes radio button, or only those common to all the selected element
types may be listed by clicking the Common Attributes radio button.

The Available Columns list has the following column headings:

 Definition Attribute Name or PDMS Expression.


 Name Field description text – as displayed in the Report Field list.
 Description Reporting text for the Attribute, as defined in PDMS Lexicon.
 Data Type PDMS attribute data or returned value from an expression.
www.aveva.com
© Copyright 1974 to current year. 57
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Selecting the required Available Column(s), the Field(s) may be added to and removed from the Data
Source Columns box using the arrow buttons.

 The Ctrl and Shift keys may be used to make multiple element selections.

The Data Source Columns list may be edited as per the User’s requirements. To edit an entry, a cell is
selected in the row and directly edited. The exception is the Data Type column which, is edited via slection
from a pull-down menu.

 When using Expressions you must make sure that the Data Type is set correctly otherwise the result
output in the report might not be as expected.

Following one or more columns being selected, PML1 expressions or


Pseudo attributes may be typed into the Data Source Columns Type
Definition… field, with the resulting output available for use in the
produced report.

The new Definition entry is added to the bottom of the Data Source Columns list, where it may be edited as
previously described. To delete a user-defined Definition, the row is selected in the Data Source Columns
list and the Delete key used.

The below list highlights valid user-defined Definitions (Pseudo Attributes and Expressions) that may be
used and the associated data type:

Definition Description Data Type


Returns True or False dependent on SCHLNK being
not(unset(SCHLNK)) Boolean
unset, and then reversing the answer to give the result
STVCOM( /TagStatus ) Comment of the current item’s status control setting String
www.aveva.com
© Copyright 1974 to current year. 58
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

FLNN Full name of item String


CONNECTIONS Array of the connected items String
DBNAME Name of the Database the item is stored in String

When a Definition is entered, care should be taken as it is not checked as to whether the attribute name is
valid or an expression has the correct syntax.
On defining the required Data Source Columns for the report, clicking Finish closes the wizard and
populates the Report’s Field List.

 If the Data Source requires modification, the Data Source Wizard may be re-run, and the Edit option
selected. The User is then able to modify the input information as required through the described
steps.

5.3.1.4 Field List

Fields, or Definitions, selected or created as part of the Data Source Wizard process are displayed in the
Field List of Report Designer.

The Fields are displayed in the format <Name>.<Data Source Name>, where <Data Source Name> is the
Name entered on the Properties page of the Data Source Wizard, and <Name> is the value from the
Name column of the Data Source Columns on the Columns page of the Data Source Wizard.

The icons adjacent to the Fields indicate the field’s Data Type:

Icon Data Type

Table or Array of Data

Text

Reference or a value with units

Calculated Field

www.aveva.com
© Copyright 1974 to current year. 59
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Parameters

Boolean

Star indicates an invalid Syntax

5.3.2 Data Source Wizard: Copying a Data Source - A Worked Example

The following Worked Example will utilise a pre-defined data source – a Database View.

Initiate the Data Source Wizard by clicking the Data source button on the AVEVA Toolbar.

Select the Copy radio button and


click Next > to prompt a series of
steps to define a Pre-defined
Data Source to be copied and
edited.

www.aveva.com
© Copyright 1974 to current year. 60
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

5.3.2.2 Copy Data Source

The Copy Data Source page of the


Data Source Wizard allows the
selection of an available, pre-defined
data source to base the report on.

The View Definition Set pull-down menu allows the selection of the Database View type required: Element
Views, Project Views or User Views. Depending on the Database View selection, the View list is updated.

The Database Types Filter pull-down menu is used to filter the available elements i.e. display only Design
elements.

Select Element Views from the


View Definition Set pull-down
menu.

Select Design from the Database


Types Filter pull-down menu.

Select Design BRANCH from the


Views List to select the Branch
Element View.

On selection, click the Next > button to proceed to the next stage of the Wizard.

5.3.2.3 Properties

The Properties page of the wizard is displayed. www.aveva.com


© Copyright 1974 to current year. 61
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

A descriptive name and detailed description for the new data source is automatically generated.

Ensure the Default entries are as


follows.

Name: Design BRANCH

Description: Branch

Click the Next > button to proceed to the next stage of the Wizard.

5.3.2.4 Base Elements Types

The Base Element Types page of the wizard is displayed.

Due to the previous selection of an


Element View, the Base Element
Types list is automatically populated
with the associated base type:
BRAN (Branch).

On verification of the above, click


the Next > button to proceed to the
next stage of the Wizard.

www.aveva.com
© Copyright 1974 to current year. 62
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

5.3.2.5 Filters

The Filters page of the wizard is displayed.

Due to the previous selection of an


Element View, the Filter list is
automatically populated with the
associated (Attribute) Filter:
ACTYPE Equals BRAN.

On verification of the above, click the


Next > button to proceed to the next
stage of the Wizard.

5.3.2.6 Columns

The Columns page of the wizard is displayed.

Due to the previous selection of an Element View, the Data Source Column list is automatically populated
with the associated Columns.

www.aveva.com
© Copyright 1974 to current year. 63
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

On verification of the Data Source Columns list, click Finish to close the Wizard.

The Report Designer will update to be as follows with the Field List populated with the defined Data Source
Columns.

 The Data Source may be modified using the Edit option on the Data Source Wizard.

5.4 Populating the Report Canvas

The following section focus on the addition of data to the Report Canvas and subsequent formatting.

5.4.1 Report Bands

Prior to populating the Report Canvas with data using the specified Data Fields, it is important to
understand the areas of the canvas and how they may be used.

The Report Canvas is divided into a number of areas called Bands which, control the layout of the report
and contain reported controls and fields. A (blank) report will typically contain the following Bands:

www.aveva.com
© Copyright 1974 to current year. 64
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Report Header and Report Footer bands are printed in the report only once at the Head and Foot of
the report respectively.

The Page Header, Page Footer, Top Margin and Bottom Margin bands are printed on every page of the
report.

A Detail band is printed for each data entry the Data Source returns, while the Group Header and Group
Footer bands are printed for each data group.
The Bands on a typical report, where the report spans multiple pages, can be summarised as follows:

Page 1 Page 2

Top Margin Top Margin


Report Header Page Header
Page Header Group Footer
Group Header Group Header
Detail Detail
Detail Detail
Right Margin

Right Margin
Left Margin

Left Margin
Group Footer Detail
Group Header Group Footer
Detail Report Footer
Detail
Group Footer
Group Header
Detail
Page Footer Page Footer
Bottom Margin Bottom Margin

Bands may be added to the report via a right-click context


menu in the Report Canvas and selecting the option Insert
Band. The required band to be added to the report is
selected from the available options listed in the sub-menu
e.g. GroupHeader.

5.4.2 Adding Data Fields to a Report - A Worked Example

In order to view and print data, Data Fields are required to be added to a Detail band in the Report Canvas.

There are two methods to add Data Fields to the report:

 Drag and drop the Data Field directly to the Report Canvas

 Drag and drop a Label to the Report Canvas before binding to a field.

www.aveva.com
© Copyright 1974 to current year. 65
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

5.4.2.2 Drag & Drop the Data Field

Select the Name.Design BRANCH field in the Field List and drag it into the Detail Band of the report
Canvas. The surrounding box represents the size of the field entry in the canvas and during the placement
action, a number of (magenta) alignment aid lines appear from the box’s edges.

Drag the Data Field until the left edge is aligned with the left margin of the report and the top edge is aligned
to the band as shown in the following screenshot.

On placing the field, the box is labelled with the represented


Data Field’s name.

5.4.2.3 Binding a Data Field to a Label

To demonstrate the alternative method of adding a Data Field to the report, drag a Label from the Tool Box
(Standard Controls) and, using the alignment lines as a guide, drop it adjacent to the Name field in the
Detail Band. On placement, the box is shown as a Label e.g. label2.

www.aveva.com
© Copyright 1974 to current year. 66
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

With the placed Label selected, click the > symbol at the top right-hand corner of the label to display the
Label Tasks menu.

Click the Data Binding pull-down menu, expand the tree and scroll down the list of fields to select the Data
Field: HEAD BORE.Design Branch.

www.aveva.com
© Copyright 1974 to current year. 67
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

After selection, click the < symbol to hide the Label Tasks
menu. The Label control is now bound to the data field. The
Label control reflects the binding by updating to display the
field Name.

5.4.2.4 Data Field Preview

To ensure the report is returning data from the Data Source and in an appropriate format, it is prudent to
check placed Data Fields prior to running a report.

Click the Preview mode tab to view the placed Data


Fields as they will be printed.

If the Data Source used for a report encounters an error when attempting to collect data, and because of this
error is unable to return a Field value, an error message will be substituted for the Field value.

An error may occur, for example, if an incorrect PML1 expression is used to determine a field value. Where
an error is encountered the substitution text in the report is: !!Error www.aveva.com
© Copyright 1974 to current year. 68
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The vertical space between the data records highlighted


here is a result of the Detail Band height in the Report
Canvas.

 There are no gaps for the ReportHeader or the PageHeader bands due to a lack of controls or labels
in those areas; however, page margins are displayed.

To reduce the Detail Band height, navigate to the Designer Mode and select the bottom of the Detail Band
boundary box (noting change in cursor to vertical arrowed line). Drag the cursor upwards to the base of the
Data Field labels.

5.4.3 Adding Column Headings (Worked Example)

The next step is to describe each data column by adding a Column Heading.

Adding a Column Heading is achieved, as with adding a Data Field, by placing a Label control on to the
Report Canvas from the Tool Box (Standard Controls). As per convention, the Column Heading is
required on each page of data but not at each data instance. To this end, the Label is placed in the
PageHeader band.

www.aveva.com
© Copyright 1974 to current year. 69
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Drag two Label(s) onto the


PageHeader band, using the
positioning lines to aid alignment
with the two Detail Band fields.

The Label text denoting the first column may be altered by double-clicking the Label and modifying the text
by typing the required column heading.

Using this method, alter the first Column Heading to:


Branch.

Alternatively, the Column Heading can be entered by selecting the Label and clicking the > symbol to display
the Label Tasks menu and entry in the Text textbox.

Using this method alter the second Column


Heading to: Head Bore

 A label may also be edited using the Property Grid – Text property field within the Data section.

As completed for the Detail Band, reduce the PageHeader height to minimise the gap between the Column
Heading and reported data.

Save the report.

www.aveva.com
© Copyright 1974 to current year. 70
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The report format in Designer and Preview modes should now be as follows:

Designer Mode Preview Mode

5.4.4 Formatting Styles & the Report Explorer

Each report control and band has a group of properties that allow the User to change the presented style
and format i.e. font, text size, background / foreground colours and borders.

On creation, each control inherits properties from the report object above it. However, the User is able to
break this inheritance by explicitly changing the property of an individual item. Where the property of an
owning parent is altered, the child item will not be changed automatically.

The Report Explorer (accessed via the tab adjacent to the


Field List) illustrates the hierarchy of a report and indicates
how formatting may be inherited by controls.

Note the yellow box indicator with the Detail Band labels. The
indicator signposts the labels as being bound to fields attached
to a Data Source.

The selection of a node in the Report Explorer selects the


associated item in the Report Canvas when in Designer mode.

5.4.4.1 Altering the Font Format (Worked Example)

The following section will demonstrate how to alter the font of the created Column Headings.

Select the Branch Column Heading label

www.aveva.com
© Copyright 1974 to current year. 71
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

In the Property Grid, select the Font property field within


the Appearance section, and click on the button in
the cell to display the standard windows Font form

Select the following settings:

Font: Arial

Font style: Bold

Size: 11pt

Click the OK button to close the form

On closing the Font form, the Label is updated to reflect the


revised font.

Select the Head Bore Column Heading label and, using the Formatting toolbar, set the label to the same
described font style.

To demonstrate the ability to change multiple Labels, select the PageHeader node in the Report Explorer,
and click the Align Centre icon from the Formatting toolbar.

Both labels within the PageHeader Band are now aligned to the centre.

In the Property Grid, change the Background Colour property in the


Appearance section to LightBlue using the pull-down list

Save the report.

www.aveva.com
© Copyright 1974 to current year. 72
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

To unset a locally set property i.e. to enable the parent setting to


rule, select the property in the Property Grid and select the
Reset option via a right-click menu to remove the local setting.

 On changing a control setting within the report, the Property Grid will display the changed value as
Bold text.

5.4.5 Changing the Label Size

A Label size may be altered in size by selecting the label to prompt eight label
grab handles.

The central handles are used to modify the label size in a constrained vertical and horizontal direction, and
the corner handles are used to stretch or contract the label in all directions.

On moving the handles, alignment lines


extend from the corners of the label to
aid the User in positioning the label
relative to other controls and the page
margins.

If the bounding box overlaps another bounding box or margin, the overlapping area is shaded red to warn
the User that the returned data may overlap.

Below are examples of overlapping labels and a label overlapping a margin.

www.aveva.com
© Copyright 1974 to current year. 73
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 3 Report Designer - Additional Fields & Formatting

Using Chapter 5 as a guide and the Worked Example Report (Training_Report), complete the following
tasks:

 Use the Data Source wizard to add the Pseudo attribute CLLE (Cut length) as a Data Field.

 Change the size of the page to A3 Landscape.

 Add the following attributes from the Field List, to the report

PSPE Specification
HCON Head Connection
HPOS Head Position
TBORE Tail Bore
TCON Tail Connection
TPOS Tail Position
CLLE Cut Length

 Make the order of the fields: Name, PSPE, HBORE, HCON, HPOS, TBORE, TCON, TPOS, CLLE

 Add headings to the fields, and make them as shown below.

 Add a Report Header with the title Branch List.

 Save the report.

The report should look similar to below in Designer mode:

www.aveva.com
© Copyright 1974 to current year. 74
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 6

6 Report Designer - Advanced Formatting

The previous chapter established a simple report and introduced basic formatting. Chapter 6 will expand on
formatting tools and introduce graphical reporting tools available to the User.

6.1 Adding Borders - A Worked Example

A border may be added to an individual control within a report, or to all the controls within a report band.

It should be noted that the border line resides on the inside of the
boundary box. Consequently, on the occasion where two labels are
located immediately adjacent, the displayed line thickness appears to
be doubled where the two labels meet.

The simplest way of eliminating the double line effect is to remove the border from one side of a label within
the row.

For example, specifying the Branch label to have both a Left and
Right border, and the Spec label to have solely a Right one
removes the double line.

Continuing with report Training_Report, borders are required to aid the viewing of the reported data. This
task includes the addition of borders to the Column Headings to separate them from other Column Headings
and the reported data.

Select the PageHeader band, and in the Property Grid, select the Borders property.

Click the  arrow to display the Border setting menu.

The buttons that form the menu represent the settings available.
The outside buttons represent the borders of an individual label
where a graduated blue fill indicates a displayed border.

Set the Top, Right and Bottom border lines.

© Copyright 1974 to current year. 75


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Close the Border menu by clicking anywhere in the Report Canvas.

With regards to modifying an individual label, the Branch


heading label requires a left border to enclose it.

Select the Branch label and from the Property Grid


select the Borders property.

Click the arrow to display the Border setting menu.

The Top, Right and Bottom borders are already set,


due to being inherited from the PageHeader band.

From the Borders menu, click the Left border button.

Click anywhere on the Report Canvas to close the


menu.

As described previously, modification is required to avoid the display of double thickness borders.

Multi select the labels on the bottom row of the PageHeader Band as shown:

Select the Borders property in the Property Grid, and click the arrow to display the Border setting menu.

Remove the Top border and switch to Preview mode to examine the resulting report:

www.aveva.com
© Copyright 1974 to current year. 76
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

www.aveva.com
© Copyright 1974 to current year. 77
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 4 Report Designer - Formatting a Report

Using the previous section as a guide, and the Worked Example report (Training_Report), complete the
following tasks:

 Add borders to the Detail Band labels, using the following property settings:

Border Colour LightGray


Border Width 1

 Change the Font style of the Detail bands labels, using the following property settings:

Font Arial
Font style Regular
Size 9pt

 Ensure the Detail Band labels are aligned to best present reported data.

 Save the report.

6.2 Rule based Formatting - A Worked Example

In addition to applying formatting to the report bands and individual controls within the bands, formatting
rules can be applied to the conditions of an individual field or several fields.

Before formatting a control using a rule, styles are required to be added to the report’s Style Sheet. The
Style Sheet is a storage area in the Report where a number of different formatting styles are defined and the
condition of their use assigned.

As an example, a common Style Sheet required in a report is alternate row colouring where the odd
numbered rows are coloured white and the even row numbers contrast in a darker hue.

6.2.1 Adding Styles to the Style Sheet

Styles are added to the Style Sheet with the use of the Styles Editor. The Style Editor is accessed by
selecting either the Styles property or the Style Sheet property in the Property Grid. The properties
available are dependent on the control selected in the Report Canvas.

Using the Property Grid, select the Report option from the
grid’s main pull-down menu and select the property Style
Sheet within the Appearance section. Click the button.

The Styles Editor window is displayed.

www.aveva.com
© Copyright 1974 to current year. 78
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

To create a new Style, click the green + icon on the menu bar to populate the right
window of the Style Editor with Appearance properties.

Select the (Name) property and enter the text Wheat.

Select the Background Colour property and from the pull


down menu, select the Web tab, and select the colour
Wheat.

On selection, the pull-down menu will


close and the Background Colour
property will contain the text Wheat
and the colour box will be filled with
the wheat colour as shown.

www.aveva.com
© Copyright 1974 to current year. 79
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Create a new style by clicking the


green + icon from the Style Editor
menu bar.

Set the (Name) property to Normal.

The Appearance properties remain as


their default values.

Click Close to dismiss the Styles


Editor window.

6.2.2 Applying Styles from the Style Sheet

As alluded to in Section 6.2, a colour banding effect may be achieved by the following.

Ensuring the Deatil Band is current in the Report Canvas,


navigate to the Appearance section of the Property Grid
and select the Styles entry.

Expand the Styles node by clicking the adjacent + button to


display the three avaliable Styles for the Detail Band.

Select the Even Style property. From the pull-down list the
Styles created in the previous example can be observed.

Select the style named Normal.

Select the Odd Style property and from the pull-down list
select the Style named Wheat.

Switch to the Preview tab, and the report will resemble the following: www.aveva.com
© Copyright 1974 to current year. 80
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

With the report staring at Row 0, note the even rows have a background colour of White, while the odd
numbered rows have a background colour of Wheat.

6.3 Defining Formatting Rules – A Worked Example

Formatting Rules allow the User to format Bands and individual controls using rules (conditions) that are
controlled by the information returned in the report.

6.3.1 Creating a Formatting Rule

The Formatting Rules Editor is used to add Formatting Rules to the report.

The Formatting Rules Editor is accessed by selecting the


Formatting Rules property in the Property Grid.

Ensuring that the Report level in the Report Explorer is


current, select the Formatting Rules property in the Property
Grid and click the button.
The Formatting Rules Editor form controls the creation and the application of the Rules to a control.

www.aveva.com
© Copyright 1974 to current year. 81
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

To add a Rule to the Rule Sheet collection, click the Edit Rule Sheet… button to display the Formatting
Rules Sheet Editor.

To create a rule, click the green + icon


on the Formatting Rule Sheet Editor
menu bar to populate the right window
of the Editor with properties
controlling the Behaviour and
Appearance of the rule, plus the
condition in which the rule will be
activated.

Enter a (Name) of PSPEC_A1A -


these are descriptive to aid recall as
to their purpose later.

 Names cannot contain spaces.

www.aveva.com
© Copyright 1974 to current year. 82
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Set the Foreground Colour to Red


via the Web tab of the pull-down
menu.

A preview of the Formatting is


displayed at the base of the
Formatting Rule Sheet Editor
window.

The next task is to set a condition; this will activate the Formatting Rule when it is applied to a control.

Navigating to the Behaviour section of the Properties


Grid, select the Condition property and click on the
button to display the Condition Editor.

The Condition Editor allows the User to enter an appropriate expression to return the required value that is
to be used as a display field, or to be used for changing the format of the report.

The Condition Editor contains


a window where an expression
text may be input and a row of
operators.

The bottom left window allows


the User to select different
subsets of expressions. These
are then displayed in the centre
bottom window, while the right
hand window displays helpful
information regarding the
selected functions or field type.

www.aveva.com
© Copyright 1974 to current year. 83
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

For the purpose of this Worked Example, a condition is to be created that will only occur when the attribute
PSPE (Pipe Specification) is equal to A1A.

Using the Condition Editor,


select the Fields option from
the bottom left window. This
will display a list of fields in the
central window.

Select and double-click the field


PSPE to add the field to the
expression window.

 The field is enclosed in


square brackets to signify
that it is a field value and
not a text string.

From the row of Operator icons across the centre of the Condition Editor select the = (equals) sign to place
two equals signs (= =) in the expression window and enter the text ‘A1A’ to complete the required
expression.

 The inclusion of the single quotes is required as all text has to be enclosed in quotes.

The expression should now read: [PSPE] == ‘A1A’

Click OK to close the Condition Editor.

6.3.2 Assigning a Formatting Rule to a Control

The Worked Example requires that when a row is returned and the PSPE is equal to ‘A1A’, the entire row
will be formatted according to the rule’s condition. To this end, complete the following steps.

Select the Detail Band on the Report


Canvas and click the > symbol to open the
Detail Tasks context menu.

Click the button adjacent to the Formatting Rules option to display the Formatting Rules Editor.

The Rules available in a report: area of the editor is populated with the previously created rule
PSPEC_A1A.

The Rules applied to a control: area of the editor lists the rules that are applied to the selected report
band.

www.aveva.com
© Copyright 1974 to current year. 84
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Rule(s) are assigned or unassigned


to the control(s), by selecting the
required rule(s) and using the arrow
buttons

Select the previously created rule


PSPEC_A1A, and click the > button
to move the rule to the Rules
applied to a control: list.

Click OK to close the Formatting Rules Editor.

Select the Preview tab and observe how the Formatting Rule has applied to each row where the PSPE is
equal to A1A.

6.4 Calculated Fields - A Worked Example

Calculated Fields allow the User to pre-process a report's data based on user-defined expressions.
Calculated fields allow the creation of complex expressions applied to one or several data fields from the
data source. In addition to outputting the expression values as part of the report, the Calculated Field may
be used to both sort and group a report’s contents.

In addition, there are special calculated fields that allow specific PDMS conversion functions. A useful
example of this function is the ability to set a field to ensure the returned value is always in a specific unit.
This is useful when considering a report’s output is based on the User’s current display units and there is an
opportunity for separate Users to run the same report and return different units.

In regards to the Worked Example report, calculated fields will be created and will replace a number of the
existing fields.

www.aveva.com
© Copyright 1974 to current year. 85
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.4.1 Calculated Fields – Units Conversion

Currently the developed Worked Example Branch List report returns the Cut Length from the data source
with units of millimetres (mm). With the use of Calculated Fields, the Cut Length will always be returned in
metres (m).

6.4.1.1 Creating a Calculated Field

The unit conversion will be achieved with the use of a calculated field, and the addition of a conversion
expression.

To create a calculated field within the data source, select


the Cut Length.Design BRANCH field from the Field List.

Using the right-click context menu on the field, select the


menu option: Add Calculated Field.

On selection, an empty calculated field is created in the


Property Grid.

Select the Name property and give it a descriptive name of CutLengthMetres.

6.4.1.2 Entering an Expression

Using the Property Grid for the Calculated Field, select the
Expression property and click the button.

On selection the Expression Editor is displayed. The Editor’s appearance is similar in use to the previously
described Condition Editor.

www.aveva.com
© Copyright 1974 to current year. 86
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The following expression is required:

FormatDouble([Field], ‘<New units>’, Precision , ‘<Display Text>’) where ‘<Display Text>’ is optional.

In the expression window,


enter: FormatDouble(

Select the Fields option to list


the available fields.

Locate the Cut Length.Design


BRANCH field from the central
window and double-click it to
add it to the expression window.

The field name is enclosed


within [ ] (square brackets) to
denote it is a field within the
expression.

The expression should now


read:
FormatDouble([Cut Length]

In regards to the unit


conversion: the new units are
m, the precision required is 2
and the display units will be m.

To complete the expression,


after the field name, enter: , ‘m’,
2, ‘m’).

www.aveva.com
© Copyright 1974 to current year. 87
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The final expression will be as follows:

FormatDouble([Cut Length], ‘m’, 2, ‘m’)

Click OK to close the Expression Editor.

The Property Grid will now display the entered


expression in the Expression property field:

6.4.1.3 Binding the Calculated Field to a Label

On creating a Calculated Field, it must be added to the report. With the Worked Example report, a field label
already exists for Cut Length; this label may be used and altered so that it is bound to the calculated field
CutLengthMetres instead of the original data source.

Select the Cut Length field label in the Detail


Band of the report.

Click the > button at the top of the label. The


Label Tasks menu is displayed.

Select the Data Binding option, and select the


CutLengthMetres.Design BRANCH field from
the pull-down list of fields.

To close the menu, click the < symbol at the top


left of the menu area.

6.4.1.4 Previewing the Calculated Field

To preview the result of the calculated field, select the Preview tab.

The Length column data is now displayed in metres.

www.aveva.com
© Copyright 1974 to current year. 88
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.4.2 Calculated Fields – Using String Functions

Calculated Fields may be used to strip text from a long text string, with the resulting text displayed in the
report.

The Head Position of the reported Branches is displayed as a single string, typically: W 316640.00mm
N 300879.99mm U 101349.77mm.

To demonstrate the use of a Calculated Field, the three coordinate parts will be separated into the
respective West, North and Up positions by separating out the relevant piece of text from the position string.

6.4.2.1 Creating Calculated Fields

Select the HEAD POSITION.Design BRANCH field in the Field


List and, as described previously, create three calculated fields
with the following descriptive names:

 HEADWESTING - West Position

 HEADNORTHING - North Position

 HEADUPING – Up Position

The Field List is updated to include the three calculated


fields.

An expression is required to extract the relevant parts of the string for the head position string.

6.4.2.2 Entering the West Expression

Navigate to the Field List, and select the Edit Calculated Fields… option from the right-click menu to
display the CalculatedField Collection Editor form and all the calculated fields that are associated with the
report.

Using the CalculatedField Collection Editor select the HEADWESTING field to display the associated
properties on the right-hand side of the form. Navigate to the Data section, select the Expression property
and click the adjacent button to display the Expression Editor.

As part of the entered expression, the function Substring will be used. Select Functions from the bottom
left-hand window and from the central window select the Substring(‘’, , ) function. The bottom right-hand
window expands on the chosen function to give a detailed description and required parameters.

 The substring function returns a substring extracted from the specified string. This function requires
two or three operands:

Using 2 operands, the substring will be extracted from the beginning of the original string:
1 - An original string.
2 - An integer that specifies the length of the substring.

Using 3 operands, a substring can be subtracted starting from any position in the original string:
1 - An original string.
2 - An integer that specifies the zero-based index at which the substring to return begins.
3 - An integer that specifies the length of the substring.
www.aveva.com
© Copyright 1974 to current year. 89
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

From the central window, double-click on the Substring(‘’, , ) function to add it to the expression text.

The substring function takes a string as its first


parameter, in this instance the string is the field HEAD
POSITION. Therefore, the quotation marks in the
expression text are removed.

Once more, selecting Fields in the bottom left-hand


window, allows the selection and insertion of the field
HEAD POSITION.Design BRANCH in lieu of the
quotation marks.

The field is enclosed in square brackets within the


expression text.

Assuming the Head Position is in the format W 316640.00mm N 300879.99mm U 101349.77mm, the West
coordinate may be extracted using the Substring function; starting at the first character and finishing at the
character before the letter N. To achieve this, the 3 operands substring version is used.

Between the two commas in the substring the starting position is


defined.

Enter 0 to indicate the first character.

The next step is to locate the end position of the West coordinate; the Letter N. The CharIndex function
may be used to achieve this location.

 The CharIndex function can use four operands but, in this instance, only two operands are used:
1 – String to find.
2 – String to search in.

In the expression text, place the cursor between the comma


and closing bracket and in the bottom left hand window
select Functions, before selecting the CharIndex function
with a double-click to place it in the expression text.

Between the first quotes of the CharIndex function enter the


text ‘ N’ (space N).

Replace the second set of quotes of the CharIndex function


with the field: HEAD POSITION.Design BRANCH to define
the string to be searched within.

Click OK to close the Expression Editor.


www.aveva.com
© Copyright 1974 to current year. 90
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.4.2.3 Entering the North Expression

Using the same approach as the West Position in regards to the North coordinate, the string starts at the
letter N and finishes at the letter U.

From the CalculatedField Collection Editor select the HEADNORTHING calculated field.

The CharIndex function can be used to return the position of the letter U within the original string.

Using the Expression Editor, enter the expression:

Substring([HEAD POSITION], CharIndex('N',[HEAD POSITION]),


CharIndex('U',[HEAD POSITION]) - CharIndex('N',[HEAD POSITION]))

The Substring function requires as a parameter the number of characters to return. Therefore the number
of characters between the letter N and the letter U in the string is to be calculated to ascertain the number of
characters to return.

Taking the position: W 316640mm N 300879.99mm U 101349.77mm

CharIndex('U',[HEAD POSITION]) - finds the position of the letter U = 25


CharIndex('N',[HEAD POSITION]) - finds the position of the letter N = 11

Therefore:

CharIndex('U',[HEAD POSITION]) - CharIndex('N',[HEAD POSITION]) - returns the number of


characters between the letters U and N to be 14

The expression evaluates to Substring([HEAD POSITION], 11, 14), which translates as a subtract of the
string, starting at position 11, and continuing for the next 14 characters.

Click OK to close the Expression Editor.

6.4.2.4 Entering the Up Expression

Following the same process as the previous positions, in regards to the Up coordinate the string starting
point and duration need to be ascertained.

From the CalculatedField Collection Editor form select the HEADUPING calculated field, and using the
Expression Editor, enter the expression:

Substring([HEAD POSITION],CharIndex('U ',[HEAD POSITION]))

Click OK to close the Expression Editor.

Click OK to close the CalculatedField Collection Editor form.

www.aveva.com
© Copyright 1974 to current year. 91
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.4.2.5 Adding the Calculated Fields to the Report

Select the HEAD Position.Design BRANCH field label in the Detail Band of the report and click the
associated > button at the top of the label to display the Label Tasks menu.

Select the Data Binding option and select the HEADWESTING.Design BRANCH data field from the pull-
down list of fields.

Expand the Detail Band vertically downwards and add a new label; positioning it below the
HEADWESTING label and altering the label size to match.

Select the associated > button at the top of the label to display the Label Tasks menu. Select the Data
Binding option and select the HEADNORTHING.Design BRANCH data field from the pull-down list of
fields.

Add a third label and position it underneath the HEADNORTHING label and alter the size to match the other
labels in the column.

Select the associated > button at the top of the label to display the Label Tasks menu. Select the Data
Binding option and select the HEADUPING.Design BRANCH data field from the pull-down list of fields and
close the menu.

In the Designer mode, the report should now look like this:

Select the Preview tab and the resulting report, complete with data, should resemble the following:

www.aveva.com
© Copyright 1974 to current year. 92
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 5 Report Designer - Calculated fields

Using the previous section as a guide, and the Worked Example report (Training_Report), complete the
following tasks:

 Add calculated fields to extract the West, North and Up co-ordinates of the Tail Position.

 Resize the field labels on the Detail band to be the same height as the Head and Tail
Position columns.

 When previewing the report, note that the items are being split over the page breaks - to
stop this from happening, select the appropriate label: Name.Design BRANCH (first one in the
Detail row) and set it’s Keep Together property in the Behaviour section of the Property Grid to
Yes.

 Save the report.

www.aveva.com
© Copyright 1974 to current year. 93
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.5 Sorting & Grouping – A Worked Example

Grouping enables the User to group parts of the report based on the returned data. It is possible to have
multiple levels of Grouping, for example in the considered Branch List; the User may group the Branches
based on the parent Pipe, Pipe Area and Status.

Sorting allows the User to change the order in which the items are returned from the data source. Sorting
can be applied to items within the standard bands of a report and items within groups alike.

To enable Grouping or Sorting the User must first display the Group and Sort window in the Report
Designer (by default, the window it is not visible).

Open the Group and Sort window by selecting View > Window > Group and Sort from the Report
Designer main menu.

The Group and Sort window is shown below:

The following sections explain the use of Grouping and Sorting.

6.5.1 Defining a Group

For the purpose of the Training Report, Grouping will be applied to group the reported Branches by the
actual PDMS Design SITE they reside in.

The first step is to add the Site to the report Data Source.

Using the AVEVA Toolbar, click the Data Source button to initiate the Data Source Wizard. Ensuring the
Edit radio button is selected on the first wizard page, click Next > to navigate through the steps to the
Columns step.

Using the Columns step of the wizard, navigate to the Data Source Columns list and select the cell in the
first row that contains the text Type Definition…

Enter the definition: NAMN of SITE.

Locate the new definition within the list and in the Name
and Description columns enter: Site Name.

The Data Type should be set to TEXT.

Select Finish to close the Data Source Wizard.

www.aveva.com
© Copyright 1974 to current year. 94
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

To add a Group, click the Add a Group icon located in the Group and Sort
window menu bar. A menu is displayed listing the available fields that can
be used for grouping the data.

From the list of fields select: Site Name.

On selection, note that a GroupHeader1 Band has been


added to the Report Canvas. The visibility of this band is
controlled by the Show Header and Show Footer
checkboxes on the Site Name row added to the Group and
Sort window.

 Because the Preview mode only displays a preview of the report formatting, the best way to view the
result of applying Grouping and Sorting is to Run the Report using the AVEVA Toolbar.

Running the report at this point in the task will reveal little. The report will not be altered until the User
applies behaviour properties to the Grouping in order to change the report’s format.

In this instance it is required that after each Grouping the report moves to a new page. To achieve this, a
footer is added to the group to mark the last printed point in the group of reported items.

To add the group footer, tick the Show


Footer checkbox in the Site Name row
in the Group and Sort window.

Navigate to the GroupFooter1 band in the Report Canvas and


in the Property Grid, set the Page Break property (within the
Behaviour section) to After the Band.

www.aveva.com
© Copyright 1974 to current year. 95
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Using the AVEVA Toolbar, click the Run Report button and note the report contains additional pages
(originally it had 9 pages) due to the grouping of the items inserting new pages after each Site. However, at
present Site names are not being displayed and this may confuse the reader as to why the report is split
across multiple pages. Additional information is required within the report to indicate to the reader that each
report page is associated to a specific Site.

Adding a label, bound to the Site Name.Design BRANCH field, to the GroupHeader1 band will not be
sufficient for this purpose due to the group headers being printed once for each group of items. To achieve
the placing of the label on every page, the label is placed either in the PageHeader or the PageFooter
bands.

In this case, the label will be placed in the PageHeader band so that it is printed before the grouped items.

To facilitate an area to place the label, expand the PageHeader band by selecting the base of the band, and
dragging the vertical limits handle downwards.

Select all the labels in the PageHeader band and,


keeping the arrangement, move all the labels
downwards.

 The Arrow Down button can be used to move the


labels down by one label’s height.

Drag a label on to the PageHeader band and enter the text SITE :. The label has a left text alignment and a
text style Arial 12 Bold. Ensure the entire label text is visible by resizing the label.

 Note that the placed label has inherited the formatting styles of the parent item.

Drag and align the Site Name.Design BRANCH field


onto the PageHeader band adjacent to the Site : label

The label has a left text alignment and a text style Arial
12 Bold. Ensure the entire label text is visible by
resizing the label.

With both labels selected, remove the borders and


resize the PageHeader band so that it is aligned with
the bottom of the column header labels,

Using the AVEVA Toolbar Run the Report and note how the report has changed; the Site name is now
displayed at the top of each page, altering as the grouping changes.

 The first Report page will display an error for the Site name - recognisable by the red text stating: !Error.
This error is due to the Branch being in an Administrative World and so does not have an owning Site.

www.aveva.com
© Copyright 1974 to current year. 96
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.5.2 Defining a Sort

Following on from the grouping of the Branches by the name of the owning Sites, the next step is to sort the
data by the Branch Head Bore size.

In the Group and Sort window select the Add a Sort button
from the menu bar to display a menu listing available fields that
can be used to sort the data.

Select the field: HEAD BORE.

The HEAD BORE field is added as an


indented row under the Site Name group.
The Show Header and Show Footer
options are un-ticked as additional bands
are not usually warranted for a sort task.

Using the AVEVA Toolbar Run the Report again and scroll to the page that reports the Branches of SITE-
PIPING-AREA01. Note that all the Branches are now sorted by their HEAD BORE size: 15mm, 25mm etc.

To make the report more useable, the Branches will also be sorted by their Length (Cut Length in metres).

www.aveva.com
© Copyright 1974 to current year. 97
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

In the Group and Sort window select the Add a Sort button from the menu bar to display a menu listing
available fields that can be used to sort the data. Select the field: CutLengthMetres..

The CutLengthMeters field is added


as an indented row under the
previous sort field HEAD BORE.

Using the AVEVA Toolbar Run the Report again and scroll to the page that reports the Branches of SITE-
PIPING-AREA01. Note that the branches are now sorted by the HEAD BORE and then the LENGTH.

The sort order may be altered from


default Ascending to Descending
by changing the Sort Order field of
the respective sort rows.

Alter the CutLengthMeters row Sort Order from Ascending to Descending.

Using the AVEVA Toolbar Run the Report again and navigate to the page that reports the Branches of
SITE-PIPING-AREA01. Note that the branches are sorted by the HEAD BORE but, on this occasion, the
LENGTHs are listed longest to shortest.

www.aveva.com
© Copyright 1974 to current year. 98
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.6 Final Formatting Tasks (Worked Example)

On finalising the contents of a report, the User may wish to add additional information regarding the
associated project, date or the display of page numbers.

These additional format tasks are performed using label or special label controls. The following sections will
outline some of the available options and will complete the Worked Example report created through the
Training thus far.

6.6.1 Project Info Control

Considering Report Designer reports are portable between projects, rather than hard coding the project
name or number in a text label within the report, it is prudent to add labels at the point of report preview or
running whereby the current project’s system database is accessed and returns the information required.

On the Report Canvas, drag and drop a Label in


a location on the left-hand side of the top margin
above the ReportHeader Band.

By double-clicking the label, add the text Project :


and then set the text justification to the Right.

From the AVEVA tool box, drag and drop a


Project Info control next to the Project : label
placed in the top margin.

The Project Info control contains no display text.

www.aveva.com
© Copyright 1974 to current year. 99
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

With the Project Info control still selected,


navigate to the Property Grid and select the
Value property in the Data section of the grid.

From the associated pull-down list of values


select the value Project Name.

The selection will place the current project’s


Name as the display text of the label i.e. TRA

On the Report Canvas, drag and drop a second


Label in a location on the left-hand side of the
bottom margin.

By double-clicking the label, add the text


Generated by: and then set the text justification
to the Right.

From the AVEVA tool box, drag and drop a


Project Info control to an adjacent position and
set the Value to User Name.

Switch to Preview mode and note the result.

www.aveva.com
© Copyright 1974 to current year. 100
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.6.3 Page Numbering

Page numbering may be added to the report by using a Page Info control available
from the Tool Box menu. It is custom to place these controls within the Report Page
Header/Footer or margins.

Drag and drop a Page Info control onto the Report Canvas within the bottom margin, and align it with the
right-hand margin.

By default the Page Info control displays 1/1. On running the report, the Page Number is displayed as:
<Page>/<Total number of Pages>.

The User can alter the page numbering format by changing the Page Info control Page Information
property within the Property Grid. The standard options available for page numbering are presented in the
following Table.

Example of
Property Setting Description
Numbering

The current page and the total number of pages


“Current of Total” Page Numbers 3/45
(Default)

Page Number The current page 1

Page Number (Roman, Lowercase) The current page in lowercase roman numerals iv

Page Number (Roman, Uppercase) The current page in uppercase roman numerals IV

Alternatively, the User can define a bespoke page numbering format by changing the Format property in the
Property Grid.

To change the default 1/1 format to display Page 1 of 1:

 Select the Page Info control and ensure the Page Information property setting is set to “Current of
Total” Page Numbers.

 In the Property Grid type in the Format property of the Behaviour section: Page {0} of {1}, where
{0} is the current page number and {1} is the total number of pages. The display text of the control
on the Report Canvas will display Page 1 of 1, however, when the report is run the {0} and {1} will be
substituted with the page and total number of pages respectively.

Using the AVEVA Toolbar, Run the Report and note the page numbering format on each report page.

6.6.4 Adding the Date and Time

To add Date and Time information to the report, the Page Info control is again used from the Tool Box.

Drag a Page Info control onto the Report Canvas top margin and
align with the right-hand margin as shown.

Initially, the control is added as a page number counter and therefore


displays the text 1/1.

To accommodate the display of the Date and Time increase the size
of the control by dragging the left grab handle.
www.aveva.com
© Copyright 1974 to current year. 101
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Click the > button on the control to display the Page Info Tasks menu. From the Page Information pull-
down list select the Current Date and Time option.

The control will update to display the current Date in the format
of Day Month Year. To change the format of the Date and
Time, use the Page Info Tasks menu and select the
button adjacent to the Format property to display the
FormatString Editor.

Using the FormatString Editor select DateTime from the Category list and beneath the Standard Types
tab standard ways of formatting the date and time are listed. The Sample window updates to display a
preview of any selection.

Select dd MMMM yyyy hh:mm tt from the Standard Types list and click
OK to close the editor. The Page Info Task menu will now reflect the
selection as the Format and the actual control on the report will be
formatted in the chosen way.

Using the AVEVA Toolbar, Run the Report and note the time and date format.

6.7 Setting the Scope of the Report – A Worked Example

In addition to a User setting expression and attribute filters when defining the Data Source, the scope of the
report may be defined. The Scope can be inclusive of named items and their child items, the current
drawlist or a defined 3D volume. www.aveva.com
© Copyright 1974 to current year. 102
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

A report scope is defined via the Scope button on


the AVEVA Toolbar.

The top part of the Scope form contains a list of the Root
Elements to be searched within when the From field is set
to MDB (or the scope) of the report.

To add items to the list, the PDMS Design Explorer can be


used to navigate to an item before clicking the Add CE
button to append the item to the Root Element list.

To remove an item, the item is selected in the Root


Element list and the Remove button clicked.

The From field and pull-down list allows the User to select the search hierarchy. The available options are:

 MDB Searches the MDB hierarchy and is dependent on the items listed in the Root
Elements list. The report will be restricted to source data at and below the level
of these elements in the element hierarchy. Where the list is empty, the MDB
will be searched from World (/*) level downwards

 Drawlist Sets the Scope to the current items that in the User drawlist.

 Obstruction List Sets the Scope to the current items that in the User obstruction drawlist.

 Care must be taken to ensure the From field is populated. Unexpected results may be returned if this
field is not populated.

If the scope of the search is to be restricted to a volume, the User can utilise the Volume field and the
available pull-down options. These options allow the User to set the search for items to be either Partially
Within or Completely Within the specified volume.

www.aveva.com
© Copyright 1974 to current year. 103
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Volume form is displayed for either selected Volume option.

Depending on the coordinate grid system being employed, the User


can right-click on the Format  label to define the format via a context
menu to Format XYZ, Format ENU or Format Grid coordinate input.

Using the Volume form fields, the User can enter the Volume
bounding box diagonal coordinates or grid positions.

 There is no 3D graphical selection available; all the values have


to be directly entered in the available fields.

To close the form, click the OK button.

6.7.1 Setting the Scope

Considering the Branches Report formed as part of the continued Worked Example, the Base Element type
is selecting and reporting on all the Branch items from the current MDB. This selection extends to HVAC
elements; these are not required for a Piping Branch list report. To remove these elements from the report,
the scope is restricted to report solely on the Sites that contain Piping elements.

Using the AVEVA Toolbar, open the Scope form and in the
Design Explorer select the SITE /SITE-PIPING-AREA01 and
click Add CE.

Repeat the action by adding the other two piping SITES for the
plant: /SITE-PIPING-AREA02 and /SITE-PIPING-AREA02.

Ensure the three selected sites are the only items listed in
the Root Elements list, and the From field is set to MDB.

Click the OK button to close the form.

Using the AVEVA Toolbar, Run the Report and note how
the scope is now restricting the items returned to be only the
Branches within the three listed sites.

www.aveva.com
© Copyright 1974 to current year. 104
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8 Reporting via Charts – A Worked Example

Report Designer presents the ability for the User to incorporate Charts and Graphs in a report. A report can
be formed exclusively by various Charts, illustrating the Data Source elements and presenting different
categories of information, or a report may be formed by a combination of textual and Chart reporting
elements.

A selection of Charts is available to the User and can be generated in 2D or 3D orientations. As a User, the
styling for each individual part of the Chart may be defined as found with report controls. The data to be
presented in the charts can include any of the data fields originated from the associated data source and
any user-defined calculated field.

6.8.1 Chart Wizard: Adding a Chart

Continuing the Worked Example Branch List Report, a Chart will be added to the first page of the report.
Currently the ReportHeader band is the height of the report title label; vertically increase the band height to
enable the insertion of a Chart.

From the Tool Box (Standard Controls), drag a Chart control onto the ReportHeader band to place a
bounding box representing the area of the chart. The size of the chart may be modified later in the task.

The dropping of a Chart control onto the Report Canvas will automatically start the Chart Wizard.

The Chart Wizard aids the User in forming a report Chart through a series of steps (explained in following
sections) that utilise a series of Construction and Presentation chart tools.

6.8.1.1 Chart Type

The first step of the Chart Wizard is to define a Chart Type. This decision is largely dependent on the data
to be presented and may be modified at a later point if required.

For the purpose of presenting the Branch List data, a 2D Bar chart will be used.

www.aveva.com
© Copyright 1974 to current year. 105
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The pull-down menu below the main Chart Type title filters chart types by their groups. By default All Chart
Types are displayed for selection.

Select the Bar graphic.

Click Next >> to continue the next page of the Chart Wizard.

6.8.1.2 Appearance

The Appearance page of the Chart Wizard allows the User to choose the appearance of the (Bar) Chart by
specifying a colour palette

Select the Palette pull-down list and select the option Nature Colors.

Leave the Style pull down list as Nature Colors (all Colors)

Click Next >> to continue the next page of the Chart Wizard.

www.aveva.com
© Copyright 1974 to current year. 106
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.3 Series

The next step of the Chart Wizard allows the definition of the number of Series values that are required to
be displayed on the Chart.

By default there are two Series for a bar chart: Series 1 and Series 2.

For the Worked Example, only one Series is required. Select Series 2 in the list and click the Remove
button.

The User must also ensure that the Series argument and value scale types are defined appropriately.
Declaring an accurate scale type (qualitative, numerical, or date-time) for the series point’s arguments and
values is crucial for getting the correct output later

For the identified Chart the default values are acceptable.

Click Next >> to continue to the next page of the Chart Wizard.

6.8.1.4 Data

The next step of the Chart Wizard provides the User with options for populating the Series with points.

This process can be either completed manually by specifying arguments and their values for each point via
the Points tab or, if the chart's data source is known, completed automatically by specifying the data
bindings for the series via the Series Binding tab.

In this case, the data source to bind to is known and the User only has to provide the Argument Properties
and the Value Properties

Select the Series Binding tab to enable the specification of the data source settings for the Series 1 points.
www.aveva.com
© Copyright 1974 to current year. 107
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

In respect to the Argument Properties section of the form:

Navigate to the Argument scale type: field and select the


Qualitative option from the pull-down menu.

 The qualitative scale type represents the values of


series points as ordinal textual values on an axis.

Select the Argument: pull-down option to display a list of


the data source fields available and select the field:
PSPE.Design BRANCH. The menu will close and the field
will be placed as the Argument property.

In respect to the Value Properties section of the form and how the data is returned:

Navigate to the Value scale type: field and select the Numerical option from the pull-down menu to reflect
the numerical nature of the displayed data.

As a count of the branches for each specification is required, the Binding mode: is set to be a Summary
Function from the pull-down list.

To choose the type of Summary Function: required, the adjacent


button is clicked to prompt the Summary Function form.

From the pull-down list select the COUNT option and click the OK button to
close the form and update the Value Properties fields.

Click Next >> to continue to the next page of the Chart Wizard. www.aveva.com
© Copyright 1974 to current year. 108
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.5 Advanced Appearance

The Chart step of the Chart Wizard allows the User to adjust the chart's appearance.

The chart background colour, fill


style, background image, and
borders may all be altered via a
series of tabbed options.

As the default values are acceptable, click Next >> to continue to the next page of the Chart Wizard.

6.8.1.6 Diagram

The Diagram step of the Chart Wizard allows the User to customise the chart’s properties.

Each chart type has a specific


list of settings and chart
elements including axes and
secondary axes. These
elements may be added and
removed, in addition to enabling
zooming and scrolling within the
Chart through a series of tabbed
options.

As the default values are acceptable, click Next >> to continue to the next page of the Chart Wizard.
www.aveva.com
© Copyright 1974 to current year. 109
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.7 Panes

The Panes step of the Chart Wizard allows the User to change the background pane of the Chart.

The pane may be selected


directly by clicking in the chart
preview area of the wizard and
customised using the available
options/tabs.

The User is able to specify the


pane appearance, border,
shadow, scroll and zoom, fill
style and background.

 Some charts do not have a


pane and therefore this
step may be skipped.

As the default values are acceptable, click Next >> to continue to the next page of the Chart Wizard.

6.8.1.8 Axes

The Axes step of the Chart Wizard allows the User to set options for the primary and secondary axes
including their alignment, visibility and ranges.

The tabbed options allow the


User to change the properties
that belong to the axes, such as
the axis title, grid lines and tick
marks, and axis labels.

 To select an axis, you can


click it directly in the chart
preview.

www.aveva.com
As the default values are acceptable, click Next >> to continue to the next page of the Chart Wizard.

© Copyright 1974 to current year. 110


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.9 Series Views

The Series step of the Chart Wizard allows the User to set the display properties for the series including the
appearance, background colour, fill style or background image, border colour, and shadowing.

The report requires all the chart


bars to be of an equal width. To
achieve this, select the General
tab and in the Bar Options
section tick the Equal bar width
checkbox.

Unlike the preview image, each


chart bar is required to be a
different colour.

Select the Appearance tab, and


tick the Colour each point
checkbox as shown

Click Next >> to continue to the next page of the Chart Wizard.

6.8.1.10 Point Labels

The Point Labels step of the Chart Wizard allows the User to customise the appearance of the labels
which accompany the series points

The labels above the columns


of data may be modified through
a series of tabbed options.

Click Next >> to continue to the


next page of the Chart Wizard.

www.aveva.com
© Copyright 1974 to current year. 111
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.11 Chart Title

The Chart Title step of the Chart Wizard allows the User to add title(s) to the chart - an unlimited number of
textual titles are possible.

Each title position and appearance can be individually adjusted using the available options on the tabs.

 To select a chart title, you can click it directly in the chart preview.

A Chart title is required for the reported chart.

To add a title to the chart, click the Add button beneath the Titles list: pull-down menu to activate the text
area of the form - a default title of Chart Title is added.

Delete any existing text and enter:

Branches by Specification

The Preview pane updates as the title text is entered and populates the Titles list: pull-down menu.

 The General tab allows you to change the titles formatting style

Click Next >> to continue the next page of the Chart Wizard.

www.aveva.com
© Copyright 1974 to current year. 112
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

6.8.1.12 Legend

The Legend step of the Chart Wizard allows the User to add or remove a legend for the reported chart
data.

Where a legend is required, the


position relative to the chart,
appearance, background colour, fill
style, or background image, border
colour, and shadowing and call all
be specified through the available
tabbed options.

In this instance, the Chart contains


Specification details as its x-axis
values and a legend is not
required.

Select the General tab, and un-tick


the Visible check box as shown.

Click Next >> to continue the next page of the Chart Wizard.

6.8.1.13 Annotations

The Annotation step of the Chart Wizard allows the User to add text and image annotations anchored to
the chart, panes, and series points.

Through the Annotation list:


and tabbed options, annotation
can be defined and modified in
respect to their position, layout,
appearance etc…

Click Finish to close the Chart


Wizard.
www.aveva.com
© Copyright 1974 to current year. 113
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The completed chart should now be visible within the ReportHeader area of the Report Canvas.

To resize the chart, select the chart and using the grab handles on the control, stretch the bounding box to
the desired size.

Using the AVEVA Toolbar, Run the Report and note how the Chart is incorporated into the report.

6.9 Summarising Report Data - A Worked Example

Often a report will contain summaries of the reported data e.g. total material length or total number of
reported items. The following example will outline the process of adding a summary through the addition of
a summary label that counts all the report items within each reported group. A Table control will be created
to keep the created summary labels together.

To add a Table, select the Table control from the


Tool Box (Standard Controls) and drag to a
point to the right of the created chart in the
ReportHeader area of the canvas. The default
table bounding box is larger than a normal label
control, as by default it is placed on the canvas
with three columns. Each table cell is individually
labelled.

The report requires a table formed by


one column and two rows. The number
of columns and rows can be altered via a
right-click context menu containing
additional table layout options.

Select the right hand column cell of the


table and, using the right-click menu,
select: Delete > Column to delete the
column and resize the remaining
columns to suit the boundary box area.
www.aveva.com
© Copyright 1974 to current year. 114
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Using the same process, delete the


second cell forming the row.

To add the required second row, select


the remaining cell and using the right-
click menu select: Insert > Row Below.

To reduce the table width, select the table control and navigate
to the Property Grid.

Select the Size property in the Layout section and change the
value to 140, 50 as shown.

As described earlier, alter the top cell text to: Total Branches and change the style to Arial, 11pt, Bold.

Ensure the table cells are set to Text Alignment: Middle Centre.

The Table will now resemble the following:

The next step is to bind the table cell ‘tableCell3’ to a Data Field – following the same procedure described
for a label control.

Select the bottom cell of the table, and click the associated > button at the top right corner to display the
Table Cell Tasks menu.

Set the Data Binding to the Data Field Name.Design BRANCH by selecting the field from the pull-down list
but do not dismiss the form.

Now that a Data Field is bound to the cell, the Summary information is required to be set i.e. what the cell
will display on the report.

www.aveva.com
© Copyright 1974 to current year. 115
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Click the button in the Summary field to display the Summary Editor form.

The purpose of the table is to perform a


count of the number of branches in the
report, therefore the Summary function
is altered to Count, and the Summary
Running set to be Report - the counter
is for the whole report.

Click the OK button to close the form.

The bottom table cell is updated to show the Summary function and the field it is
being applied too.

Before running the report, select the


ReportHeader band and in the Property Grid set
the Page Break value to After the Band. This
will insert a new page after the Report header has
been printed.

Using the AVEVA Toolbar, Run the Report and note the first page should display a chart illustrating the
different Piping Specifications referenced in the project and a table summarising the total number of
branches that are in the report.

To produce a branch count within each of the Groupings, select the table control on the ReportHeader band
and copy/paste to a suitable position in the GroupFooter1 band of the report using normal keyboard
controls (Ctrl+c and Ctrl+v).

Select the bottom cell in the copied table and click the > button at the top right corner to display the Table
Cell Tasks menu.
www.aveva.com
© Copyright 1974 to current year. 116
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Click the button in the Summary field to display


the Summary Editor form. Due to the summary
applying to a Group this time rather than the report,
set the Summary Running to be Group.

Click the OK button to close the form.

Using the AVEVA Toolbar, Run the Report again and note the summary table associated with each
reported grouping.

www.aveva.com
© Copyright 1974 to current year. 117
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 6 Report Designer - Summarising Structural Steel Report

Using the Branches Worked Example report (Training_Report) as a guide, complete the following tasks:

 Re-create the summarising structural steel report that you created for Standard Reporting
(Exercise 2 Standard Reporting - Report Templates) using Report Designer.

 The report must include the profile name; the description of the material reference, the
profile cut length, the gross weight, the net weight, the gross surface area, the net surface area
and the number of pieces.

 The report must be subtotalled when the profile name and description of the material
reference change.

 All numeric columns must be subtotalled and totalled.

Exercise 7 Report Designer – Branch Members Report

Using the Branches Worked Example report (Training_Report) as a guide, complete the following tasks:

 Re-create the branch members report that you created for Standard Reporting using the
Report Designer.

 The report must include the profile name; the description of the material reference, the
profile cut length, the gross weight, the net weight, the gross surface area, the net surface area
and the number of pieces.

 The report must be subtotalled when the profile name and description of the material
reference change.

 All numeric columns must be subtotalled and totalled.

www.aveva.com
© Copyright 1974 to current year. 118
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 7

7 Report Designer - Quick Reports

The following Chapter will describe the use of the PDMS Search Utility to create a Quick Report by binding
the search results to a Report Layout Template.

7.1 Creating a Quick Report from Search Results

The Search utility enables the databases to be searched for specific items. The scope of the search may be
defined and the items may be identified by different criteria including name, type, and attributes

 For further information on the Search Utility refer to TM-1003 Design Utilities.

The PDMS Search Utility is initiated by selecting Display > Search… from the main menu. The Search
form is displayed.

© Copyright 1974 to current year. 119


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The following sections describe the elements of the Search form used to form a search result suitable for
the creation of a Quick Report.

7.1.1.1 Name Contains

The items to be searched for may be specified by names that contain a specific string, one or more element
types or a combination of both.

A character string may be entered in the Name Contains textbox. The string may be of any length and
contain any permissible name character. The search is case sensitive.

7.1.1.2 Element Type

One or more valid PDMS element types may be entered in the Element Types textbox that will form the
basis of the data produced in the report. If more than one item type is entered they must be separated by a
space, comma, or semi-colon, i.e. EQUI PIPE, NOZZ; TEE. The entries may be any valid item types and
are not case sensitive. The options list contains an ALL option (the default) which, if selected, will find all
item types in the current search scope.

 Consideration should be given when entering multiple element types, to the attributes that will be used
in the quick report. Element types that have few attributes in common may, depending on the
attributes used, have many ‘null’ columns.

The reserved word MEMBERS may be used in conjunction with different element types. For example,
entering BRAN MEMBERS will report on all of the members of a Branch (BRAN), e.g. ELBO, TEE, VALV,
GASK, FLAN, etc.

7.1.1.3 Search Filters

The Search Filters fold-up panel contains two methods to specify the search scope; a hierarchical search
below a ‘ceiling’ or a volumetric search within a specified volume. Each of these methods may be used
separately or they may be combined.

Checking the Beneath Element checkbox


activates the search below a ‘ceiling’ option.

The ‘ceiling’ may be changed by entering a valid item name in the textbox or clicking the CE button to set
the current element as the ‘ceiling’ for the search.

 When the Search utility is first opened during a session, the default scope will be set to the World
element (/*) as the ‘ceiling’ of the search within the current database, e.g. Design, if within the Design
application.

As well as searching specific database types via the In Database option, it is possible to narrow the scope
of the search further by checking the Element List checkbox. This activates a number of options available
via the adjacent pull-down list.
www.aveva.com
© Copyright 1974 to current year. 120
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

 Draw List - will only search elements currently in the draw list.
 Graphical Selection – only elements within the current graphical selection will be searched.
 My Data – only the contents of the My Data storage location will be searched.
 My Data Selection – only the data stored within the current My Data selection will be searched.

Checking the In Volume checkbox activates the Of


Element and Explicit Volume radio buttons.

Selecting the Of Element radio button enables an


element to be selected in the design explorer and then
the CE button clicked to set the search volume to the
bounds of this element.

The elements entered in the Of Element options list will


be retained throughout the current session; however, this
history can be cleared by selecting Clear History from
the options list.

Checking the Explicit Volume checkbox activates the


textboxes in the Lower Limit and Upper Limit areas of the
fold-up panel, enabling the opposing corners of a box to
be specified by entering the X, Y and Z co-ordinates to
define the volume explicitly.

The Wholly Within and Wholly & Partially within radio buttons, which are applicable to both methods of
volumetric search, specify whether the found items exist completely or partially within the specified volume.

7.1.1.4 Attribute Filters

The Attribute Filters fold-up panel enables one or


more attribute filters to be set for the search.

The specified attributes will apply to each item type


listed.

If there is more than one attribute filter specified


then the found items will satisfy all of the attribute
filters.

The Add Filter and Delete Filter link labels at the bottom of the fold-up panel enable an attribute filter to be
added and deleted as required.

 Where the search is being used as the basis of a report, the User is also able to add filters within the
Reports Definition.

www.aveva.com
© Copyright 1974 to current year. 121
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

7.1.3 Running the Search

Clicking the Search button will execute the search and the results will populate the grid of the Search
Results Window.

 The Search Results form may be opened at any time by selecting Display > Search Results from the
main menu.

The Search Results form displays the results in a grid gadget.

Each column of the grid represents an attribute of an item in


the database(s). The columns to be displayed can be
specified and the results can be grouped, sorted and filtered.

Some attributes in the results grid may be edited individually


or by bulk editing.

Attributes (Columns) can be added and removed from the search results
grid by right mouse clicking on the heading row of the columns and, on the
context menu, selecting the Column Setup… option.

This will display the Column Setup form. On this form the User can enter the attribute name and a column
heading, including UDA and Pseudo attributes. As well as attributes, valid PDMS expressions can be
entered to return more purposeful data, for example:

Expression Resulting Column Data

PURP OF OWNER Returns the value of the Owning items Purpose attribute

HBORE GE 100 Displays true or false depending on the HBORE’s NB

MCOUNT Returns the number of members of the item in the search

Displays the name of the items owning SITE without the leading
NAMN OF SITE
slash
Displays the name of the items owning items owner without the
NAMN OF OWNER OF OWNER
leading slash

 The order of the attributes in the Column Setup form, will be the initial order in the report, however these
can be re-arranged in the Report Designer later if required.
 If the width of the columns in the Search Results grid is changed, then this will be reflected in the
report’s initial layout.
www.aveva.com
© Copyright 1974 to current year. 122
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

7.1.4 Create Quick Report

On selection of the attribute columns to be reported upon, the Quick Report…


option may be selected via the right-click context menu when the cursor is
located within the Search Results grid header bar.

The Quick Report form is displayed.

The Quick Report form displays potential Layout Templates of differing styles and size to be used as a
basis for a report. The User is able to populate the available Layout Templates by navigating via the Look
In pull-down to a suitable Project, User, Product or file location e.g. C:\AVEVA\Plant\Data12.1.xx\
pdmsui\DFLTS\data\reports.

On selection of a Layout Template from the list, a preview is displayed in the Layout Preview area of the
form.

To create the report, the Open button is clicked and the User is prompted to apply a default layout to the
selected report Layout Template.

On clicking Yes the report is processed and the Quick Report Designer – New Report window is displayed
in Preview mode; the report is populated with the stipulated data within the report Data Band.
www.aveva.com
© Copyright 1974 to current year. 123
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

If the User selected No on the default layout confirmation message, the Report detail band remains
unpopulated and the User is required to manually define the layout of the fields (attributes).

As described in previous chapters, the Page Layout and Data Columns can be modified by switching to the
Designer mode tab and manipulating data field labels, controls, report bands etc.

The report may be saved, exported and printed in the same way as described in Sections 4.3 and 5.1.1.

7.1.5 Creating a Quick Report – A Worked Example

In this Worked Example a simple report of the pipe branches in the ZONE /ZONE-PIPING-AREA01 will be
produced. The report will be modified to show only branches of certain specifications.

Working in the PDMS Design module, select Display > Search… from the main menu to display the Search
form.

In the Search For: area of the form,


enter BRAN in the Element Type:
textbox.

Under the Search Filters, ensure only


the Beneath Element checkbox is
ticked, and in the textbox enter /ZONE-
PIPING-AREA01.

Add a Filter to the Attribute Filters list


that has an Attribute of HBORE, select
Greater than or equal to from the
Operator pull-down list and enter 100
in the Value field.

This search will only find those


branches in the ZONE whose head
bore are greater or equal to 100mm.

Run the search by clicking the Search button. The results will be displayed in the Search Results window.

The search result attributes need to be extended for the scope of the report. Using the right-click context
menu within the search grid column headers, select the Setup Columns… option to display the Setup
Columns form.

There is no requirement to report the Type


attribute. Select Row 2 which should have the
Expression of Type, and uncheck the Visible
cell as shown.

Using the Add Column link on the form, enter the attribute name PSPEC as the Expression in the new
row; leave the Heading as the system default. www.aveva.com
© Copyright 1974 to current year. 124
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Repeat for the following attributes, HBORE, HCON, HPOS, TBORE, TCON, TPOS, CLLE, leaving the
headings as per their system default.

Once all of the attributes have been entered into the Expression column, click the OK button to refresh the
Search Results grid. The grid is updated with the addition of the new columns, filled with the relevant data
from the database.

Expand the Search Results form and adjust the widths of the displayed columns to show all of the data. To
adjust a column width, select the gap between the column heading (note the cursor will change to a ) and
holding the left mouse button, move the cursor left and right.

The Search Results grid will now be as follows:

Now that the required data has been established and collated, the creation of a report is required.

Right click on the Search Results column header row and select the Quick Report… option from the menu.

www.aveva.com
© Copyright 1974 to current year. 125
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Quick Report form will be shown:

Select the A4-Landscape template from the list of Product layout templates, noting any preview displayed
in the Layout Preview window.

Click the Open button to select the template.

On being asked whether to Apply default layout to selected report layout template, click Yes to
automatically apply the column layout to the report template.

 Applying the default layout will take the exact layout of the Search Results grid and apply it to the
Report Template. If the default layout is not selected, the User must drag columns onto the page and
size them to suit the report requirements.

The report will now be displayed in the Preview tab of the Quick Report Designer – New Report window.

www.aveva.com
© Copyright 1974 to current year. 126
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The preview will display the data, laid out as per the Search Results grid, and allows verification of data and
layout before running the report.

On verifying the report is adequate, using the Quick Reporter window Toolbar select the PDF File option to
display the PDF Export Options form.

The form may be used to enter any relevant information regarding the report or set security options.

Click the OK button.

The Save As dialogue will be displayed. Enter Branch List Area01.pdf in to the File name: textbox.

 The default folder in which Quick Reports are


saved is:
C:\AVEVA\Plant\Data12.1.xx\pdmsuser\<Proj-
code>\Data\Reports, where <Proj-code> is the
current project 3 letter code.

Click the Save button to save the report to the file system.

The prompted Export form presents the option to open the file, click Yes.

www.aveva.com
© Copyright 1974 to current year. 127
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The PDF version of the report is displayed.

Close the PDF view of the report.

If one wanted to change the reported search results, for example to report on all the Branches that have a
HBORE GE 100 and also have a PSPEC of /A1A, the User has two options:

 Repeat the Quick Report process following a change to the Attribute Filters on the Search form.

 Filter the contents of the current Quick Report within the Quick Report Designer without having to
re-run the search.

Considering the second option, navigate back to the Quick Report Designer – New Report window and
select the Designer mode tab.

www.aveva.com
© Copyright 1974 to current year. 128
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Ensuring the report is current, navigate to the Property Grid


and select the option A4 Landscape Report from the top pull-
down list of the Property Grid.

Navigate to the Data section and select the property Filter


String and click the adjacent button to display the
FilterString Editor window.

In the FilterString Editor window, select the Visual


tab to be presented with the text link And . On
clicking the link, a list of the associated available
conditions is listed.

Select the text link word And; from the list of options
select Add Condition to spawn a new branch from
the And.

Select the [Name] link to present a list of the Fields


(attributes) that are available in this report.

Select PSPEC from the list.

Next select the link Begins with. From the list of


operands select = Equals.

Finally select the <enter a value> link. In the text


box enter the text /A1A.

Close the window by clicking the OK button.

The Filter String property should now be set.

To see the result of the filter on the currently searched items, select the Preview tab and the resulting report
should look similar to this:

www.aveva.com
© Copyright 1974 to current year. 129
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

Exercise 8 Report Designer - Quick Reports

Using Chapter 7 as a guide, complete the following tasks:

 Search for all the nozzles of the equipment in the ZONE /ZONE-EQUIPMENT-AREA01 of
the Training Project. The report must include the owners name, the nozzle name, the nozzle
nominal bore, the nozzle position and orientation and the connection reference, if any.

 Create a Quick Report of the Search Results grid.

 Output the report as a text file named Nozzles.txt.

 Use the Filter String to report only the nozzles that are not connected, i.e. the nozzles that
have a connection reference of Nulref, and save the report as a pdf file named UnConnected
Nozzles.pdf.

www.aveva.com
© Copyright 1974 to current year. 130
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
CHAPTER 8

8 Report Designer - Running a Report

Having established the report creation process for Report Designer, the following Chapter will outline how
the defined reports can be retrieved and run as part of a project.

8.1 Running a Report A Worked Example

Reports created in Report Designer can be shared across a project or organisation and run directly from the
Report Definition (.repv) file. As previously discussed, the Report Definition file defines the report
presentation and Data Sources.

To run a report, select Utilities > Reporting > Run Report… from the PDMS main menu to display the Run
Report form.

The User can locate an appropriate report using the Look In pull-down menu and selecting Product,
Project, User or Browse. If Browse is selected, the User is able to locate a report across the file system.

With the Product level selected, choose the DESIGN-Valve_List from the list of reports under the Report
Definition tab.

 If the report has parameters that need to be entered the User will be prompted to supply the data.

On selecting the report a preview of the report contents, excluding actual database data, will be shown in the
Layout Preview window of the form.

© Copyright 1974 to current year. 131


AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Run button is now available for selection and may be selected if all is correct.

The resulting report will be shown in the Run Report window, as shown below:

www.aveva.com
© Copyright 1974 to current year. 132
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Run Report window has facilities for printing, exporting in various file formats, and publishing the report
in PDF format with data and associations, if configured, to AVEVA NET.

Print Options.
Page Setup Options.

Export Report (in one of the available formats) and


Save to File.

Export Report (in one of the available formats) and


Attach to Email.

Publish to AVEVA NET.

To export the document, select the Export Report (and save to file) button on the Toolbar and select the
format to save the document in. Select the PDF File option.

The PDF Export Options form will be displayed.

The form may be used to enter any relevant


information regarding the report or set security
options.

Click the OK button.

www.aveva.com
© Copyright 1974 to current year. 133
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.
AVEVA Plant (12.1)
Reporting TM-1004

The Save As dialogue will be displayed. Enter Design-Valve.pdf in to the File name: textbox.

 The default folder in which Quick Reports are


saved is:
C:\AVEVA\Plant\Data12.1.xx\pdmsuser\<Proj-
code>\Data\Reports, where <Proj-code> is the
current project 3 letter code.

Click the Save button to save the report to the file system.

The prompted Export form presents the option to open the file, click Yes.

The PDF version of the report is displayed.

Exercise 9 Report Designer - Quick Reports

Using Chapter 8 as a guide, locate and run the reports created in Chapters 6 and 7

www.aveva.com
© Copyright 1974 to current year. 134
AVEVA Solutions Limited and its subsidiaries.
All rights reserved.

You might also like