Conditional Sub-Queries Component Example

Example: Working with Conditionalsubqueries_component.bqy.

Note:

For Conditionalsubqueries_component.bqy to work correctly, it must be first merged with another Interactive Reporting Studio document; for example, Sample_en_esm.bqy. See Merging Components.

*  To use Conditionalsubqueries_component.bqy:

  1. Merge Conditionalsubqueries_component.bqy and Sample_en_esm.bqy.

    See Merging Components.

  2. In Interactive Reporting Studio , from Sections, right-click Sales Query and select Duplicate section.

    Sales Query2 and Sales Results2 are created.

  3. Rename Sales Query2 to be Secondary Query, and Sales Results2 to be Secondary Results.

  4. Select Sales Query, and drag State to the Filter line.

    Filter is displayed.

  5. Optional: If the Sample.oce dialog box is displayed, click OK without entering any information.

  6. Select Show Values, and select AZ and CA.

  7. Click OK, and select State on the Filter line.

  8. Select Query, then Variable Filter.

  9. From Sections, select Secondary Query, and drag State to the Filter line.

  10. For Secondary Query, repeat steps 5-7, but do not set as a variable filter.

Proceed with setting the component properties and processing the queries.

*  To set the component properties and process the queries:

  1. From Sections, select Conditional Sub-Queries Properties frame.

  2. From Available Queries, select Sales Query and click Next button to move it to Primary Events.

  3. From Event Name, select Sales Query.

  4. From Limit Lookup Table, select Sales Results.

  5. From Available Queries, select Secondary Query and click Next button to move it to Sub-Queries.

  6. Click Apply.

  7. From Sections, select Sales Query, and click Process.

    Filter is displayed with AZ and CA selected. Click OK. Sales Results displays data only for AZ and CA.

  8. From Sections, select Secondary Results.

    The data from the primary query is returned in the sub-query; that is, the data is displayed only for AZ and CA.