Solved

SSRS 2008 - Pass Parameter to Subreport

Posted on 2009-05-06
3
1,583 Views
Last Modified: 2012-05-06
I have a main report with an included subreport.The subreport has dataset with a parameter called @CustomerID. When I view as a standalone report the subreport runs, prompts for customer ID and displays the report.

In the main report, this subreport has a parameter called @CustomerID. I want to set that parameter to the value of a text field on the main report (this text field is populated from a dataset in the main report).

When I try to display the sub report it displays the error "subreport cannot be shown". Can anyone outline how the parameter should be configured on both the subreport and the main report to read the value of the text box and pass it to the subreport's dataset?

Thanks!
0
Comment
Question by:BrogansMom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
Auric1983 earned 500 total points
ID: 24317883
BrogansMom,

I'm not sure if the properties page is the same on SSRS2008, but in 2005 if you right click on the subreport object in the main report and click on properties there is a Parameters tab, you just have to map to your CustomerID from the main report.

0
 

Author Comment

by:BrogansMom
ID: 24507106
I actualy got it working. I needed to have the parameter as a field on the sub report. Added it, set it to hidden and it's now working fine. Not sure if that's the "official" way to do it but it solved my problem.
0
 

Expert Comment

by:MMarlin7
ID: 25791538
BrogansMom, when you say "parameter as a field on the subreport", you mean the subreport's report parameter right? The one that is given a value in the parent report subreport properties?
I've been trying a long time to do this. This is the closest post i've found related to my issue: continually seeing "Error: Subreport could not be shown"
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

630 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