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

OfficeWriter and Reporting Services allow you to use parameters to filter the data returned by your database query, and display a subset of the data in your report.

What is a parameter?

A parameter is a value that filters data. For example, you have a sales report that lists each sales group and each sales rep within that group. However, you only want to see one sales group at a time. If you use the sales group field as a parameter, when the report is executed, you will be prompted to select a group. The report will only display data for the group that you selected.

A single report can include multiple parameters.
To use parameters, you must first define them. Defining parameters differs depending on whether you set them up in OfficeWriter Designer using MS Query or in Visual Studio/Report Builder.

Defining Parameters with OfficeWriter

OfficeWriter uses Microsoft Query to add parameters to a report. For more information see Defining Parameters with MS Query in Excel.

Defining Parameters in Visual Studio .NET

When you create data sources and queries in Visual Studio .NET, you can also define parameters. MSDN has thorough documentation for working with parameters in Reporting Services:

Adding Parameter Values to your OfficeWriter Report

If you want to display the parameter values used in the report, you can use Reporting Services formulas to show these values.

Viewing Reports with Parameters in the OfficeWriter Designer

When a report with a parameter is opened, OfficeWriter will prompt the user to enter a parameter value. If the parameter was defined with OfficeWriter and Microsoft Query, a list of values that may be entered will not be displayed. The user will have to know the value - for example, a sales rep ID number - to enter it. If the parameter was defined in Visual Studio .NET, OfficeWriter will display a list of valid values. These may be the actual values (for example, sales rep IDs) or meaningful labels (for example, sales rep names).

After you have retrieved the report you want to view, when you click View the Report Parameters dialog will open.



Icon

When we defined the parameter with Microsoft Query, the Report Parameters dialog did not instruct the user to click to enter a parameter value.

When you click to enter a value for a parameter, the Valid Values dialog will open if the parameter has a predefined list of values. Otherwise, the user can type in the value for the parameter.

Once all the parameters have values, click Ok.

Samples