Sie sind auf Seite 1von 51

Reporting Using VANTAGE PDMS

Version 11.6

pdms1160/Reporting
issue 140403
PLEASE NOTE:
AVEVA Solutions has a policy of continuing product development: therefore, the
information contained in this document may be subject to change without notice.
AVEVA SOLUTIONS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO
THIS DOCUMENT, INCLUDING BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
While every effort has been made to verify the accuracy of this document, AVEVA Solutions
shall not be liable for errors contained herein or direct, indirect, special, incidental or
consequential damages in connection with the furnishing, performance or use of this material.

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.

© Copyright 1991 through 2003 AVEVA Solutions Limited


All rights reserved. No part of this document may be reproduced, stored in a retrieval system or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise, without prior written permission of AVEVA Solutions.
The software programs described in this document are confidential information and
proprietary products of AVEVA Solutions or its licensors.

For details of AVEVA's worldwide sales and support offices, see our website at
http://www.aveva.com

AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge CB3 0HB, UK
Contents

1 Introduction to Reports................................................................................1-1
1.1 The Sample Report Templates ................................................................................................. 1-1
1.2 Before You Start....................................................................................................................... 1-2
1.3 Starting to Use Reports............................................................................................................. 1-3
1.4 How to Use This Manual.......................................................................................................... 1-3
1.5 Running a Report from a Saved Template ............................................................................... 1-3
2 Creating and Running a Simple Report ......................................................2-1
2.1 Creating a Simple Nozzle Schedule ......................................................................................... 2-1
2.1.1 Destination...................................................................................................................... 2-1
2.1.2 Selection ......................................................................................................................... 2-1
2.1.3 Columns.......................................................................................................................... 2-2
2.1.4 Running the Report ........................................................................................................ 2-3
2.2 Column Layout......................................................................................................................... 2-3
2.3 Adding and Moving Columns .................................................................................................. 2-4
2.4 Runtime Prompts ...................................................................................................................... 2-4
2.5 Saving and Deleting Templates................................................................................................ 2-5
2.5.1 Saving a Template .......................................................................................................... 2-5
2.5.2 Deleting a Template ....................................................................................................... 2-6
2.6 Reporting on Different Parts of the Database........................................................................... 2-6
2.6.1 Adding Elements using the Members List ..................................................................... 2-7
2.6.2 Adding Elements in a Given Volume............................................................................. 2-7
2.6.3 From ............................................................................................................................... 2-7
2.7 More Column Layout Options.................................................................................................. 2-8
2.7.1 Layout............................................................................................................................. 2-8
2.7.2 Numeric Display........................................................................................................... 2-10
2.7.3 Text Display ................................................................................................................. 2-10
2.8 Introductions and Summaries ................................................................................................. 2-11
3 Sorting and Totalling....................................................................................3-1
3.1 Changing the Order of Sorting ................................................................................................. 3-2
3.2 Sorting on More than one Attribute.......................................................................................... 3-3
3.3 Totalling ................................................................................................................................... 3-5
3.4 Subtotalling .............................................................................................................................. 3-6
3.4.1 Showing only the First Occurrence of Values................................................................ 3-7
3.5 Quantity .................................................................................................................................... 3-9
4 Selective Reporting ......................................................................................4-1
4.1 Introduction to Expressions...................................................................................................... 4-1
4.1.1 Format of Expressions.................................................................................................... 4-2
4.1.2 Operator Precedence....................................................................................................... 4-3
4.2 Using Positions in Expressions ................................................................................................ 4-3
4.2.1 WRT ............................................................................................................................... 4-4
4.2.2 FROM............................................................................................................................. 4-6

Reporting from VANTAGE PDMS contents-i


Version 11.6
Contents

4.3 Using IDs in Expressions ......................................................................................................... 4-8


4.4 Direction ................................................................................................................................... 4-9
4.5 Orientations .............................................................................................................................. 4-9
4.6 Comparing Positions, Directions and Orientations .................................................................. 4-9
5 File Reports...................................................................................................5-1
5.1 The Page Information Options ................................................................................................. 5-1
5.2 Report Variables....................................................................................................................... 5-1
5.2.1 Late Evaluation of Variables .......................................................................................... 5-2
5.2.2 Points to Note ................................................................................................................. 5-3
5.3 Headers, Footers and Page Lengths.......................................................................................... 5-3
5.4 Introduction and Summaries..................................................................................................... 5-3
5.5 Examples .................................................................................................................................. 5-4
6 Additional Information .................................................................................6-1
6.1 Running Reports in Batch Mode .............................................................................................. 6-1
6.2 The System Command option .................................................................................................. 6-1
6.3 Report Output Formats ............................................................................................................. 6-1

contents-ii Reporting from VANTAGE PDMS


Version 11.6
1 Introduction to Reports

This manual is an introduction to the PDMS Reports Utility, available in DESIGN,


DRAFT and PARAGON.
The main features of the Report Utility include:
• Generation of report to file or screen.
• Listing of any element from a PDMS database.
• Specify lists of properties by which elements can be sorted.
• Quantifying of lists under sub-totals and grand totals.
• The ability to create expressions for column values, based on the contents of the
column or the results of other columns.
• The ability to use expressions in report output, including user definition of titles,
summaries, headers and footers.
• Generation of reports with specified column widths and delimiters for
interfacing to other database systems or spread sheets.
• Complete control over the report definition and layout.
• Generation of reports using the batch process.

1.1 The Sample Report Templates

You produce a report by running a report template. The template specifies what the
report will contain, whether it will be sent to the screen or a file and how it will be
laid out. Templates also specify what information can be specified at the time the
report is run, for example, what part of the database, or the output filename.
There is a library of example reports supplied with the product in the directory
%PDMSUSER%/REPORTS. Under this directory is a TEMPLATES directory,
which contains the templates which generated the reports. The templates are PDMS
macros, but the best way to see how they are set up is to select Utilities>
Modify>Report from the main menu, and look at the settings on the forms
displayed.
Templates have the file extension .tmp, and the corresponding reports have a file
extension .rep.
Most of the examples are based on the sample project and the sample templates
supplied with the product.

Reporting from VANTAGE PDMS 1-1


Version 11.6
Introduction to Reports

The sample templates produce the following types of report:


nozz_sched This is a Nozzle schedule, which lists all Nozzles sorted
by name, and shows the P1 bore, connection type and
direction, and the position of each Nozzle.
line_list This report is a list of Branches, sorted by the name of the
Pipe which owns them. The Head and Tail bores and the
Head and Tail references are given.
pipe_mto This report shows material information for all Branch
members, sorted by type, Detail Text and Material Text.
The Tube length and quantity of each component are
totalled. There is an Imperial version of this report
template.
tube_mto This report totals all Tubing. The Specification
Reference, P1 Bore, Detail Text and Material Text are
shown.
steel_mto This is a material take-off list for structural components.
valve_list This report is an example of selective reporting.
centre_line The centre-line length of each Branch is listed. There is
an Imperial version of this report template.
tube_gradient This report gives the gradient of each tubing component.
catalogue_param This is an example of reporting on the catalogue
database. It lists Branch members, with their CATREFs
and the parameters of the CATREFs.
catalogue_ptgmref This is an example of reporting on the catalogue
database. It lists Branch members, with their CATREFs
followed by the PTREFs and GMREFs of the CATREFs.
tube_area_vol This report uses derived properties to report on the area
and volume of tubing.

1.2 Before You Start

This manual assumes that you are familiar with PDMS to the level of the Basic
Training Course.
Most of the examples in this manual illustrate templates which report directly on
PDMS attributes and pseudo-attributes. You can also use more complex expressions
in report templates, and although some of these are illustrated, you will need to be
familiar with PML, the Cadcentre Programmable Macro Language, if you want to
set these up for yourself.

1-2 Reporting from VANTAGE PDMS


Version 11.6
Introduction to Reports

For information about further training, please contact your nearest Cadcentre
Support Office (see the copyright page at the front of this guide for details).
To use the sample templates supplied with the product, the PDMS variable
$PDMSREPDIR should be set to the directory where the sample reports are stored.

1.3 Starting to Use Reports

You will usually have a library of report templates set up for you, but you can
produce and run a report template quickly by selecting Reports>Create, filling in
the New Report Template form to specify what you want to report on and then
pressing Apply on the form, which will run the report.
Note that this is the easiest way of testing a template that you are creating or
modifying.

1.4 How to Use This Manual

Section 1.5, Running a Report from a Saved Template, summarises how to run a
report from a saved template, which you may already know about.
Chapter 2, Creating and Running a Simple Report, is a tutorial which works
through the steps of creating a simple report template, running it and saving it.
Chapter 3, Sorting and Totalling, illustrates sorting and totalling by modifying the
sample templates.
Chapter 4, Selective Reporting, is an introduction to using PML expressions to
produce selective reports.
Chapter 5, File Reports, describes the options which are only applicable to file
reports, including inserting headers and footers. It also describes how to insert
introductions and summaries, which can be provided for screen reports as well, but
they are created in the same way as headers and footers.
Note that not all the options on all the forms are described when they are first seen.
If you want more information about a form, use the online help.

1.5 Running a Report from a Saved Template

You may already be familiar with creating a report by running a saved report
template. If not, try this introductory exercise:

Reporting from VANTAGE PDMS 1-3


Version 11.6
Introduction to Reports

1. Select Utilities>Reports>Run. You will see a File Browser, showing the


contents of the directory REPORTS. Select the TEMPLATES sub-directory.
2. Select the report template pipe_mto.tmp and select OK. You will see the
Report Details form, with the following options:
Filename
If you specify a filename, the report will be sent to the given file in your
working directory. If you leave the text box empty, the report will be sent to
the screen.
Hierarchy
Give a list of elements. The report will be output for all the elements given,
and all the elements owned by them.

1-4 Reporting from VANTAGE PDMS


Version 11.6
2 Creating and Running a Simple Report

This chapter describes how to create a simple report template, run it and save it. To
work through the example, start up DESIGN, DRAFT or PARAGON, using the
SAM project.

2.1 Creating a Simple Nozzle Schedule

The exercise creates a nozzle schedule, a simplified version of the one in the
template nozz_sched.tmp supplied with the product.
If you are running DRAFT, make sure that the Members List for the DESIGN
database is displayed.
Select Utilities>Reports>Create. You will see the New Report Template form.
There are several groups of options on the form, described in the following
subsections.

2.1.1 Destination
Destination allows you to specify whether the report is output to Screen. or to a
File.

1. For this example, select Screen.

2.1.2 Selection
The Selection options allow you to specify the type of item you want to report on,
and the level in the database hierarchy below which the selection will be made.
The Zone EQUIP in the sample project contains the Equipment /E1301, which owns
several Nozzles. We will produce a template to report on these Nozzles.

Reporting from VANTAGE PDMS 2-1


Version 11.6
Creating and Running a Simple Report

For this example:


1. Enter NOZZ in the Type(s) textbox.
2. Leave the With text box blank. This is used in selective reporting, described in
Chapter 4, Selective Reporting.
3. Replace WORLD in the Hierarchy text box with /E1301. Note that the slash
must be present, as you can give several names in the box.

2.1.3 Columns
Now create three columns for the report, to display the name of the Nozzle, the
arrive bore and the position, using the Columns options.

1. Select the New option button, and the Creating Column form will be
displayed.

The Expression text box defines the contents of the column. You can enter a
PDMS attribute or pseudo-attribute here, or an expression containing attributes or
pseudo-attributes.
Ignore the Sorting and Precedence option for now. By default, the list of items in
the report will be sorted in the order in which they are stored in the database.
You can set the Units option when appropriate.
The Column Layout button is used to control the format of each column, but we
will use the default layout for now.

Fill in the form as follows:


1. For the first column, enter NAME in the Expression text box.
2. This is all you need to set for the first column: do not press OK yet, but select
Next Column. The settings on the Creating Column form will be cleared
ready for you to define the second column.
3. The second column will display the arrive bore of the Nozzles. Type P1
BORE into the Expression text box. Select Units of Any/mm.
4. Select Next Column again and define the third column, which will display
the coordinates of the Nozzle, by entering POS into the Expression text
box. Units should be set to Pos(mm).
Now select OK on the Creating Column form. Note that the three columns you
have defined are shown in the scrolling list on the New Report Template form.

2-2 Reporting from VANTAGE PDMS


Version 11.6
Creating and Running a Simple Report

2.1.4 Running the Report


Select Apply on the New Report Template form, which will run the report.
The report will be output to a window: if you have an active window displayed, for
example the command line window, the report will be displayed there. If there is no
active window, a new window will be opened.
The report should look like this:

NAME P1 BORE POS


/E1301-S1 200.00 E 0.00 N 3540.00 D 635.00
/E1301-S2 200.00 E 0.00 N 1100.00 U 635.00
/E1301-S3 200.00 E 0.00 N 5980.00 U 635.00
/E1301-T1 100.00 E 0.00 N 290.00 U 635.00
/E1301-T2 100.00 E 0.00 N 290.00 D 635.00

Note that by default the text that you entered in the Expression text box is used as
the column heading. You can change this, as described in Section 2.7.3, Text
Display.

2.2 Column Layout

The layout of this report is not very easy to read, so now we will use the option on
the Layout for Column form to improve it.
Highlight POS in the list on the New Report Template form, and select Modify.
On the Modifying Column 3 form, select Column Layout, and you will see the
Layout for Column form.
Set the Spaces before Column option to 4, and set Justification to Left. The
output will look like this:

NAME P1 BORE POS


/E1301-S1 200.00 E 0.00 N 3540.00 D 635.00
/E1301-S2 200.00 E 0.00 N 1100.00 U 635.00
/E1301-S3 200.00 E 0.00 N 5980.00 U 635.00
/E1301-T1 100.00 E 0.00 N 290.00 U 635.00
/E1301-T2 100.00 E 0.00 N 290.00 D 635.00

Further column layout options are describes in Section 2.7, More Column Layout
Options.

Reporting from VANTAGE PDMS 2-3


Version 11.6
Creating and Running a Simple Report

2.3 Adding and Moving Columns

Now we will add two more columns to the report, for P1 CONN and P1 DIR.

1. A new column is inserted before the one selected in the list on the New
Report Template form. To insert a column at the end of the list of columns,
make sure that the entry reading <end> is highlighted, and select New again.
2. Enter P1 CONN into the Expression text box and set Units to Off. On the
Column Layout form, set justification to Left. Select Next Column on the
Creating Column form.
3. Enter P1 DIR into the Expression text box and set Units to Off. On the
Column Layout form, set justification to Centre and select OK.
4. Select OK on the Creating Column form.

Remember that inserting a new column will renumber all columns to the right of the
new column.
Now move the POS column so that it is the last (fifth) column again.

1. Highlight the POS column in the list on the New Report Template form,
and select the Move option button. You will see the Move Column form.
Select 5 from the option gadget and select OK.
2. Select Apply on the New Report Template form. The modified report
should look like this:

NAME P1 BORE P1 CONN P1 DIR POS


/E1301-S1 200.00 FBD D E 0.00 N 3540.00 D 635.00
/E1301-S2 200.00 FBD U E 0.00 N 1100.00 U 635.00
/E1301-S3 200.00 FBD U E 0.00 N 5980.00 U 635.00
/E1301-T1 100.00 FBB U E 0.00 N 290.00 U 635.00
/E1301-T2 100.00 FBB D E 0.00 N 290.00 D 635.00

2.4 Runtime Prompts

If you are going to save the template so that it can be run in future, it is likely that
you will want to have some control over the content when the report is run. For
example, you will want to specify the part of the hierarchy to report on.
You can control what information the user is prompted for when the report is run
using runtime prompts. The Runtime Prompts form will be displayed when you
select Options>Runtime Prompts on the menu on the New/Modify Report
Template form.

2-4 Reporting from VANTAGE PDMS


Version 11.6
Creating and Running a Simple Report

The options correspond to the options on the New/Modify Report Template form.
They are:
File name
Type(s)
With
Hierarchy
Volume
From
File name allows you to specify the file where the report will be stored. The only
other options we have looked at so far are Type(s) and Hierarchy.

1. Switch on File name, Type(s) and Hierarchy on the Runtime Prompts


form and select OK.
2. Now run the report again, by selecting Apply on the New Report Template
form. You will see the Report Details form, with the values you have set on
the Report Template form for the three parameters displayed. You can now
change them: for example, enter a filename, and add other Equipments to
Hierarchy.

Note 1: If you specify in the template that a report will be sent to a file, and the user
removes the filename on the Report Details form, the report will be sent to
the screen. However, if you specify that the report will be sent to the screen,
do not switch on the Filename option on the Runtime Prompts form,
because the report will be sent to the screen even if the user gives a
filename.
Note 2: Do not set any runtime prompts for report templates intended for batch
mode.
Note 3: Text boxes filled on the Runtime Prompts form will appear as defaults on
the Report Details form.

2.5 Saving and Deleting Templates

2.5.1 Saving a Template


If you want to save the report template in a file, select one of the options under File
on the menu at the top of the New Report Template form:
Save As allows you to save the template in a new file. A File Browser will
be displayed.

Reporting from VANTAGE PDMS 2-5


Version 11.6
Creating and Running a Simple Report

Save saves the template to the current file if the template has been saved
already. The filename is shown in the title bar of the form.
Note: The file where the template is stored has no relation to the file specified
if you want to output the report itself to a file. See Chapter 5, File Reports,
for more information.
You can save your template if you wish, provided you have write access to the
directory, but you will not need it in future exercises.

2.5.2 Deleting a Template


If you select Reports>Delete, you will see a File Browser from which you can
select the template or report you want to delete.

2.6 Reporting on Different Parts of the Database

The following exercises are based on the supplied template pipe_mto.tmp. You
may wish to look at the corresponding supplied report, pipe_mto.rep, first, using a
text editor.
Select Utilities>Reports>Modify, and select the template from the list. The
Modify Report Template form will be displayed. Note that this is exactly the same
as the New Report Template form, except that the name of the template is shown
in the title bar of the form, and the setting for the template are shown on the form.
Note: All the supplied templates output to files, and have runtime prompts
set. For the exercises, we suggest that you send the reports to the screen,
and switch off the runtime prompts by selecting Options>Runtime
Prompts from the menu at the top of the Modify Report Template form.

The parts of the database you want to include in the report are specified by entering
the elements at the top of each part of the hierarchy in the Hierarchy text box on
the New/Modify Report Template form. The default is the World. If you just want
to specify one or two elements, you can just type in the element names. The names
must always be preceded by a slash and separated by a space, because you can enter
several names, for example:
/100-B-1 /100-B-2
If you want to specify several elements, it is easiest to use the Hierarchy form,
which also allows you to report on all the elements in a Volume, selected from the
MDB, the Drawlist or the Obstruction list.

2-6 Reporting from VANTAGE PDMS


Version 11.6
Creating and Running a Simple Report

2.6.1 Adding Elements using the Members List


The Hierarchy form is displayed when you select the Hierarchy button on the
Modify Report Template form.

1. Go to the PIPES Zone in the Members List.


2. Select Pipe /100-B-1 in the Members List, and select CE on the Hierarchy
form. The Pipe will be shown in the scrolling list in the Hierarchy form. Do
the same for /100-B-2 and /150-A-3.
3. Note that you can remove an element from the list by highlighting it in the list
and pressing Remove.
4. Select OK on the Hierarchy form, and the Pipes will appear in the Hierarchy
text box on the Modify Report Template form.
Note: Specifying elements using this option will override anything you specify
in the Volume or From option.

2.6.2 Adding Elements in a Given Volume


If you leave the Hierarchy option on the Modify Report Template form empty,
you can specify a Volume in the model, and report on elements Completely
within or Partially within it. Selecting Completely within or Partially within
from the Volume option button on the Hierarchy form will display the Report
Volume form, which is used in the same way as other PDMS forms for defining
volumes. See the online help for more information.
Note: Specifying a Volume will select elements from the whole MDB. The other
From options cannot be used.

2.6.3 From
The From options are used to specify where the Reports Utility will look for the
elements to report on:
MDB should be used if you are giving specific elements in the Hierarchy.
Drawlist will select all elements in the drawlist. The Hierarchy text box
should be left blank.
Obstruction list will select all elements in the obstruction list. The
Hierarchy text box should be left blank.

Reporting from VANTAGE PDMS 2-7


Version 11.6
Creating and Running a Simple Report

2.7 More Column Layout Options

The following examples illustrate some more of the options on the Layout for
Column n form.
Some of the options are only used in sorting and totalling, and these are described in
Chapter 3, Sorting and Totalling. Some only apply to File reports, and these are
described in Chapter 5, File Reports. This section describes the general options
which apply to all reports.

2.7.1 Layout
The number of Spaces before column. This is the number of spaces between the
end of the previous column and the start of the current column. The effect will be
affected by the Justification.
The Column width in characters. If you do not give a value, the width of the
widest entry will be used.
The Justification can be set to Left, Centre or Right.
The effects of the layout options are illustrated in the following examples, based on
the template centre_line.tmp:
The format as supplied:

Centre Line Length Report for /100-B-1

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19
/100-B-1 /100-B-1-B1 /A3B 50.00 39524.55
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80

Justification for the HBORE column set to Centre:

Centre Line Length Report for /100-B-1

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19
/100-B-1 /100-B-1-B1 /A3B 50.00 39524.55
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80

Space before the HBORE column set to 5, rather than 2:

Centre Line Length Report for /100-B-1

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH

2-8 Reporting from VANTAGE PDMS


Version 11.6
Creating and Running a Simple Report

/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19


/100-B-1 /100-B-1-B1 /A3B 50.00 39524.55
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80

Space before the HBORE column set to 2, and the column width set to 15:

Centre Line Length Report for /100-B-1

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19
/100-B-1 /100-B-1-B1 /A3B 50.00 39524.55
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80

Reporting from VANTAGE PDMS 2-9


Version 11.6
Creating and Running a Simple Report

2.7.2 Numeric Display


The Remainder can be set to:
Decimal, in which case you can specify the number of Decimal places
or
Fraction, in which case you must specify the Denominator. In the output,
the denominator will be reduced if possible.
The Style only affects how feet and inches are displayed. For example:
US gives 10'-5"
PDMS gives 10' 5
Leading zeros can be on or off.

2.7.3 Text Display


You can specify the characters used to specify Unset text.
Headings
For reports without sorting or totalling Headings will normally be On. For
example of switching Headings off, see Chapter 3, Sorting and Totalling. The Page
option is only used for file reports. For more information, see Chapter 5, File
Reports.
Heading Text
The Heading Text can be set to:
Expression Text which will use the expression entered in the Expression
text box on the Creating Column form. For example, CLLE for the centre
line length.
Default which will use the full PDMS attribute name is possible. For
example, if you enter CLLE in the Expression text box, the column heading
will be CENTRE LINE LENGTH.
Custom, in which case you should enter the text required in the text box. You
can insert several lines of text. The Centre Line Length template, which has
the heading split over two lines, is an example.
Values
For reports without sorting or totalling Values will normally be On. For examples
of the other options see Chapter 3, Sorting and Totalling.
Subtotals and Totals
Totals can only be produced for columns containing numeric data, and which do not
have the Subtotal option set. For more information, see Chapter 3, Sorting and
Totalling.

2-10 Reporting from VANTAGE PDMS


Version 11.6
Creating and Running a Simple Report

2.8 Introductions and Summaries

The Page options on the menu on the New/Modify Report Template form can be
used to insert Introductions and Summaries into screen or file reports. However,
they normally involve using variables, which are introduced in Chapter 4, Selective
Reporting, and so they are described later, in Chapter 5, File Reports.

Reporting from VANTAGE PDMS 2-11


Version 11.6
3 Sorting and Totalling

By default, the items reported on will be listed in the order that they are stored in the
database.
You can specify which attributes will be used to sort the elements in the report and
the type of sorting, for example, ascending or descending numerical order. If more
than one attribute is used for sorting, you can control the precedence, that is which
attribute is sorted first.
For this exercise, look at the template line_list.tmp by selecting
Utilities>Reports>Modify on the Main Menu.
Note: The sample templates are all for file reports, with runtime prompts set.
If you want to try the examples, send the reports to the screen and switch
the prompts off (use Options>Runtime Prompts on the New/Modify
Report Template form).
This template reports on the Pipe Name, Specification, Head Bore, Tail Bore, Head
Ref and Tail Ref of Branches. The template sorts the Branches in ascending order of
Head Bore.
With the Hierarchy set to the Zone PIPES, the output will look like this:

Reporting from VANTAGE PDMS 3-1


Version 11.6
Sorting and Totalling

Line List for WORLD

PIPE PSPEC HBORE TBORE HREF TREF


/50-B-9 /A3B 15.00 15 /50-B-9-B1-TEE2 =0/0
/40-B-10 /A3B 40.00 40 /40-B-10-B1-TEE1 /40-B-10-B1-TEE2
/100-B-1 /A3B 50.00 100 /P1502A-N2 =0/0
/100-B-1 /A3B 50.00 100 /P1502B-N2 /100-B-1-B1-TEE1
/50-B-9 /A3B 50.00 50 /P1501A-N2 /1101/N4
/50-B-9 /A3B 50.00 50 /50-B-9-B1-TEE4 /50-B-9-B1-TEE5
/50-B-9 /A3B 50.00 50 /P1501B-N2 /50-B-9-B1-TEE1
/40-B-10 /A3B 50.00 40 /50-B-9-B1-TEE3 =0/0
/80-A-11 /A1A 50.00 80 /80-B-14-B1 =0/0
/80-B-14 /A3B 50.00 50 /80-B-14-B1-TEE1 /80-A-11-B1-TEE1
/100-B-1 /A3B 80.00 80 /100-B-1-B1-TEE2 /100-B-1-B1-TEE3
/100-B-2 /A3B 80.00 80 /100-B-2-B1-TEE1 =71/608
/80-B-7 /A3B 80.00 80 /E1302A-S2 /D1201-N1
/100-C-12 /F1C 80.00 80 /100-C-12-B1-TEE1 /100-C-12-B1-TEE2
/80-B-14 /A3B 80.00 50 /D1201-N2 /80-A-11-B1
/100-B-2 /A3B 100.00 100 =0/0 /150-A-3-B1
/150-A-3 /A1A 100.00 150 /100-B-2-B1 =0/0
/100-B-8 /A3B 100.00 100 /D1201-N4 /P1501B-N1
/100-B-8 /A3B 100.00 100 /100-B-8-B1-TEE1 /P1501A-N1
/100-C-12 /F1C 100.00 100 =0/0 /1301/NS2
/100-C-13 /F1C 100.00 100 /1301/NS1 =0/0
/150-B-6 /A3B 150.00 150 /1101/N5 /E1302B-S1
/150-A-57 /A1A 150.00 100 =0/0 /P1502A-N1
/150-A-57 /A1A 150.00 100 /150-A-57-B1-TEE1 /P1502B-N1
/200-B-4 /A3B 200.00 200 /1101/N3 /1301/N1
/250-B-5 /A3B 200.00 250 /1301/N2 /1101/N2
/250-B-5 /A3B 200.00 250 /1301/N4 =72/615

Summary: 27 Lines in Schedule

3.1 Changing the Order of Sorting

Change the order of sorting to descending order of Head Bore. Select HBORE in the
list on the Modify Report Template form, and select the (Columns) Modify
option button.
On the Modify Columns form, set the Sorting option button to 9-0. When you run
the report, the output will be as follows:

3-2 Reporting from VANTAGE PDMS


Version 11.6
Sorting and Totalling

Line List for /PIPES

PIPE PSPEC HBORE TBORE HREF TREF


/200-B-4 /A3B 200.00 200 /C1101-N3 /E1301-S1
/250-B-5 /A3B 200.00 250 /E1301-S2 /C1101-N2
/250-B-5 /A3B 200.00 250 /E1301-S3 =140/612
/150-B-6 /A3B 150.00 150 /C1101-N6 /E1302B-S1
/150-A-57 /A1A 150.00 100 =0/0 /P1502A-N1
/150-A-57 /A1A 150.00 100 /150-A-57-B1-TEE1 /P1502B-N1
/100-B-2 /A3B 100.00 100 /C1101-N1 /150-A-3-B1
/150-A-3 /A1A 100.00 150 /100-B-2-B1 =0/0
/100-B-8 /A3B 100.00 100 /D1201-N4 /P1501B-N1
/100-B-8 /A3B 100.00 100 /100-B-8-B1-TEE1 /P1501A-N1
/100-C-12 /F1C 100.00 100 =0/0 /E1301-T1
/100-C-13 /F1C 100.00 100 /E1301-T2 =0/0
/100-B-1 /A3B 80.00 80 /100-B-1-B1-TEE2 /100-B-1-B1-TEE3
/100-B-2 /A3B 80.00 80 /100-B-2-B1-TEE1 =139/603
/80-B-7 /A3B 80.00 80 /E1302A-S2 /D1201-N1
/100-C-12 /F1C 80.00 80 /100-C-12-B1-TEE1 /100-C-12-B1-TEE2
/80-B-14 /A3B 80.00 50 /D1201-N2 /80-A-11-B1
/100-B-1 /A3B 50.00 100 /P1502A-N2 /C1101-N4
/100-B-1 /A3B 50.00 100 /P1502B-N2 /100-B-1-B1-TEE1
/50-B-9 /A3B 50.00 50 /P1501A-N2 /C1101-N5
/50-B-9 /A3B 50.00 50 /50-B-9-B1-TEE4 /50-B-9-B1-TEE5
/50-B-9 /A3B 50.00 50 /P1501B-N2 /50-B-9-B1-TEE1
/40-B-10 /A3B 50.00 40 /50-B-9-B1-TEE3 =0/0
/80-A-11 /A1A 50.00 80 /80-B-14-B1 =0/0
/80-B-14 /A3B 50.00 50 /80-B-14-B1-TEE1 /80-A-11-B1-TEE1
/40-B-10 /A3B 40.00 40 /40-B-10-B1-TEE1 /40-B-10-B1-TEE2
/50-B-9 /A3B 15.00 15 /50-B-9-B1-TEE2 =0/0

Summary: 27 Lines in Schedule

3.2 Sorting on More than one Attribute

Remember to use the Next column and Previous column option buttons on the
Modify Columns form, to move between columns.
Keeping Sorting as 0-9 for HBORE, switch Sorting to 0-9 for TBORE. Note that
the Precedence button is now set to 2, and that the precedence is also shown by
Sort 1 and Sort 2 against the columns on the Modify Report Template form. Go
back to the HBORE column, and note that the Precedence is shown as 1. This
means that the Branches will be sorted first in order of Head Bore, and second in
order of Tail Bore.
If you run the report now, the output will look like this; note the different order for
Branches with HBORE 50:

Reporting from VANTAGE PDMS 3-3


Version 11.6
Sorting and Totalling

Line List for /PIPES

PIPE PSPEC HBORE TBORE HREF TREF


/200-B-4 /A3B 200.00 200 /C1101-N3 /E1301-S1
/250-B-5 /A3B 200.00 250 /E1301-S2 /C1101-N2
/250-B-5 /A3B 200.00 250 /E1301-S3 =140/612
/150-A-57 /A1A 150.00 100 =0/0 /P1502A-N1
/150-A-57 /A1A 150.00 100 /150-A-57-B1-TEE1 /P1502B-N1
/150-B-6 /A3B 150.00 150 /C1101-N6 /E1302B-S1
/100-B-2 /A3B 100.00 100 /C1101-N1 /150-A-3-B1
/100-B-8 /A3B 100.00 100 /D1201-N4 /P1501B-N1
/100-B-8 /A3B 100.00 100 /100-B-8-B1-TEE1 /P1501A-N1
/100-C-12 /F1C 100.00 100 =0/0 /E1301-T1
/100-C-13 /F1C 100.00 100 /E1301-T2 =0/0
/150-A-3 /A1A 100.00 150 /100-B-2-B1 =0/0
/80-B-14 /A3B 80.00 50 /D1201-N2 /80-A-11-B1
/100-B-1 /A3B 80.00 80 /100-B-1-B1-TEE2 /100-B-1-B1-TEE3
/100-B-2 /A3B 80.00 80 /100-B-2-B1-TEE1 =139/603
/80-B-7 /A3B 80.00 80 /E1302A-S2 /D1201-N1
/100-C-12 /F1C 80.00 80 /100-C-12-B1-TEE1 /100-C-12-B1-TEE2
/40-B-10 /A3B 50.00 40 /50-B-9-B1-TEE3 =0/0
/50-B-9 /A3B 50.00 50 /P1501A-N2 /C1101-N5
/50-B-9 /A3B 50.00 50 /50-B-9-B1-TEE4 /50-B-9-B1-TEE5
/50-B-9 /A3B 50.00 50 /P1501B-N2 /50-B-9-B1-TEE1
/80-B-14 /A3B 50.00 50 /80-B-14-B1-TEE1 /80-A-11-B1-TEE1
/80-A-11 /A1A 50.00 80 /80-B-14-B1 =0/0
/100-B-1 /A3B 50.00 100 /P1502A-N2 /C1101-N4
/100-B-1 /A3B 50.00 100 /P1502B-N2 /100-B-1-B1-TEE1
/40-B-10 /A3B 40.00 40 /40-B-10-B1-TEE1 /40-B-10-B1-TEE2
/50-B-9 /A3B 15.00 15 /50-B-9-B1-TEE2 =0/0

Summary: 27 Lines in Schedule

Change the Precedence of the TBORE column to 1, which will automatically


change the precedence of the HBORE column to 2.
Now the output will look like this:

3-4 Reporting from VANTAGE PDMS


Version 11.6
Sorting and Totalling

Line List for /PIPES

PIPE PSPEC HBORE TBORE HREF TREF


/50-B-9 /A3B 15.00 15 /50-B-9-B1-TEE2 =0/0
/40-B-10 /A3B 50.00 40 /50-B-9-B1-TEE3 =0/0
/40-B-10 /A3B 40.00 40 /40-B-10-B1-TEE1 /40-B-10-B1-TEE2
/80-B-14 /A3B 80.00 50 /D1201-N2 /80-A-11-B1
/50-B-9 /A3B 50.00 50 /P1501A-N2 /C1101-N5
/50-B-9 /A3B 50.00 50 /50-B-9-B1-TEE4 /50-B-9-B1-TEE5
/50-B-9 /A3B 50.00 50 /P1501B-N2 /50-B-9-B1-TEE1
/80-B-14 /A3B 50.00 50 /80-B-14-B1-TEE1 /80-A-11-B1-TEE1
/100-B-1 /A3B 80.00 80 /100-B-1-B1-TEE2 /100-B-1-B1-TEE3
/100-B-2 /A3B 80.00 80 /100-B-2-B1-TEE1 =139/603
/80-B-7 /A3B 80.00 80 /E1302A-S2 /D1201-N1
/100-C-12 /F1C 80.00 80 /100-C-12-B1-TEE1 /100-C-12-B1-TEE2
/80-A-11 /A1A 50.00 80 /80-B-14-B1 =0/0
/150-A-57 /A1A 150.00 100 =0/0 /P1502A-N1
/150-A-57 /A1A 150.00 100 /150-A-57-B1-TEE1 /P1502B-N1
/100-B-2 /A3B 100.00 100 /C1101-N1 /150-A-3-B1
/100-B-8 /A3B 100.00 100 /D1201-N4 /P1501B-N1
/100-B-8 /A3B 100.00 100 /100-B-8-B1-TEE1 /P1501A-N1
/100-C-12 /F1C 100.00 100 =0/0 /E1301-T1
/100-C-13 /F1C 100.00 100 /E1301-T2 =0/0
/100-B-1 /A3B 50.00 100 /P1502A-N2 /C1101-N4
/100-B-1 /A3B 50.00 100 /P1502B-N2 /100-B-1-B1-TEE1
/150-B-6 /A3B 150.00 150 /C1101-N6 /E1302B-S1
/150-A-3 /A1A 100.00 150 /100-B-2-B1 =0/0
/200-B-4 /A3B 200.00 200 /C1101-N3 /E1301-S1
/250-B-5 /A3B 200.00 250 /E1301-S2 /C1101-N2
/250-B-5 /A3B 200.00 250 /E1301-S3 =140/612

Summary: 27 Lines in Schedule

3.3 Totalling

To see the effect of totalling, use the template centre_line.tmp and set the hierarchy
to 100-B-1 and 100-B-2.
The template as supplied will report on the Branches, giving the Pipe name and the
Pipe Specification, sorted on descending order of Head Bore, and the Centre Line
Length, as follows:

Centre Line Length Report for /100-B-1 /100-B-2

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 100.00 7610.35
/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19
/100-B-2 /100-B-2-B2 /A3B 80.00 2526.65
/100-B-1 /100-B-1-B1 /A3B 50.00 39524.56
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80

Reporting from VANTAGE PDMS 3-5


Version 11.6
Sorting and Totalling

Now switch on the Totalling option button on the Layout for Column form for the
Centre Line Length column, and the report will appear like this:

Centre Line Length Report for /100-B-1 /100-B-2

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 100.00 7610.35
/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19
/100-B-2 /100-B-2-B2 /A3B 80.00 2526.65
/100-B-1 /100-B-1-B1 /A3B 50.00 39524.56
/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80
===========
55236.56

3.4 Subtotalling

The Subtotals option on the Layout for Column form can be Off or set to the
number of a sorted column. Subtotals can only be produced for columns containing
numeric data.
Set Subtotalling on for the Centre Line Length column, and the report will look
like this:

Centre Line Length Report for /100-B-1 /100-B-2

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 100.00 7860.35
-----------
7860.35

/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19


/100-B-2 /100-B-2-B2 /A3B 80.00 2526.65
-----------
4981.84

/100-B-1 /100-B-1-B1 /A3B 50.00 39524.55


/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80
-----------
42644.36

Subtotalling with Totalling will produce the following report:

3-6 Reporting from VANTAGE PDMS


Version 11.6
Sorting and Totalling

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 100.00 7610.35
-----------
7610.35

/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19


/100-B-2 /100-B-2-B2 /A3B 80.00 2526.65
-----------
4981.84

/100-B-1 /100-B-1-B1 /A3B 50.00 39524.56


/100-B-1 /100-B-1-B3 /A3B 50.00 3119.80
-----------
42644.36

===========
55236.56

Subtotalling is closely related to the Values option on the Layout for Column
form. The options are:
On. The result of the expression (entered in the Expression text box on the
Creating Column form) will be shown for every line in the report. This is the
normal setting for reports without sorting or totalling.
Off. No values will be shown.
1st. If this column is sorted, this option can be used to display only the first
occurrence of a particular expression result.
Sub. A value will only be output in this column when a subtotal appears in
one of the other columns.

3.4.1 Showing only the First Occurrence of Values


For a sorted column, you can output only the first occurrence of a value. For
example, set the Values to 1st for the HBORE column:

Reporting from VANTAGE PDMS 3-7


Version 11.6
Sorting and Totalling

Centre Line Length Report for /100-B-1 /100-B-2

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 100.00 7610.35
-----------
7610.35

/100-B-1 /100-B-1-B2 /A3B 80.00 2455.19


/100-B-2 /100-B-2-B2 /A3B 2526.65
-----------
4981.84

/100-B-1 /100-B-1-B1 /A3B 50.00 39524.56


/100-B-1 /100-B-1-B3 /A3B 3119.80
-----------
42644.36

===========
55236.56

You can display each value for a sorted column next to the corresponding subtotal
value.
Set the Values option for HBORE (which must be sorted) to Sub. Set the Centre
Line Length Subtotals to 4, that is, show subtotals for each value in column 4
(HBORE).

Centre Line Length Report for /100-B-1 /100-B-2

PIPE NAME PSPEC HEAD BORE CENTRE LINE


LENGTH
/100-B-2 /100-B-2-B1 /A3B 7610.35
-----------
100.00 7610.35

/100-B-1 /100-B-1-B2 /A3B 2455.19


/100-B-2 /100-B-2-B2 /A3B 2526.65
-----------
80.00 4981.84

/100-B-1 /100-B-1-B1 /A3B 39524.56


/100-B-1 /100-B-1-B3 /A3B 3119.80
-----------
50.00 42644.36

===========
55236.56

3-8 Reporting from VANTAGE PDMS


Version 11.6
Sorting and Totalling

3.5 Quantity

The template pipe_mto.tmp outputs a report which shows the quantity of each type
of item with a given Detail Text. Hence the important relationship is between
Column 2, Detail Text, and Column 5, Quantity.
• Values are set to Sub for all the columns except Detail Text, where the 1st
occurrence of each value is given.
• Subtotals is set to 2 for the Quantity column, which means that items with
the same Detail Text are totalled.
The elements are first sorted alphabetically on type. The Material Text, and in the
case of TUBI elements, the length, is also given.
The columns are set up as follows:
TYPE
Sort Aa to zZ, Precedence 1.
Values set to Sub, Subtotals Off and Total Off.
DTXR
Sort Aa to zZ, Precedence 2.
Values set to 1st, Subtotals Off and Total Off.
MTXX
No sorting.
Values set to Sub, Subtotals Off and Total Off.
ITLE
No sorting.
Values set to Sub, Subtotals set to 2 and Total Off.
QUANTITY
No sorting.
Values set to Sub, Subtotals set to 2 and Total Off.

Reporting from VANTAGE PDMS 3-9


Version 11.6
Sorting and Totalling

Pipework MTO for /100-B-1 /100-B-2 /150-A-3

Type Detail Material Tube Quantity


Text Text
ATTA unset unset 5
ELBO ELBOW LR ANSI B16.9 BW ASTM A234-WPB 17
FLAN ANSI.B16.36.WN.ORIFACE.FLANGE.#300.RF ASTM A105 2
FLAN FLANGE WN ANSI B16.5 #150.RF ASTM A105 2
FLAN FLANGE WN ANSI B16.5 #300.RF ASTM A105 22
GASK GASKET RF 1.5MM ANSI B16.5 #150 SS & ASB 2
GASK GASKET RF 1.5MM ANSI B16.5 #300 SS & ASB 26
INST ORIFICE PLATE 3MM THK #300 unset 1
REDU NIPPLE CONC SWAGED BLE/PSE ASTM A234-WPB 2
REDU REDU CONC ANSI B16.9 BW ASTM A234-WPB 3
REDU REDU ECC ANSI B16.9 BW ASTM A234-WPB 2
TEE TEE ANSI B16.9 BW ASTM A234-WPB 5
TUBI PIPE SCH40 ANSI B36.10 API 5L-B 13410.56 51
VALV CTRL VALVE FISHER TYPE 657-ED #300.RF ASTM A216-WCB 2
VALV MISSION K WAFER CHECK VALVE #300 RF ASTM A216-WCB 2
VALV VALVE GATE ANSI B16.10 #150.RF ASTM A216-WCB 1
VALV VALVE GATE ANSI B16.10 #300.RF ASTM A216-WCB 5
VALV VALVE GLOBE ANSI B16.10 #300.RF ASTM A216-WCB 2

Reporting from VANTAGE PDMS 3-11 3-11


Version 11.6
4 Selective Reporting

The With option on the New/Modify Report Template form allows you to restrict
the report to elements of the given type whose properties satisfy given conditions.
The restriction is defined by an Expression, which is entered in the text box.
Full information about using expressions is given in the online help. If you
understand the basic principles of using expressions, refer to PDMS Expressions:
Contents or search for the keyword you want.
A summary of the information you are most likely to need in selective reporting is
given below.
The expressions used in selective reporting will be a combination of PDMS
attributes or pseudo-attributes, logical operators and values.
For example, if you are reporting on Elbows (that is, you have entered ELBO in the
Type text box), you can restrict the report to Elbows with ABORE greater than 50
by entering the expression:
ABORE GT 50
where ABORE is the PDMS attribute, GT is an operator meaning greater than, and
50 is the value. The operators you can use are:
EQ equal to
NE not equal to
GT greater than
GE greater than or equal to
LE less than
LT less than or equal to
You can specify more than one condition using the operators AND, OR and NOT.
For example, to report on Elbows with ABORE greater than 50 but less than 100
enter:
(ABORE GT 50) AND (ABORE LT 100)

4.1 Introduction to Expressions

An expression consists of operators and operands. For example, 2 + 3 is an


expression, where 2 and 3 are the operands, and + is the operator. The result of the
expression is 5.
Expressions can (and normally do) contain variables and, in PDMS, expressions will
often contain names of PDMS element types, attributes and pseudo-attributes. For a

Reporting from VANTAGE PDMS 4-1


Version 11.6
Selective Reporting

full list of pseudo-attributes, see the on-line help or the PDMS Software
Customisation Reference Manual.
Expressions can also contain functions. For example, SIN is a trigonometric
function. Often, expressions will contain logical functions. For example GT (greater
than) can be used in comparisons.
Expressions have types. For example, you can have numeric expressions, text
expressions and logical expressions. All the elements in an expression must be of the
correct type. A number in an expression can be literally a number, for example, 2.3,
or a numeric variable, or PDMS attribute which is numeric, for example, XLEN.
Similarly, text can be a text string, a text variable or a PDMS attribute which is set
to text. For example, if you have two numbers, number1 and number2, and two text
strings text1 and text2, then the following expression is meaningless:
number1 + text1
However, both of the following expressions are valid:
number1 + number2
(This has the effect of adding the values of the numeric variables.)
text1 + text
(This has the effect of concatenating (joining) the two text strings.)
Expressions can be nested. For example, any of the operands in the above examples
can themselves be expressions.
Note that there are several operators which can be used to convert from one type of
data to another. See the appropriate type of expression listed in the online help under
PDMS Expressions: Contents, remembering that the type of an expression is defined
by the type of its result.

4.1.1 Format of Expressions


The format of an expression, for example the use of brackets, spaces and quotes, is
important. If you do not follow the rules given below you will get error messages:
• Text must be enclosed in quotes. For example:
'This is text '
• There must be a space between each operator and operand. For example:
XLEN + YLEN
• Use round brackets to control the order of evaluation of expressions and to
enclose the argument of a function. For example:
SIN (15)
• In general, you do not need spaces before or after brackets, except when a
PDMS name is followed by a bracket. If there is no space, the bracket will be

4-2 Reporting from VANTAGE PDMS


Version 11.6
Selective Reporting

read as part of the name. For example:


(NAME EQ /VESS1 )
4.1.2 Operator Precedence
Operators are evaluated in the order of the following list: the ones at the top of the
list are evaluated first.
Brackets
Functions
* /
+ -
EQ, NEQ, LT, LE, GE, GT
NOT
AND
OR
Brackets can be used to control the order in which operators are evaluated, in the
same way as in normal arithmetic.
• The operators EQ and NE may be applied to any pair of values of the same type.
• The operators GE, LE, GT and LT may only be used with reals and positions.
For more information, see Section 4.6, Comparing Positions, Directions and
Orientations.

4.2 Using Positions in Expressions


The basic ways of defining a position are:
• Position attribute plus optional WRT. For example:
POS OF /VESS1 WRT /* or P1 POS OF /CYL2
• Cartesian position. For example:
N 45 W 20000 U 1000
• Cartesian position from an element. For example:
N 1000 FROM /ATEST.
• Cartesian position from a ppoint. For example:
N 1000 FROM P1 OF /BOX2.
• Cartesian position from an attribute. For example:
N 1000 FROM POSS OF /SCTN1
The Cartesian position may optionally be followed by WRT to specify the axis
system.
Any real value within a position may itself be an expression. For example:
' N (DESP[1] + 10) E'
is a valid position expression.

Reporting from VANTAGE PDMS 4-3


Version 11.6
Selective Reporting

4.2.1 WRT
The 'WRT' keyword is used to toggle between absolute and relative units.
When we specify an element (or attribute of an element) we are specifying an
absolute point in world space. The point can be given in world space or some other
axis. Normally the answer is required relative to the owner axis system and this is
taken as the default. For example:
Q POS
will return the position of the current element relatively to its owner.
Q POS OF /EQUIP1
will return the position of EQUIP1 relative to its owner. If we require the result in
some other axis system then the WRT keyword is used. e.g. Q POS WRT /* for
the position in world coordinates.
When we specify a Cartesian coordinate we are dealing with a relative position. For
example, 'N 10' is meaningless until we specify the axis system, or default to an axis
system. Again we use 'WRT' to do this, although it is important to note that in this
case we are going from a relative position to an absolute position (in the previous
example WRT was used to go from an absolute position to a relative one). For
example:
N 100 WRT /BOX1
specifies an absolute position in world space which is N100 of /BOX1.
The default is that Cartesian coordinates are in the owning element's axis system.
This absolute position can be expressed in different coordinate systems: the default
is again the owner's axis system.
Note: The CONSTRUCT syntax uses the world as the default axis.

4-4 Reporting from VANTAGE PDMS


Version 11.6
Selective Reporting

Example 1
Consider the following:
A SITE at (0,0,0) with default orientation
A ZONE at (100,0,0) with default orientation
An EQUIPMENT at (100,0,0) with orientation 'N IS E'
A BOX at (-100,0,0) with default orientation

The result of 'Q (N 100 WRT /BOX1)', shown as * in the picture, will depend on the
current element:
• At the World, the result is (300,100,0), in World coordinates.
• At the Site, the result is (300,100,0) in World coordinates because the World is
the owner of the current element.
• At the Zone the result is (300,100,0) in World coordinates, because the Site is
the owner of the current element, and the Site coordinates are the same as the
World coordinates.
• At the Equipment the result is (200,100,0), which is the position relative to its
owner, the Zone.
• At the Box the result is (100,100,0) which is the position relative to its owner,
the Equipment.
WRT can be further qualified by FROM.

Reporting from VANTAGE PDMS 4-5


Version 11.6
Selective Reporting

4.2.2 FROM
In some cases we require an offset from a fixed point, other than the position of an
item. e.g. ppoint or attribute. The FROM syntax is used for this. We may still use
WRT in combination with FROM, but in this case the WRT is only used to
determine the axis direction and not the offset, since the offset is specified by the
FROM part.
Consider the following:
A SITE at (0,0,0) with default orientation
A ZONE at (100,0,0) with default orientation
An EQUIPMENT at (100,0,0) with orientation 'N IS E'
A BOX at (-100,0,0) with default orientation
Example 2
The result of 'Q (N 100 WRT /* FROM /BOX1 )', shown as * in the following
picture, will depend on the current element:

• At World, Site, Zone the result is (200,200,0) since the offset of N100 is applied
in world axis rather than /BOX1 axis.
• At the equipment the result is (100,200,0). Note: the default axis for the result
is the zone.
• At /BOX1 the result is (200,0,0), because the default axis for the result is the
equipment.

4-6 Reporting from VANTAGE PDMS


Version 11.6
Selective Reporting

Example 3
'Q (N 100 WRT /BOX1 FROM /* ) gives the same absolute position as the ZONE.
• At the Zone and SITE the result is (100,0,0)
• At EQUI the result is (0,0,0)
• At BOX1 the result is (0,-100,0), remembering that the result axis is the EQUI.
Example 4
'Q (N 100 FROM /* )'
For this we cannot mark an absolute point on the diagram since the default 'WRT'
will vary with the current element. In fact for the SITE, ZONE, EQUI the point * is
marked in the following picture, and for the BOX the point coincides with the
ZONE.

• At SITE, ZONE the result is (0,100,0)


• At EQUI the result is (-100,100,0), remembering the default result axis is the
zone
• At BOX1 the result is (0,-100,0), as for Example 3.

Reporting from VANTAGE PDMS 4-7


Version 11.6
Selective Reporting

4.3 Using IDs in Expressions

IDs can be used in expressions. IDs can be any of the following:


• Element name, for example: /VESS1.
• Refno, for example: =23/456.
• Element type further up the hierarchy, for example: SITE.
• Number within member list, for example: 3.
• Type and number within member list, for example: BOX 3.
• NEXT, PREV for next, previous within current list. Optionally with a count
and/or element type, for example: NEXT 2 BOX, LAST CYL.
• NEXT, PREV MEMBER for next, previous within member list. Optionally with
a count and/or element type. If the element type given is only valid as a member
then MEMBER is assumed. For example, NEXT BOX at a EQUIPMENT will
assume MEMBER.
• FIRST, LAST for first and last in current list. Optionally with a count and/or
element type.
• FIRST, LAST MEMBER for first and last in member list. If the element type
given is only valid as a member then MEMBER is assumed.
• END to navigate up from current list. END is similar to owner but not quite the
same. For example, if the current element is a GROUP MEMBER, and it has
been reached from the GROUP then END will return to the group but OWNE
will go to the true owner.
• Attribute of type ref, for example: CREF
• SAME to mean last current element
• NULREF to mean =0/0
• CE for the current element
'OF' may be used to nest the options indefinitely. For example: SPEC OF SPREF OF
FLAN 1 OF NEXT BRAN. This denotes the SPEC element owing the SELE
element pointed to by the SPREF attribute on the first FLANGE of the next
BRANCH.
ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to
denote tube. For example: HEAD TUBE OF /BRAN1. An error will occur if there
is no implied tube for the element concerned.
Note: Some of the ID syntax clashes with other types. To allow for this, an id
expression may always be preceded with the keyword ID. For example, ID
3 will mean the third member of the current list rather than a real of value 3.
ID arrays can also be used in expressions. For example, CRFA.

4-8 Reporting from VANTAGE PDMS


Version 11.6
Selective Reporting

4.4 Direction

The basic ways of defining a direction are:


• Direction attribute plus optional WRT. For example,
HDIR OF /PIPE1 WRT /*
• Cartesian direction. For example,
N 45 W
• Cartesian direction WRT to an element.
• FROM pos1 TO pos2. For example,
FROM N 50 WRT CE TO N 100
All Cartesian directions are returned in the axis of the owner of the current element.
For example:
(U WRT CE )
will return the Z axis of the current element relative to its owner.
Q ( Z WRT /SCTN )
will return the Z axis direction of /SCTN relative to the owner of the current
element. For example, if the result is required in world coordinates the current
element must be the World or a Site.

4.5 Orientations

The basic ways of defining an orientation are:


• Orientation attribute plus optional WRT. For example:
ORI OF /BOX1 WRT /*
• Cartesian orientation. For example:
dir IS dir AND dir IS dir
For example:
(E IS U WRT /SCTN1 AND N IS E WRT /SCTN1)
to set an orientation of an element to that of a section, rotated by 90 degrees.

4.6 Comparing Positions, Directions and Orientations


This section describes how positions, directions and orientations are compared. The
examples use positions, but the same principles apply to directions and orientations.
Two positions can be compared with EQ, NE, GT, LT, GE or LE. The pairs of
coordinates are only compared in the coordinate axes for which the two positions are
defined. A position attribute always has all three coordinates defined. For position

Reporting from VANTAGE PDMS 4-9


Version 11.6
Selective Reporting

entered by the user, only those coordinates which are given by the user are defined.
For example, in 'N10U3' only the Y and Z coordinates are defined, while the X
coordinate remains undefined.
For the EQ operator, all the pairs of defined coordinates should be equal.
For NE, only one pair of defined coordinates need be different.
For GT (LT,GE,LE), all the defined coordinates of the first position should be
greater than (less than, greater than or equal to, less than or equal to) the defined
coordinates of the second position. This means that GE is not the opposite of LT
and LE is not the opposite of GT.
If no coordinate of the two positions are defined for a common axis (e.g. 'N10' and
'W4D7'), the result of the comparison is undefined.
Examples:
POS EQ W1S2D3
This evaluates to true only if POS of the current element is (-1,-2,-3).
POS GT N10 or N10 LE POS
Only the second coordinate of POS is compared; if it is greater than 10, then the
result is true.
E10N10 GT E0N0
Is true because the inequality is verified for the X and Y axis (both coordinates are
undefined for the Z axis, so it is ignored).
E10N0 GT E0N0
Is false because the Y components are different axes.
E10N0 GT E0U100
Is true. Although no comparison can be performed in either the Y or the Z axis,
because the components are not present in both position constants, the comparison is
true in the X component.
N10 EQ W4D7
Is undefined (no comparison is possible).
See also the online topic Precisions of Comparisons for tolerances in comparing real
numbers.

4-10 Reporting from VANTAGE PDMS


Version 11.6
5 File Reports

This chapter describes how to set up templates for reports that will be output to a
file. The content of the reports is defined in the same way as for screen reports, and
the layout of the columns is also controlled in the same way, but there are additional
options which control headers, footers and headings and other information which
can be added to file reports.
Set Destination to File, and give a filename in the text box. The file will be stored
in the directory PDMSUSER/REPORTS.
You should also specify what will happen if the file exists. The options are
Append. If the file exists, output will be appended to it.
New. If the file exists, you will be prompted to confirm that you want to
overwrite the file.
Overwrite. If the file exists, it will be overwritten with no warning.

5.1 The Page Information Options

The options under Page Information on the menu at the top of the New/Modify
Report Template form allow you to add information which is not specified in the
body of the report. The options are:
Set a Header
Set a Footer
Insert an Introduction into the Report
Insert a Summary into the Report
Set the Page Length
Each option displays a form with a text pane. You type the information you want in
the text pane. Each line of information is entered as an expression.
Full information about using expressions is given in the online help. Refer to the
topic PDMS Expressions: Contents or search for the keyword you want.

5.2 Report Variables

There are several special variables used to insert information such as date and page
numbers in a report. The variables are designed to be used outside the body of the
report, that is, in the Introduction, Summary, Header or Footer.

Reporting from VANTAGE PDMS 5-1


Version 11.6
File Reports

!pageno
Inserts page numbers.
!filename
Inserts the filename to which the report will be sent.
!seltype
Inserts the contents of the Type text box.
!selhierarchy
Inserts the contents of the Hierarchy text box.
!selvolspec
Inserts Off, Completely within or Partially within, as specified on the
Hierarchy form.
!selvolume
Inserts the coordinates defining the volume, as specified on the Hierarchy form.
!selfrom
Inserts MDB, Drawlist or Obstruction List, as specified on the Hierarchy form.
!criteria
Inserts the complete selection criteria on which the report is based.
!selsize
Inserts the number of elements that match the criteria.
!selno
Inserts the sequence number of an element in a selection. This variable should be
used with the Sort option on the Creating Column form set to Fix for the column.
!date
Inserts today's date.
!time
Inserts the time.
These variables must be used together with the operators which control late
evaluation of variables. See Section 5.2.1, Late Evaluation of Variables.

5.2.1 Late Evaluation of Variables


Variables stored in file report templates must be used with one of the late evaluation
operators described below. Without these operators, the variables would be
evaluated as soon as the form containing them is actioned using the OK or Apply
button, instead of being stored as variables in the template and evaluated when the
template is run.
The three operators are:
VTEXT, used for the late evaluation of variables when a text result is required.

5-2 Reporting from VANTAGE PDMS


Version 11.6
File Reports

VLOGICAL, used for late evaluation when a logical result is required.


VVALUE, used for late evaluation when a numeric result is required.
Examples of using the report variables with the late evaluation operators are given in
the following sections.

5.2.2 Points to Note


A summary of the information you are most likely to need in setting up the page
information is given below.
• Text must be entered in quotes. For example:
'Page number'
• You can include any PML variables in the expressions.
• Variables must be preceded by one of the functions vtext, vval or vlog, which
ensure late evaluation of the variables. For more information see Section 5.2.1,
Late Evaluation of Variables. For example, to show the page number on every
page of the report, enter the following expression in the header or footer:
vtext( !pageno )
• If you want to combine text and variables in the same expression (that is, on the
same line, you must combine them using the text operator +. For example, if you
want to number the pages with the format Page 1, Page 2 and so on, you should
enter the following expression in the header or footer:
'Page ' + vtext ( !pageno )

5.3 Headers, Footers and Page Lengths

Information in Headers and Footers will appear at the top or bottom of every pages
of a file report. Headers and footers are not available for screen reports.
Note: You must have a page length of between 5 and 500 lines set before
headers and footers will be displayed in file reports.
The Page Length form, Page Header form and Page Footer form are displayed
by selecting the options under Page Info from the menu on the New Report
Template form.

5.4 Introduction and Summaries

Both file reports and screen reports can have an Introduction and Summary. You can
insert whatever text and variables you want.

Reporting from VANTAGE PDMS 5-3


Version 11.6
File Reports

5.5 Examples

The following examples are mainly taken from the templates supplied with the
product.
To insert a page number containing the text Page number, followed by the page
number, use the !pageno variable:
'Page No. ' + vtext (!pageno)
To insert the user’s name in the form of the text User Name: followed by the
name, use the PDMS global variable !!user:
'User name: ' + vtext(!!user)
To insert the date and time, use the report variables !date and !time:
'Date: ' + vtext(!date) + ' ' + vtext(!time)
To insert a blank line, use:
''
To insert the hierarchy reported on, use:
'Nozzle Schedule for ' + vtext(!selhierarchy)
To insert the number of elements reported on, use, for example:
'Summary: ' + vtext(!selsize) + ' Nozzles in Schedule'

5-4 Reporting from VANTAGE PDMS


Version 11.6
6 Additional Information

6.1 Running Reports in Batch Mode

Report templates are PDMS macros, which can be run in batch mode by giving the
command $M/template-name. For more information about batch mode, see the
PDMS MONITOR Reference Manual.
Note: Report templates for batch mode must not have any runtime prompts set.

6.2 The System Command option

The System Command text box on the New/Modify Report Template form
allows you to give a system command that will be run when the report has been
completed.
For example, you could use this option to send the report output to a printer, or to
run a macro to process the report. The command is entered as an expression. For
full information about expressions, see Introduction to Expressions, but an example
of how to enter a system command is given below.

6.3 Report Output Formats

The Report Format form will be displayed when you select Options > Other
Formats on the menu on the New/Modify Report Template form. It allows you to
output a report in CSV (Comma Separated Variable) format, which can be read into
a spreadsheet.
You can specify the field separator and text delimiter. Values in the report are
recognised as text if the Units option on the Creating Column form is set to Off.

Reporting from VANTAGE PDMS 6-1


Version 11.6
Additional Information

Index

Adding and moving columns, 2-4 positions in, 4-4


Adding elements, 2-8

File reports, 2-1, 5-1


Batch mode, 6-1 First occurrence
of values, 3-7
Footers, 5-1, 5-4
Column Layout, 2-4 Formats
Column width, 2-9 output, 6-2
Columns, 2-2 Fraction, 2-11
adding, 2-4 Functions, 4-2
moving, 2-4
Creating a report template, 2-1
CSV format, 6-2 Headers, 5-1, 5-4
Headings, 2-11
Hierarchy, 2-7
Decimal, 2-11 adding elements, 2-8
Deleting a template, 2-7
Destination, 5-1
Direction IDs in expressions, 4-9
in expressions, 4-10 Imperial units style, 2-11
Drawlist Introductions, 2-12
adding elements from, 2-9 Introductions in reports, 5-1, 5-4

Expressions, 4-1 Justification, 2-10


direction in, 4-10
format, 4-3
IDs in, 4-9 Leading zeros, 2-11
orientations, 4-11

Reporting from VANTAGE PDMS Index-1


Version 11.6
Index

Saving a template, 2-6


Screen reports, 2-1
New Report Template form, 2-1
Selective reporting, 4-1
Numeric Display, 2-11
Sorting, 1-4, 2-9, 2-11, 2-12, 3-1
Spaces before column, 2-9

Obstruction list Style (Imperial units), 2-11

adding elements from, 2-9 Subtotalling, 3-6

Operands, 4-2 Subtotals, 2-12

Operators, 4-3 Summaries, 2-12

Operators., 4-2 Summaries in reports, 5-1, 5-4

Orientation System Command, 6-1

in expressions, 4-11
Output formats, 6-2
Templates
deleting, 2-7

Page information, 5-1 saving, 2-6

Page length, 5-1, 5-4 Text Display, 2-11

Positions in expressions, 4-4 Totalling, 3-1, 3-5

Precedence, 3-3 Totals, 2-12


Unset text, 2-11

Quantity, 3-9
Values, 2-12
in subtotalling, 3-7

Remainder, 2-11 Variables

Report Details form, 1-4 late evaluation, 5-3

Report variables, 5-2 Volumes

Reports directory, 1-1 adding elements from, 2-9

Running a report, 1-4


Runtime prompts, 2-5
Runtime Prompts, 3-1 With option, 4-1

Sample report templates, 1-1

Index-2 Reporting from PDMS


Version 11.6