Solved

SSRS 2008 - Pass Parameter to Subreport

Posted on 2009-05-06
3
1,576 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
index related performance counter  for SQL server DB 11 41
find SQL job run average duration 24 82
If in a where clause in t-sql 7 53
I am new to using JSON in SQL Server 2 59
Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 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