How to add Calculated Field in Reports


 Product(s):Bentley Raceway & Cable Management
 Version(s):CONNECT Edition (10.04.00.31)
 Environment:N/A
 Area:Output Manager
 Subarea:Report Designer
 Orignal Author:Aadarsh Tale

Background

Bentley Raceway and Cable Management’s Report Designer allows you to customize a report template to include custom calculated fields to get the desired output in the exported reports. Calculated fields can utilize mathematical or logical expressions. The following procedure can be used to add a calculated field to a report template:

Steps to Accomplish

  1. Launch Bentley Raceway & Cable Management. Select a WorkSpace , and WorkSet and open a drawing file.


  2. Select Output ribbon tab and Click on the Output Manager.


  3. In the Output Manager, you can create a new report by clicking on New Report Template and choosing the required Report Type from the pick list.


  4. In this example, we will use an existing report template. Select the Detail_Cable_Lengths report template, then use Copy and paste tools. This step is totally optional and you can directly edit the default report template to add the calculated fields.

    Note: You can also rename the copied file according to your needs. For example: Detail_Cable_Lengths calculated fields.

  5. Select the report and click Select Resources to lock the resources which you want to see in the report.


  6. In Collaboration Manager, select the required resources, right-click and then Select Request Lock.


  7. As you can see in the image below all the locked resources got populated in the dialog box.


  8. Select the report Detail_Cable_Lengths calculated fields and then click on Edit Report Template to edit the report.


  9. Report Designer will open and here you can see that there are report headers and data fields from the template.


  10. To add a calculated field, navigate to the Report Explorer>Field List panel. Now right-click on the ReportInformation node or the HeaderInformation node depending on whether you want a calculated field in the header or in the main report and select Add Calculated Field.


  11. Now select the created calculated field, right-click and select Edit Calculated Fields…


  12. You can edit different properties from the Calculated Field Collection Editor. For example: I have changed the Display Name to Length.


  13. Click on the ellipsis to add an Expression.


  14. The Expression Editor will open and here you can add an expression to the calculated field according to your requirements by using the suitable functions and operators.


  15. For example, we will add an expression that will divide the cable length by the factor of 1000. Select ToDecimal() from the Functions.


  16. Now select LENGTH from the Fields.


  17. Include the mathematical Operators in the expression.


  18. As the type of field LENGTH is System.String, we will select the Field Type as String and press OK.


  19. Now drag the calculated field “Length” from the Field List and place it on the data field as shown in the image below.


  20. This is the exported report from the report template without any calculated field.


  21. The below given report output is generated from the above example.

See Also

communities.bentley.com/.../functions-and-operators-list-for-report-designer-in-bentley-raceway-and-cable-management

Still a Problem?

If above problem still persists, then please create a Service Request and contact the Bentley Product Advantage group.  Please include a list of all relevant details to get in depth analysis for a solution or workaround.

Comments or Corrections?

Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this Comments or Corrections?" section. THANK YOU!