SSRS Subreport Not Showing

Posted on 2009-04-23
Last Modified: 2012-05-06
I have two reports, one the Company for DC report is the parent.  The Gift Expenses for DC report is the subreport.  I'm just passing 1 parameter between the reports: SpendDateCalendarYear.  I'm getting an error stating that the subreport can not be shown.  I'm passing in the subreport parameter as follows:  =First(Fields!ParameterValue.Value, "SpendDateCalendarYear").  On the subreport, the parameter name is also named SpendDateCalendarYear, it is hidden and has no available values, and I have a default of 2008.  I'm not sure what I'm doing wrong, why the subreport won't appear.  I can email the reports to somebody who wants to help.
Question by:Kaporch

    Author Comment

    Update: when I hardcode the parameter I'm passing in the parent report as '2008', the subreport appears correctly.  Also, if I don't pass in any parameter to the subreport, it appears correctly.  Using the value of Parameters!SpendDateCalendarYear.Value to pass in from the parent to the subreport doesn't work.  Also, using a field in the dataset (which I know has a valid value of 2008, I tested on the report) doesn't work.  What's the valid format to pass parameters into a subreport?

    Author Comment

    The first subreport is showing ok using =Parameters!SpendDateCalendarYear.Value as the value being passed in, but the 2nd report using the same parameter value is giving the report can not be displayed error.  Also, the 3rd report with no parameters being passed in does not display either.

    Accepted Solution

    I found out the problems I had had to do with using headers & footers in the child reports.  Moderator, please refund my points.
    LVL 31

    Expert Comment

    by:James Murrell check it for how to close and get points

    Expert Comment

    Kaporch, so are header and footers in child reports necessary or to be avoided, or is there a way to use them? I don't have any in my child report and yet still get "Error: Subreport could not be shown", even tho i've checked and rechecked the params i pass.
    I was not successful doing this: "when I hardcode the parameter I'm passing in the parent report as '2008', the subreport appears correctly." But if i set a default in the child report for the report param, the child on it's own appears fine according to that param value.
    So what's the deal with headers and footers, can you describe briefly?

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now