To change report colors at runtime

  1. In the Infrastructure Administrator, do one of the following:
    • Click Enterprise and connect to the enterprise industry model. Open a project.
    • Click File and open an industry model drawing or template.
  2. Select the Industry Model node for the report.
  3. On the Administrator toolbar, click the Report Designer icon .
  4. Create the report.
  5. Enter a function name in the ForeColor property of the text control instead of the color name (or HTML color) itself. For example,
    {Fun.TreeColor}
  6. Create a function that calculates the color you want to set for each single record.
  7. In the report designer window, click Add menu > Function > Manage.
  8. Click Add to add a new function. Enter the name, for example, TreeColor.
  9. In the Function pane, define:
    if Me.Record.LngValue("status") = 1 then
       TreeColor = "red"
    else
    TreeColor = "black"
    end if
  10. In the designer window, select the text box and set the ForeColor property as follows: {fun.TreeColor}.