SSRS - Creating a SubReport from a new Report Data Definition, Step-by-Step

These are the steps to create a sub report from a new Report Data Definition (RDD). These steps are specifically for an Epicor Cloud based system where the user doesn’t have access to the server. The goal is to use multiple BAQs in a Report Data Definition and then to build a report with sub reports.

Most of the credit for this post needs to go to @Fernando and @utaylor . They helped me over some of the hurdles. BAQ Report - SubReport using BAQReport

Step 1) Create the BAQs needed to retrieve the data for the report. In my example, I have 3 BAQs.

  1. JobTravelerBAQ7, this BAQ will create the main SSRS report
    
  2. JobTravelerBAQ7JobMtl, this BAQ will be a sub report
    
  3. JobTravelerBAQ7SubC, this BAQ will be a second sub report
    

Step 2) Create a new Report Data Definition. The Report Type will be SQL Server Reporting.

Step 3) Add the BAQs to the Report Data Definition. These are the Data Sources.

Step 4) Create a report style for the new Report Data Definition. Leave the Report Service blank.

Step 5) Use the plus sign to add a report style. The Report Type is SQL Server Reporting, the data definition is the one you just created, and the output location is database.

Step 6) Using the 3 dots in the upper right, click “Create SSRS Report”. Epicor will assign a Report Location and create the base SSRS report.

Step 7) Download the newly created report by going back to the 3 dots in the upper right and clicking “Download SSRS Report”.

Step 8) Go to your downloads folder. A zipped folder called Reports will be in your downloads folder. Notice that the file path inside the zipped folder will match the Report Location path. You have to continue to maintain this path.

Step 9) Extract the Report Builder File and open it. In this example, there is only 1 SSRS report and it is called JobTraveler7. This report has the TableGuid, the DataSource, and the data from the 3 BAQs as 3 unique data sets.

Step 10) The goal is to have a main report and 2 subreports, so 3 reports total are needed in the report location folder. To get the 3 reports, copy the file JobTraveler7 and paste it 2 times in the same folder. For organization, rename the copied files the same name as the subreport BAQs. When you are finished you will have a folder that looks something like this:

Step 11) Open the SSRS report that is your main report, in this example it is JobTraveler7. You will have 3 datasets in this report. This is your main report and you only need the first dataset. Right click on the next 2 datasets and delete them. The dataset on the main report should look like this now:

Build the tables and groups for the report to display as you like.

Step 12) Open the first SubReport SSRS report, in this example it is JobTraveler7JobMtl. Again, you will have the 3 datasets. Right click on the datasets that you do not need. This subreport dataset will look like this:

Then build the tables and groups to display the data.

Step 13) In the subreport file (JobTraveler7JobMtl), go to the parameter and right click and select Add Parameter.

The Report Parameter properties will pop up. Keep adding the parameters that you need for the subreport. Important: You must have the parameter Table Guid.

Step 14) Still in the subreport file (JobTraveler7JobMtl), go to the dataset. Right click on the dataset and select Dataset properties.

Step 15) Inside the Dataset properties, go to the filter tab. Add the filters that you need for the subreport. SAVE.

Step 16) Go back to the main SSRS (file JobTraveler7). Add a box that will contain the subreport by clicking Insert>Subreport. Right click on the subreport and bring up the Subreport Properties. Enter the file name for the subreport in the box “Use this report as a subreport:”. You will not be able to browse to enter this file name, you must type it.

Step 17) Also in the Subreport Properties, go to the parameter tab. Important: You must have a parameter for TableGuid here as well. Add the additional parameters to link your subreport data properly.

Step 18) Repeat steps 12- 17 for the other subreport.

Step 19) Save all the SSRS reports. You should have 3 saved reports in the folder for the report location. Compress the files into a zip folder, maintaining the file path that was listed in step 8.

Step 20) Go back to Epicor and the report style. Go to the 3 dots in the upper right and click “Upload SSRS Report”. If your main report references the subreports, and they are all in the proper zipped folder, then your upload message should show your 3 file names.

Step 21) To check if you were successful, in the report style you can pull down the 3 dots and click “Generate Form”.

Once you have the 3 .rdl files uploaded to the server, you can build a menu item for the report style. With the menu item and the ability to hit print you can edit the SSRS report using a screen called SSRS Report Design. These steps are detailed in SSRS Generate For Design Step-by-Step

This is how to create subreports from a new Report Data Definition when you have Epicor in the cloud and can not access the server.

Good Luck! Hope this will help you build more custom reports that require mulitple BAQs and subreports.

Nice write up. Thanks for sharing.

Makes you wonder why all ootb reports aren’t based on BAQs instead of black box assemblies.

technical debt

low hanging AI fruit

trashy