web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to hide Main report row if Sub report returns no data in SSRS 2008 R2

(0) ShareShare
ReportReport
Posted on by 1,145

Hi,

How to hide Main report row if Sub report returns no data in SSRS 2008 R2 need help.

Thanks in Advance

Sekar V

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Access sub report properties - visibility - show based on expression.

    Enter this code:

    =IIF(RowNumber(Nothing)>0,False,True)

    Detailed steps : www.sanjaykumar.us/.../ssrs-suppress-sub-report-data

    Cheers!

    Sanjay

  • SekarGP Profile Picture
    1,145 on at

    Hi,

    Thanks for your immediate response, I have applied the code but its not working. I have added sub report in one column remaining columns are empty, what I want means, if there is no data return from sub report, I have to hide row in main report.

    Thanks in Advance,

    Sekar V

  • Mike Smith Profile Picture
    6,840 on at

    While I have not had to find a solution to this requirement, I don't think this is possible.

    This would require that you would determine that the sub-report doesn't have detail and this pass this value to the main report. This functionality is not available in SQL Reporting Services.

  • Community Member Profile Picture
    on at

    Sekar,

    RowNumber returns a running value of the count of rows within the specified scope, just as RunningValue returns the running value of an aggregate function.

    Read this article, technet.microsoft.com/.../dd255249.aspx for more detail.

    You should be able to hide the sub report if the rowcount is 0 by setting the sub reports visibility property.

    Looks like you have inserted a tablix and in one of the row , column you have inserted a sub report. Suggest you first merge all the columns of the row where the sub report is to be included, and at the merged cell of the row insert the sub report and then set the visibility property.  The sub report will print only if there is a value other wise the a blank report will not be printed.

    You also take a screen shot of the report design post it here so that we can see the design  you are attempting to implement.

    Cheers!

    Sanjay

  • Community Member Profile Picture
    on at

    Hi Sanjay,

    I am facing same issue i did merging all  columns of the row where the sub report is included and at the merged cell of the row insert the sub report and then set the visibility property like =IIF(RowNumber(Nothing)>0,False,True) here problem is Nothing represents scope of main report but i am expecting scope of sub report which i can't access . I need solution of this if anyone of you can help please respond....

    Thanks...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans