Solved

changing a ssrs subreport name dynamically

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Insert from Stored Procedure where some field/s > 0 7 34
SSRS Problems 9 26
SQL JOIN 6 37
How toselect unique values 3 9
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

759 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

20 Experts available now in Live!

Get 1:1 Help Now