Hi, we use the wcf service to render reports to pdf for emailing within our application, as well as the silverlight report viewer for viewing them on screen. If an image within a report is invalid somehow (we occasionally have zero byte image files generated by another part of our application), then within the silverlight app report viewer it shows in the picture box as being invalid.
However, when using the wcf service the error gets propogated all the way back into the results of the render operation, in the Errors array, and in the HasErrors boolean. I check the HasErrors boolean, and the content of the Errors array to report rendering failures, and do not email the resulting rendered document if any errors exist.
This isn't really an error from the point of view of not emailing the report as far as we are concerned. Is there any way to reliably discriminate between fatal errors (whatever they might be), and other minor errors like this? If the report has rendered at all we would still want to email it, although we could still report on minor errors in our logging. Could I check on the DocumentBytes property and see if that's non-null and has a size of greater than zero?
Alternateively is there some way to get the picturebox to completely suppress the error and not throw its own exception under this particular circumstance?
Thanks,
Colin.
However, when using the wcf service the error gets propogated all the way back into the results of the render operation, in the Errors array, and in the HasErrors boolean. I check the HasErrors boolean, and the content of the Errors array to report rendering failures, and do not email the resulting rendered document if any errors exist.
This isn't really an error from the point of view of not emailing the report as far as we are concerned. Is there any way to reliably discriminate between fatal errors (whatever they might be), and other minor errors like this? If the report has rendered at all we would still want to email it, although we could still report on minor errors in our logging. Could I check on the DocumentBytes property and see if that's non-null and has a size of greater than zero?
Alternateively is there some way to get the picturebox to completely suppress the error and not throw its own exception under this particular circumstance?
Thanks,
Colin.