Text Editor

The Text Editor window allows you to edit values in Report Commander that support variables and functions.

Throughout Report Commander, when you see a text entry box with a {} button next to it, this indicates that the field supports variables and tokens. When you click the {} button, the Text Editor window is displayed to help you select and insert variables and functions.

You do not have to open the Text Editor to add variables and function calls to text boxes: you can always type or paste in the variable or function call using the appropriate syntax.

At the top of the Text Editor window is a text edit box where you can type or paste text. Below this is a preview window that shows you what the text will look like after Report Commander evaluates the variables and functions it finds in the text.

If there are any errors in the variables or formulas you have entered, you will see an error message here.

Once you have finished editing your text, click OK to return the value to the field you came from.

Variables

The Variables tab lists all Report Commander variables that have been defined for the computer, your user settings, and the project. You can also show the available Windows environment variables by checking the Show Windows environment variables box.

To insert a variable into your text, you can click the Insert button () to insert the variable at the current cursor position, or select the variable in the list and drag it to the location in the text where you want it to appear.

Date/Time

The options on the Date/Time tab help you insert a call to the now function, which is an easy way to insert the current date/time, or a value calculated based on the current date/time.

The "current" date/time will be the date/time when the project is executed.

If you want to use a date calculated based on the current date/time, check the Offset the date/time by box and enter the appropriate offset. For example, if you want to use the previous day's date, you would set to the offset to -1 Day.

Then select the format that you want the date/time to appear in. Choose one of the predefined formats, or create your own using formatting patterns. The Preview box will show a preview of the date/time using your selected calculation and format.

Once you have the value you want, click the Insert button () to insert the function call at the current cursor position, or select the button and drag it to the location in the text where you want it to appear.

For more complex date/time operations, use the Functions page.

Functions

The Functions tab helps you insert function calls into your text. On the left is a list of available functions. The panel on the right shows information about the selected function.

To insert a function call into your text, click the Insert button () to insert the function call at the current cursor position, or select the function in the list and drag it to the location in the text where you want it to appear.

Report Commander will insert the function call with placeholders for all of the function arguments. You then must edit the function call to replace those placeholders with the appropriate values.