Format Code

<< Click to Display Table of Contents >>

Navigation:  EQuIS Library > Reports >

Format Code

The Analytical Results II (AR II) report and other reports based on AR II include a parameter called Format Results > Format Code (ST_REPORT_PARAMETER.PARAM_NAME = @format_select). By default, the parameter is not populated.

 

This parameter can be used to format the following report output fields:

REPORT_RESULT_TEXT

REPORT_RESULT_LIMIT

REPORT_METHOD_DETECTION_LIMIT

REPORT_REPORTING_LIMIT

REPORT_QUANTITATION_LIMIT

In some circumstances, REPORT_RESULT_VALUE

 

If a value is selected for this report parameter, then the format code will be applied to both REPORT_RESULT_TEXT and REPORT_RESULT_LIMIT because these two columns contain text values. However, only the significant figures of the selected format code is applied to REPORT_RESULT_VALUE due to its numeric type.

 

Example for format code = '#,##.00':

a RESULT_TEXT of 1234.125 is presented as a REPORT_RESULT_TEXT of 1,234.13

the RESULT_NUMERIC of 1234.125 is presented as a REPORT_RESULT_VALUE of 1234.13

 

Format Code Population

 

The selection list for the Format Code parameter is automatically populated with values for a range of standard formats, such as 0.00, 0.0########, 0.0E+0, and N1. See this Microsoft page for standard .NET numeric formats.

 

Users can add more format codes to the selection list by adding records to the RT_LOOKUP table with the following:

LOOKUP_TYPE = ARII_FORMAT

LOOKUP_CODE = LOOKUP_DESC = any valid values for a Format Code

 

Some standard formats include a single alphabet character, called the format specifier, and a second optional numeric character. The numeric portion, called the precision specifier, represents the number of decimal digits in the result. Below are possible format code alphabet characters, what they mean, and example outputs for formatting 1.2345 using 1 for the precision specifier in the format code, i.e. E1, F1, etc.:

 

Code

Explanation

Output

E1

Exponential notation

1.2e+000

F1

Integral and decimal digits with optional negative sign

1.2

N1

Integral and decimal digits, group separators, and a decimal separator with optional negative sign

1.2

P1

Number multiplied by 100 and displayed with a percent symbol

123.45%