how do I show sub report title on the main report?

  • I sure hope this makes sense:  I have one main report with three sub reports.  There are three links on the main report to each of the sub reports.  Clicking one of the links will display that sub report within the main report and only one sub report can be displayed at a time.  I want the title of the sub report to appear in the main report's page header.  We have custom code to do this but it is not working so am wondering if there is another way.  I'm not an SSRS expert by any means so any is appreciated.

  • Hi Karen,

    How are you displaying and hiding sub reports?  Are you toggling the visibility properties?  In other words, when a user clicks on a link for a sub-report, how are you hiding a sub-report and displaying the one that was clicked on?

  • There is a bookmark and when the bookmark is clicked the report shows.  The report is hidden or visible based on the bookmark value.  The funny thing is when we deploy to SQL Server 2008 reporting services we can see the sub report title on the main report but when we deploy to SQL Server 2016 we cannot.  Also, in my local environment in SSRS I cannot see the sub report title on the main report.

  • Could you put a formula in the title to show a value based on sub-report visibility?  Something like, "if sub-report 1 visible then title 1,...if sub-report N visible then title N".

  • Not that doesn't seem to work as the field is not visible to the main report.

  • Maybe I'm not understanding (wouldn't be the first time) 😉  Let's say we have a report with 3 sub-reports.  The 3 sub-reports are always technically there, they just aren't always visible.  Since they are always there, I can reference their properties (like visibility) through a formula in a text field on the report.  That's the scenario I'm suggesting to solve your problem.  Make sense?

  • Because the text box that should display the report title is not on a data regain, it is in the main report's page header.

  • It doesn't need to be in a data region 😉

  • If I can get some time later or tomorrow, I'll create an .rdl file for you to show you what I'm talking about.

  • That would be very helpful.  Maybe I just don't know how to build the formula -- I keep getting errors.  I'm not much of an SSRS developer:)

  • Seems like if you had a parameter, you could hide the ones that aren't selected.
    Just set the Visible property to a function.
    Something like IIF(Parameters!ShowWhich=1,True,False) and modify them for each subreport.

  • So this isn't exactly what we talked about, but it's a simple design.  I'm wondering if this would work.  The concept is to have all of the sub-reports visible based on different text boxes which could serve as sub-report titles. 

    Here is how it would look in design mode

    When the report is first opened the user would see sub-report options with nothing showing yet

    Each sub-report could then be shown 


    Would this work for you?

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply