Format a Number, Date or Text on a Report



  
 Applies To 
  
 Product(s):gINT Logs, gINT Professional, gINT Professional Plus
 Version(s):N\A
 Environment: N\A
 Area: Report-Multiple General
 Subarea: N\A
 Original Author:Kathleen Holcomb, Bentley Technical Support Group
  

 

Steps to Accomplish

Formatting a field in INPUT affects only how the number displays in INPUT.  The number is still saved to the database with the number of digits that were entered.  To change how a number or date appears on a report you will need to edit the report template.

To Format a Number:

In our example, we will format water content density to print with one decimal place using our log report template.

  1. Move to the Report Design tab.  Select the Logs tab.  Select the appropriate log template from the big yellow drop-down.
  2. Double-click on the Water Content column entity to open it for editing.  This Text Expression displays the water content data just as it is entered:

    <<WC DENSITY.Water_Content>>

  3. To format the water content, from the System area of the Data Tool, select Functions.  From the Items area, select Format.

  4. Highlight the Text Expression and right-click the Paste button on the right:

    This will wrap the Format function around the text expression:

    <<Format(<<WC DENSITY.Water_Content>>)>>

  5. Click to place the cursor just before the close paren.  Add

    ,0.0

    The expression now reads

    Format(<<WC DENSITY.Water_Content>>,0.0)>>
  6. Click OK and OK to close the column entity.

To Format a Date

In this example, we will format the Date Started field with 2 digits for month, day and year, and with slashes.  The date circled below appears as 04/28/2009 INPUT.  We want it to print on the log report as 04/28/09.

  1. Move to the Report Design tab.  Select the Logs tab.  Select the appropriate log template from the big yellow drop-down.
  2. Double-click on the Date Started text entity to open it for editing.  This Text Expression displays the date just as it is entered:

    <<POINT.Date Started>>

    Note: If you see only the label for Date Started move to the Associated Text tab.  The expression you want is probably in the Text Expression box here.

  3. To format the date, from the System area of the Data Tool select Functions.  From the Items area, select Format.

  4. Highlight the Text Expression and right-click the Paste button on the right:

    This will wrap the Format function around the text expression:

    <<Format(<<POINT.Date Started>>)>>
  5. Click to place the cursor just before the close paren.  Add

    ,MM/DD/YY

    The expression now reads

    Format(<<POINT.Date Started>>,MM/DD/YY)>>
  6. Click OK and OK to close the text entity.

To Format Text

In this example, we will format the client name to appear upper case.

  1. Move to the Report Design tab.  Select the Logs tab.  Select the appropriate log template from the big yellow drop-down.
  2. Double-click on the client name text entity to open it for editing.  This Text Expression displays the client name just as it is entered:

    <<PROJECT.Client>>

    Note: If you see only the label for the client name move to the Associated Text tab.  The expression you want is probably in the Text Expression box here.

  3. To format this text, from the System area of the Data Tool select Functions.  From the Items area, select Format.

  4. Highlight the Text Expression and right-click the Paste button on the right:

    This will wrap the Format function around the text expression:

    <<Format(<<PROJECT.Client>>)>>
  5. Click to place the cursor just before the close paren.  Add

    ,>

    The expression now reads

    Format(<<PROJECT.Client>>,>)>>
  6. Click OK and OK to close the text entity.

See Also

For more information and other formatting options see the Help topic Format (function).

To format numbers for scientific notation, use the function FormatSci and see the Help topic FormatSci (function).

The function RoundTo has even more rounding options than the Format function.  See Help topic RoundTo (function).