Modify report logo image in code behind

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.
mdunlap99Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jgvCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mdunlap99Author Commented:
Thanks for the tip.  This makes perfect sense now.  I will give it a go.
0
mdunlap99Author Commented:
Worked like a champ.  Many thanks!!!
0
mdunlap99Author Commented:
Good work indeed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.