[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Modify report logo image in code behind

Posted on 2008-11-10
4
Medium Priority
?
307 Views
Last Modified: 2012-08-14
I have a generic .RDL report file that will be used by serval different companies.  I want to programmatically modify the the embedded logo image filename in the rdl and pass the new dynamically created file to the report viewer.  I have tried reading the rdl into an xml document and modifying the image name, but there seems to be no way of passing the xml file to the viewer.  Any ideas?

Thanks.
0
Comment
Question by:mdunlap99
  • 3
4 Comments
 
LVL 12

Accepted Solution

by:
jgv earned 2000 total points
ID: 22932680
You can use a hidden parameter to pass in the image to use. This will vary depending on how you have the images setup but I'm assuming that the logo's are embedded since you mention this in your question.

Create a new report parameter called Logo that is a datatype String and Hidden.
Select the image object on the report.
Drop down the list of choices for the Value property. These are the names of the available embedded images.
Open the expression window for the Value property and set it to use the parameter you just created ( =Parameters!Logo.Value)
When the report is run, pass the name of the image file you want to use as the parameter value.

You can test this by leaving the image parameter visible and typing in the logo name.
0
 

Author Comment

by:mdunlap99
ID: 22939599
Thanks for the tip.  This makes perfect sense now.  I will give it a go.
0
 

Author Comment

by:mdunlap99
ID: 22943547
Worked like a champ.  Many thanks!!!
0
 

Author Closing Comment

by:mdunlap99
ID: 31515087
Good work indeed.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

872 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