Solved

SSRS 2008 - Pass Parameter to Subreport

Posted on 2009-05-06
3
1,559 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
3 Comments
 
LVL 16

Accepted Solution

by:
Auric1983 earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

11 Experts available now in Live!

Get 1:1 Help Now