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 | ||
How do I change the date formatting on our report?
I've applied formatting to a field in INPUT but it didn't affect the report. How do I change the report?
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.
In our example, we will format water content density to print with one decimal place using our log report template.
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>>
This will wrap the Format function around the text expression:
<<Format(<<WC DENSITY.Water_Content>>)>>
,0.0
The expression now reads
Format(<<WC DENSITY.Water_Content>>,0.0)>>
Click OK and OK to close the column entity.
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.
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.
This will wrap the Format function around the text expression:
<<Format(<<POINT.Date Started>>)>>
,MM/DD/YY
The expression now reads
Format(<<POINT.Date Started>>,MM/DD/YY)>>
Click OK and OK to close the text entity.
In this example, we will format the client name to appear upper case.
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.
This will wrap the Format function around the text expression:
<<Format(<<PROJECT.Client>>)>>
,>
The expression now reads
Format(<<PROJECT.Client>>,>)>>
Click OK and OK to close the text entity.
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).