Add Custom Fields in a PSR File - Intergraph Smart Instrumentation - Help

Intergraph Smart Instrumentation Help

Language
English
Product
Intergraph Smart Instrumentation
Search by Category
Help
Smart Instrumentation Version
13.1

When working with reports, you sometimes need to use extra fields in addition to those currently available to you. A number of custom fields (named Udf C01, Udf C02, and so forth.) are appended by default to every .psr file that you import. After saving a report as a .psr file, you can retrieve your custom field values and include them in the header of the report.

  1. Start InfoMaker.

  2. Build a query for generating a report. For details, see Build a Query.

  3. For each custom field that you want to add, do the following:

    1. With the main report window open, select Insert > Control > Computed Field.

    2. Select the mouse pointer at the position where you want to place the computed field on the report.

    3. On the Modify Expression dialog, under the Expression section, type an expression according to the following syntax:

      F_GetProfString("<SmartPlant Instrumentation home folder>\intools.ini", "External Report","<s_udf_name>","<s_udf_value>")

      For example:

      F_GetProfString("C:\Program Files(x86)\SmartPlant\Instrumentation\intools.ini", "External Report","udf_C01","Not found")

      SHARED Tip The 's_udf_value' parameter is used to specify a default string to display where no value exists for the specified custom field.

    4. At the right of the report, using the Position, Font, and Format tabs, make the definitions for the custom field, for example, alignment, color, style, and so forth.

  4. If you intend to display more than one .psr file in the Smart Instrumentation PSR List window, display the SQL data source, and under the where section, type the following expression:

    psr_storage.psr_stor_desc='<PSR description>'

    Without adding )expression to InfoMaker, Smart Instrumentation always retrieves from the database the first row of custom fields in the PSR List window, regardless of the report you select. Make sure that the '< PSR description>' has the same value as the value in the Description column of the PSR List window.

  5. Save the current report as a .psr file.

  6. Open Smart Instrumentation.

  7. With any main module window open, select File > Import PSR.

  8. In the PSR File Viewer window, select to open the PSR List window.

  9. Scroll to the right side of the window to view the custom field columns and in the columns Udf C01 to Udf C10, type the values.

  10. Select Save Save Icon 16bit to save the changes to the database.