Encode Variables

Use the Encode feature to create string variables that contain non-display and other special characters. This is handy for international characters or special symbols, or to create escape sequences for printers. Creating an Encode variable in SQR Production Reporting Studio generates a Production Reporting ENCODE statement in the BEGIN-PROGRAM section of the Production Reporting file.

*  To create an Encode variable:

  1. Click Insert Field button on the Object Toolbar, select Insert, then Field, or right-click Fields in the Object Explorer (see Using the Object Explorer) and choose Insert.

  2. In the Report Fields dialog box, click Variables.

  3. Click New and choose Encoding.

If you do not have a keyboard with the Euro symbol, use the Encode feature to create a string variable for it. The code for the Euro symbol is typically 128. To use character codes, surround the code in angle brackets as shown here:

Variable Name        euro
Encode Characters:   <128>

The preceding information creates a string variable called $euro. You can use the $euro variable anywhere in SQR Production Reporting Studio or the Production Reporting language that allows string variables.

You can combine display and non-display characters in any combination, as long as you surround each non-display character code by angle brackets. The example shows a printer escape:

Variable Name       bold
Encode Characters   <27>L11233

The code generated by SQR Production Reporting Studio for euro and bold appears as:

	begin-program
	 	encode ‘<128>’ into $euro
	 	encode ‘<27>L11233’ into $bold
	 	do main
	end-program

Note:

For detailed information on encoding, see Chapter 4, “Encoding in Production Reporting” in Volume 2 of the Hyperion SQR Production Reporting Developer's Guide.