Link to home
Start Free TrialLog in
Avatar of Kaporch
Kaporch

asked on

SSRS Subreport Not Showing

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.
Avatar of Kaporch
Kaporch

ASKER

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?
Avatar of Kaporch

ASKER

Update:
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.
ASKER CERTIFIED SOLUTION
Avatar of Kaporch
Kaporch

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James Murrell
https://www.experts-exchange.com/help.jsp check it for how to close and get points
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?