Unplanned
Last Updated: 12 Dec 2019 14:13 by Adam
Ruud
Created on: 08 Mar 2017 17:29
Type: Feature Request
5
Show a picturebox of which the url is unavailable as a red cross instead of destoying the complete report layout.
The problem is not getting the error via Dot Net programming, but the complete layout destruction of the report as a result of the fact that a picture (in our case a thumbnail of a provider) is unavailable. Catching the report error is not an option. It is too complicated and even if we succeed  in obtaining the error, it will be very complicated to remove the unavailable url on the fly and re-render the report again. 

This seems to be a "known issue" for about 8 years!

My question: Is it possible to keep the remaining report "intact" if such an error occurs? This shouldn't be too difficult for the development team..
5 comments
Adam
Posted on: 12 Dec 2019 14:13

For the record and future seekers, I found a better workaround, at least for my purposes.  In the [report name].cs, I added this:

private void onError(object sender, ErrorEventArgs eventArgs)

{
// Don't display exceptions in the picture box...just show an empty space.
if (sender is Telerik.Reporting.Processing.PictureBox sPb)
sPb.Exception = null;

}

 

This can be tweaked as one sees fit.

ADMIN
Todor
Posted on: 12 Dec 2019 12:29

Hello Adam,

The feature request is part of our 'to do' work items. We haven't had time to implement the functionality yet. Unfortunately, we cannot provide a time frame for fulfilling the requirement. It is not in our immediate plans as we have higher-priority features for implementation.

You may use the workaround suggested in this thread.

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
Adam
Posted on: 05 Dec 2019 03:16

Is there any progress on this?

 

ADMIN
Milen
Posted on: 06 Dec 2017 15:47
Hi, we can add built-in support to suppress the error. Meantime please mind the workaround from the previous comment. Thank you for your input.
ADMIN
Peter
Posted on: 04 May 2017 09:17
Our recommendation is to create a User Functions to download/resolve the image data for the engine. Thus you can return a default image if the image is not available:

        public static Bitmap GetImage(string imageLocation)
        {
               var bytes = ResolveImage(imageLocation);
               return (Bitmap)((new ImageConverter()).ConvertFrom(bytes));
        }
and set the Value of the PictureBox item to the correct expression: =LoadImage("http://my-image").