This is a migrated thread and some comments may be shown as answers.

not able to Retreive picture from report

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sami
Top achievements
Rank 1
sami asked on 23 Aug 2007, 03:28 PM
 

myReport.mypic.Value = "C:\\temp\\picture.jpeg";

myReport is the report and mypic is the picturebox.

i have created a picture box on the report and
on the calling aspx file i give like this.
but the report is not opening that picture.
is there any thing else i have to do.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 23 Aug 2007, 05:20 PM
Hello sami,

If the PictureBox Value property is a string, then this PictureBox is bound to a column from the data source and the value should be a data binding expression, such as "=ProductPhoto", and not a file name.

The other object that the Value property accepts is a System.Drawing.Image, so you will either have to create a Bitmap object manually from your file and assign it:

myReport.mypic.Value = Bitmap.FromFile("C:\\temp\\picture.jpeg");

Or use the report designer and click on the Value property then choose a file form the file system. This will embed the image in the report's .resx file and bind it to the PictureBox Value property automatically in the InitializeComponent method.

We hope this helps.
 

Best wishes,
Rossen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
sami
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or