Home > Tutorials > Report Manager Tutorial > Creating Advanced Reports > Creating Sub-Query Reports > Creating advanced reports: Sub query part 2
Part 2: Using the Sub-Query Report as a Filter
Use the Sub-query Report as the basis of a filter in a report.
Step 1: Set the Sub-query Filter
To use the sub-query created in the exercise above, set it as a filter in a report. Create a new report called Customer Invoice List using the following details.
- Report Name: Customer Invoice List
- Container: CustomerDocuments
- Columns: CustomerCode, CustomerName, Date, DocNo, DueDate, OrderNo, TotalExcl
- Filter:
- DocType Equal to INV and
- DocNo Is Not In Sub-Query: Sub Query - Credit Notes
- Parameters:
- Date Greater than or Equal to 01 July 2003
- Date Less than or Equal to 31 December 2003.
Step-by-Step Solution
- Right click on the Training folder and click Add Report.
- Enter the name: Customer Invoice List and click OK.
- Select the data container: CustomerDocuments.
- Select the columns listed above and click OK. The Report is displayed below the Training Folder.
- Select the Filter tab.
- Click the Add button and add the DocType filter to the report, using the filter details listed above.
- Click Add. The Filter field dialog box is displayed.
- Select the DocNo field as the filter field.
- Select Is Not In Sub Query from the Comparison Operator dialog box.A list of sub query reports are displayed.
- Select Sub Query - Credit Notes from the list displayed. Then click Ok.
- Click the Parameter tab.
Click Add and complete the parameters using the details listed above then click OK.
Note:Ensure both parameters are included.
Step 2: Run the Report
Run the report.
Step-by-Step Solution:
- Select the Customer Invoice List and click the Run button. The report is run and the results are displayed in Excel as shown in the figure below:
Step 3: Link the Excel report back to Sage Accpac Intelligence
Link the Excel report back to Sage Accpac Intelligence .
Step by Step Solution
- Select the Customer Invoice List report in the Report Manager.
- Click the Create and Link button.
- Select the Excel workbook that contains the report and click OK. The Specify a Template name dialog box is displayed.
- Leave the default name unchanged and click OK. The Excel workbook is converted to a template and linked to the report.
- Ensure the Report Manager is active for the next exercise.
This completes the section on sub-query reports. The next section deals with union reports.