all groups > sql server reporting services > april 2007 >
You're in the

sql server reporting services

group:

Programming report viewer at run time


Programming report viewer at run time ChuckT
4/20/2007 3:58:02 AM
sql server reporting services:
I have a report that works. It has been added to a webform (dot net 2.0)
that works. It has an image control in the upper left hand of the page
header. I would like to be able to change that graphic depending on a sql
table setting as the web form loads,

Does anyone know of a good detailed example of how to do this?

I have tried this and it does NOT work:
Dim myImage1 As New Image
myImage1 = Me.ReportViewer1.FindControl("Image1")
myImage1.ImageUrl = "Images/small_info_logo.jpg"


Thanks

Re: Programming report viewer at run time Tokes
4/20/2007 9:03:18 AM
[quoted text, click to view]

Instead of setting the ImageUrl in the web form, set it in the report
itself. You should be able to provide an Expression value for the
ImageUrl in the report builder - just point it to a dataset (possibly
using the Iif() function if the url is not stored in the database
records).

- Tokes
Re: Programming report viewer at run time ChuckT
4/20/2007 2:38:01 PM
Great idea, thank you very much. Plus it is a simplier implementation

Chuck

[quoted text, click to view]
Re: Programming report viewer at run time ChuckT
4/20/2007 6:12:00 PM
Actually that will not work. If you use any external pointer the designer
imports the garphic at design time. I am hoping to get a run time interrface
that loads the graphic based on a table value.

[quoted text, click to view]
Re: Programming report viewer at run time Tokes
4/21/2007 5:25:11 AM
[quoted text, click to view]

That shouldn't be the case if you're setting the Url to an
expression... also check that the image control is not set to
'embedded'?

- Tokes

[quoted text, click to view]

AddThis Social Bookmark Button