not able to Retreive picture from report

2 posts, 0 answers
  1. sami
    sami avatar
    13 posts
    Member since:
    Aug 2007

    Posted 23 Aug 2007 Link to this post


    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.

  2. Rossen Hristov
    Rossen Hristov avatar
    2477 posts

    Posted 23 Aug 2007 Link to this post

    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,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top