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

Need help Error Tracking

1 Answer 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Mark asked on 19 Mar 2018, 07:33 PM

I have an application that prints images using Telerik Reporting and the Telerik.Reporting.PictureBox.  Some of these images are very old images and I am getting an error with the Telerik.Reporting.PictureBox when opening the image (a generic error occurred in GDI+).  Funny thing, is these images (all tiff images) display in the default Windows Form PictureBox control on a form.  With that said, what I would like to do, is to run the report and see a list of images that have an issue in the Telerik.Reporting.PictureBox.  The data source only has two fields, the image data and the PrimaryKey to the image.  I have tried using the reports "ERROR" event, which works in getting the error from the Telerik.Reporting.PictureBox, however, I don't know how to find out what record pointer the report is looking at so I can get the correct Primary Key value.  Can anyone help me with this.

 

TIA

Mark

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 22 Mar 2018, 02:15 PM
Hello Mark,

From the Error event you cannot access the record pointer or another data field (PrimaryKey) value.

I would suggest a workaround to get the list of PrimaryKeys for which the corresponding images throw exception into a Log file.

You can use a TextBox to display the PrimaryKey, and a PictureBox to display the image.
The Value of the PrimaryKey could be set as an User Function that gets as an argument the PrimaryKey value and returns it back. Its purpose is to Log the PrimaryKey value into a dedicated Log file.
When the Report Error event is raised, you can log a text indicating the fail into the same Log file. This way after each PrimaryKey with failed image there would be a text indicating the fail.

I have attached a sample project demonstrating the approach.

Note that Telerik.Reporting.PictureBox uses GDI+ to display an image, but is not related to the Windows Form PictureBox control.

We would like to investigate image(s) failing to render in Telerik.Reporting.PictureBox.
We would appreciate it if you sent us one or more of them. If you wish, you can open a support ticket and attach it/them. It would be necessary to compress the file(s), since our ticketing system does not allow .tiff file attachments.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Answers by
Todor
Telerik team
Share this question
or