Page tree
Skip to end of metadata
Go to start of metadata

OfficeWriter Enterprise Edition allows you to create custom formulas. The formulas can be based on query results, report parameters, or they may access a set of global variables that Reporting Services contains.

Formula Topics

Reporting Services Global Variables

Reporting Services contains global variables that you can access if you have OfficeWriter Enterprise Edition. To access the global variables:

  1. On the OfficeWriter toolbar, click Formulas and select Add Formula.

  2. In the Insert Formula dialog, click the + next to Globals to open the list of Reporting Services global variables.



    You will see six global variables:

    Execution Time

    The report's execution time

    Report Server URL

    The URL of the server running the report

    Report Folder

    The folder on the Report Server containing the report

    Report Name

    The Name of the report

    User ID

    The ID of the user logged on

    Language

    The report language


  3. Select Execution Time from the list.

  4. Click Insert and Ok.

  5. Click Formulas and select Add Formula.

  6. Expand the Globals list.

  7. Select Report Server URL from the list.

  8. Click Insert and Ok.

  9. Repeat the steps above until you have added all six global variables. When you select Formulas, you should see:

Parameters in Reporting Services Formulas

You can also use this approach to build formulas that use the parameter values. These formulas can be inserted into the report to display the parameter values selected when running the report.

  1. Select Formulas > Add Formula

  2. Expand the Parameters section

  3. Select a parameter and click the Insert button

  4. Click OK.

Building Formulas from DataSets

This section will cover how to create a formula using data from a data set. This particular example will use the SUM function:

  1. Click Formulas on the OfficeWriter toolbar and select Add Formula.

  2. Click the + to expand the Formulas list.

  3. Scroll down, select SUM, and click insert.



  4. Click the + to expand the DataSets list.

  5. Find your query and click its + to open it.



  6. In the Expression list on the right, highlight everything inside the SUM parentheses, as shown.



  7. Click SalesAmount and Insert. Your formula should now look like this:



  8. Click Ok to return to your worksheet.

Inserting Formulas into a Word Report

To insert a formula into a Word report document:

  1. Place your cursor where you would like the formula to be inserted.

  2. Go to Formulas in the OfficeWriter Designer toolbar

  3. Under the Insert Formula section, select the formula to insert.

Below is an example of a template that has a global variable formula and a formula built from a data set:



Here is what the example template looks like when it's been populated with data:



Managing Formulas

Officewriter Designer gives you the ability to manage and maintain formulas you've built. The Formula Manager allows you to change, delete, and build new formulas. To start the Formula Manager, click the Formulas button on the OfficeWriter toolbar and select Edit Formulas.

To build a new formula:

  1. Click the Add New... button. This will bring you to the Formula Builder screen described in the previous section.

  2. Follow the directions above to create and use a new formula.

To change an existing formula:

  1. Highlight the formula you want to change.

  2. Click the Edit button. This brings you to the Formulas Builder screen described above.

  3. Make the changes to the formula.

  4. Click Ok to save the updated formula.

To delete a formula:

  1. Highlight the formula you want to delete.

  2. Click the Delete button.

  3. Click Yes to confirm deletion.

  4. Click Close to return to the report document.

  5. Important: You must manually review your report document and remove any reference to the deleted formula.

To rename a formula:

  1. Highlight the formula you want to rename.

  2. Click Rename.

  3. On the Formula Name screen, type in a new name and click Ok.



    Icon

    The formula name is only used to help you maintain formulas. It is not used anywhere in your report document.

  • No labels