Solved

changing a ssrs subreport name dynamically

Posted on 2010-09-22
4
3,874 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
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

777 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