Setting up parameter links

If a subreport contains parameters, the values must be supplied at runtime. You can map the subreport parameters to DBFields, formulas or parameters which are contained in the dataset of the component where the subreport is inserted in the primary report, and are of the same data types as the subreport parameters.

The following example shows how to set up parameter links between a primary report and a subreport.

Assume that you have two reports in the same catalog: Report A (with Report Tab A in it) and Report B (with Report Tab B in it). Report Tab B has a parameter PToday (Date type). Then, you insert Report Tab B as subreport into Report Tab A. When you view Report Tab A, you will be prompted to enter value for its subreport parameter PToday. However, you do not want to enter the value each time you run Report Tab A and instead want to give it a fixed value. To achieve this, follow the steps below:

  1. Right-click the inserted subreport in Report Tab A and select Format Subreport.
  2. In the Subreport dialog, click the Parameters tab (this tab is disabled if the subreport does not contain any parameters).
  3. In the Parameters column, you can see PToday is listed there and a same parameter is assigned to it by default in the Value column.
  4. Click the value drop-down list where all the DBFields, formulas and parameters of Data type in the dataset of Report Tab A are listed. Here, we select MYTODAY which is a predefined formula and returns a value ToDate(2006,01,01).

  5. Click OK to apply the settings.
  6. View Report Tab A, and no parameter dialog will be displayed prompting you to enter the value since the formula value is passed to PToday.

Notes: