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

Image not display in progarmmatically exported report

3 Answers 403 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chetan Pawar
Top achievements
Rank 1
Chetan Pawar asked on 16 Jan 2010, 09:07 AM

Hi

 

I am trying to export report programmatically, after user changes the page settings for dynamically created report. Report has one column that displays images located on web server. When pdf is generated programmatically file shows error for every image in image column.
Error message:
An error has occured while processing PictureBox 'Imgquestion':Could not find a part of the path 'D:\BaseData\forms\forms\Image\00PlainImage.jpg'.

 

I.e. Its taking absolute path of image. It is necessary to me that export report programmatically according to users inputted settings.

If report get exported (ex. PDF format) using inbuilt export utility of report viewer object, then exported report file (i.e. pdf) would contains images as those displays in report viewer.

 

Please let me know how to fixed this issue.

3 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 28 Nov 2011, 03:38 PM
Any fix to this?  We're running into the same problem.  My image path's for picturebox controls are stored in a database, they render fine in the report viewer and export to pdf through the viewer without a problem.  I wanted to add the direct to pdf option for our users but when I do that, I get an error in the pdf that is created on the picturebox items saying part of the path is missing and it is pointing to an E: path that I never specified.

Any way around this??
0
Steve
Telerik team
answered on 29 Nov 2011, 01:38 PM
Hi Michael,

We could not reproduce such problem with the latest Q3 2011 release using the ListBound demo report which has a PictureBox item bound to a field that contains the path to each car's image.
Exporting both from the web viewer and programmatically (see Exporting a report to PDF programmatically) results in a correct PDF file that contains the car images.

Please review the demo report and the above code, and if you're still having problems, provide us with a sample project that exhibits the problem in a support ticket.

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Michael
Top achievements
Rank 1
answered on 29 Nov 2011, 04:22 PM
Thanks for the response.  I was able to find the issue.  I was using a relative file path in the piturebox which renders fine in the report viewer but seems to get confused if I do a direct to PDF report.  As long as I append the full network path to the file path both options work again.

For example, I was using:
Files\file.jpg 

The fix was to use: \\servername\sharepath\Files\file.jpg
 
 
Tags
General Discussions
Asked by
Chetan Pawar
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Steve
Telerik team
Share this question
or