View Article

Create a Master Detail Report with Two Queries

By Xelence Documentation posted 10-12-2022 15:32

  

Introduction

This process creates a master details report that uses multiple data sources to display related data from multiple tables. This example uses a master query to load master grid data and a detail query to load detail grid data.

Prerequisites

  • The entity must already exist and its query must already be configured.
  • The report with same name must not already exist.
Quick Steps
1 Click the Create New Item icon, then select New Page
2 Select the Page Type, then click Proceed
3 Select the template
4 Roll over the Report Layout, then click Choose
5 Enter the details, then click Next
6 Select the Search Criteria Fields, click the Add icon, then click Next
7 Select the Report Fields, click the Add icon, then click Next
8 Check the Select Different Query checkbox, then enter the query
9 Click the Set Parameters icon
10 Enter the Parameter Value, then click OK
11 Select the desired Data Grid Fields, click the Add button, then click Next
12 Configure the menu, then click Finish

Detailed Steps

Step 1. Click the Create New Item icon, then select New Page.

This opens a dropdown list from which you can select an object to begin its item wizard. The item wizard creates a file or files.




Step 2. Select the Page Type, then click Proceed.

This is the object you are creating. This example creates a master details lazy loading report.




Step 3. Select the template.

This example uses a Default Template.



Step 4. Roll over the Report Layout, then click Choose.

This example uses the Master Details layout.




Step 5. Enter the details, then click Next.

The important properties are:

  • Report (ID): Programmatic name of the report.
  • Title: Text that displays on the title bar when the user runs the report. If left blank, the application will display the report file name.
  • Portal Name: This is a starting point or gateway to other resources.
  • Select Folder: Specifies the folder where Xelence saves the report file.
  • Select Data Source: Identifies the query the report is based on. This comes from the entity and must exist there before it can be used here.
  • Export Type: Identifies whether to export the report in HTML or PDF format.
  • Description: Plain text description of the file that users can use to identify it.
The query GetOrders is configured in entOrder. You can change the Alias names, if required.




Step 6. Select the desired Search Criteria Fields, click the Add button, then click Next.

Select the fields you want to use as the report's search criteria. This example uses the Order_Id field.



Step 7. Select the desired Report Fields, click the Add button, then click Next.

Select the fields you want the report to display.

By default, this step starts with the criteria fields already added. Once you've added fields, you can click the up and down arrow keys to rearrange the field order.


Step 8. Check the Select Different Query checkbox, then enter the query.

This example uses a different query to load the detail grid data.


Enter or select the File Name and Query Name from the drop-down list and click OK.


The query GetOrderDetails is configured in entOrderDetails. You can change the Alias names, if required.



Step 9. Click the Set Parameters icon.

This allows you to set the relation to load the detail record.



Step 10. Enter the Parameter Value, then click OK.

This example uses Order_Id.




Step 11. Select the desired Data Grid Fields, click the Add button, then click Next.

This example selects the Order_Details_Id, Product_Id, Quantity, and Unit_Price fields. 

The detail grid fields are added. You can use the arrow icons to rearrange the order of the fields. Click Next.



Step 12. Configure the menu, then click Finish.

If desired, update the menu based on how you want it to appear to the user. Click Finish to close the wizard and create the report. 

When you finish the wizard, the report should look something like this: 

Then, run the Preview. You can open the Reports screen and view your report right away. It should look something like this. Click the View Report button to view the report.

The master details report is accessible in the application right away. You can now either download the report or print it.


What are the improvements over S3 Version 6?

Previously, a report schema .xsd and layout .rdlc was required and it had to be configured before creating a Report. Now, with Xelence, the process is made much simple and only an entity and query is required. Also, various report templates are available to choose from in Xelence.


Related Articles

Create a Master Details Report


This post is part of the Reports Overview. Click here to open Reports Overview


#Xelence
#Develop
#Development Studio
#Reports
#Task Steps
#Everyone
#Text Help

0 comments
83 views