How t0 – Create a master detail report in SSRS without using Sub report.


Suppose we have simple master (Person) and detail (Favorite
Actor and Favorite
Movie) tables in our database .

To write a report that doesn’t make use of sub reports we need to have a single dataset as shown below

Create a new report project and drag the List control for Master table and two Tablix inside List for the detail records.

Select the list and set Group Properties for the Row Groups as shown below.

Select the row for the first tablix that shows Favorite Actor information, right click it and specify group properties as FAID (i.e. primary key for that table)

Do the same for the other tablix (Movie table).

Run the report, it will show the following output

To hide the tablix if there is no data, set its Hidden Property using the following expression

For tablix 1 à
=IIF(IsNothing(Fields!FAID.Value),True,False)

For tablix 2 à
=IIF(IsNothing(Fields!FMID.Value),True,False)

The DataSet query

</p>
<p>select P.Id, P.FirstName, P.LastName,fa.Id as FAID,fa.firstname,fa.lastname, fm.Id as FMID,fm.Movie from Person P<br />
left outer join FavoriteActor as FA on P.Id = FA.PersonId<br />
left outer join FavoriteMovie as FM on P.Id = FM.PersonId</p>
<p>

Hope it helps

Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

12 thoughts on “How t0 – Create a master detail report in SSRS without using Sub report.”

  1. Thanks! This is what i looking for. I have another case like this, there is an amount column in Favorite Actor and Favorite Movie. I need a total of the amount display at the bottom of tablix 1 & tablix 2. I put a field to show the total amount in tablix 1 but the amount is double as the records from the JOIN query return duplicate data from Favorite Actor. Is there any other way to do that?

    Like

  2. Great technique. Simple and creative way to achieve a master-detail report without using a subreport. I was looking for exactly this solution! Thanks for the excellent article.

    Like

  3. This is a very nice post. I have tried it, however, the detail tablix (es) are showing only one record and the group total is for all the extracted total from the query, where have I gone wrong please.

    Like

  4. Gad…so simple, but so easy to miss a step. Need to group on detail, not create a parent group in List or it will throw the no details members error. A million thanks!

    Liked by 1 person

  5. great article I am trying to implement it but my detail table only displays first rows… for both tables though I am using customer, cash and cash applied tables to print customer wise cash transactions report.

    Like

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Dynamics 365 Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog

Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Knowhere365

Specific topics by Django Lohn on the whole Microsoft365 Stack

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue MVP

A Microsoft Business Applications MVP

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.

CRM Keeper

Dynamics 365 Customer Engagement, CRM, Microsoft CRM, Dynamics CRM