Beruflich Dokumente
Kultur Dokumente
Menu
Search
The solution involves a couple concepts. First, well have to create a calculated eld. Then we will have to create a script that makes the appropriate value
for that eld.
Calculated Fields
A calculated eld is a eld that does not get its information directly from the source of the report. Instead a calculated eld can use expressions or scripts to
create a value out of existing reports elds, or create a completely new value.
http://www.pdoteam.com/2012/07/creating-a-bill-of-material-row-number-in-plant-3d-reports/ 1/5
08/12/2017 Creating a Bill of Material Row Number in Plant 3D ReportsProcess Design, from the Outside | Process Design, from the Outside
Give the report a unique name and click Edit report layout.
Switch to the Field list, right+click and select Add Calculated Field.
Right-click on the newly added eld and select Edit Calculated elds.
Change the Name (Mark), expand the Scripts row, click the drop-down for Get A Value, select New and then click Ok.
http://www.pdoteam.com/2012/07/creating-a-bill-of-material-row-number-in-plant-3d-reports/ 2/5
08/12/2017 Creating a Bill of Material Row Number in Plant 3D ReportsProcess Design, from the Outside | Process Design, from the Outside
You should be taken to the Scripts Window which created a function for us at the bottom. The function is that part that starts with private void and ends
with the last brace }.
Now, this script is in C#. Do NOT PANIC. We are going to add about 3 short lines that make the magic happen.
First a little background. I found instructions on how this function works on the GetValueEventArgs topic on the DevExpress site.
The important piece is where it shows us how to set the calculated eld value (e.Value):
Heres the script to enter in the function (and a little piece above it.
The rows that start with // are just comments to help explain what is happening. Outside of the function, we are storing a number that represents the
current row that is about to be in the report (int rowcount = 1). When the report is generated, the calculated eld were going to place will ask for a value.
When it does, we are going to give it the value of the row we are on (e.Value = rowcount). After we set the value, we have to add 1 so that we can use it for
the next row.
All the code lines end in a ; which is C#s way of letting the program know there is nothing else happening on the line.
http://www.pdoteam.com/2012/07/creating-a-bill-of-material-row-number-in-plant-3d-reports/ 3/5
08/12/2017 Creating a Bill of Material Row Number in Plant 3D ReportsProcess Design, from the Outside | Process Design, from the Outside
That wasnt so bad, was it?
Once the blank cell is in place, drag and drop our calculated eld onto it.
Heres what it looks like after I cleaned up the cell styles and fonts some.
In the report for downloaded below I also added the PartSizeLongDescription eld to the grouping. Without this eld in the grouping, the report doesnt
gather components correctly, and weve seen clients with anges grouped together wrong.
And yes, I cant resist putting our logo on stu BTW, thats a hyperlink so you can put that to your companies logo and pull it from the web instead of
embedding it.
http://www.pdoteam.com/2012/07/creating-a-bill-of-material-row-number-in-plant-3d-reports/ 4/5
08/12/2017 Creating a Bill of Material Row Number in Plant 3D ReportsProcess Design, from the Outside | Process Design, from the Outside
Series Navigation
Related Posts:
Uppercas from the BOM s for instead of
Letters AutoCAD Report Plant 3d sets in
in P&ID Creator. Isometric AutoCAD
LOGIN
Password
Remember Me
Log In
Register
Lost Password
SERIES
RECENT POSTS
http://www.pdoteam.com/2012/07/creating-a-bill-of-material-row-number-in-plant-3d-reports/ 5/5