Solved

changing a ssrs subreport name dynamically

Posted on 2010-09-22
4
4,054 Views
Last Modified: 2012-05-10
I want to change the ReportName property of a subreport in the SSRS Dynamically.

The value of the name will come from a table in sql server.

When the report runs, i would like to pull the name of the report from the table in the Database and change the subreport name to match that value.
0
Comment
Question by:oseibonsu
[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
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:aelliso3
ID: 33738326
I fought this same issue once before and the answer to the question as asked is no because the ReportName properties field does not take dynamic values.
There is a possible workaround if you're willing ... you can create ALL the subreports that you need and place them onto the main report. Using the field, or parameter, you can dynamically unhide the subreport that you want ...
0
 

Author Comment

by:oseibonsu
ID: 33738507
I don't want to hide or unhide. I would rather create the RDL dynamically. (does anyone have method or link to a site on how to do this?)
0
 
LVL 11

Accepted Solution

by:
aelliso3 earned 500 total points
ID: 33738634
Then create an app that will display the reports instead of using Report Manager and change the xml in the rdl file on the fly. SSRS embeds the xml in the database without giving the front end the option to change it. This is why you have to create your own means of displaying it ... Here is the section that you have to change in the xml:

<Subreport Name="Subreport4">
     <ReportName>Report1</ReportName>  

Good Luck ...
0
 

Author Closing Comment

by:oseibonsu
ID: 33738681
Question Answered
0

Featured Post

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

622 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