Declined
Last Updated: 10 Dec 2021 07:38 by ADMIN
M Patrick
Created on: 15 Apr 2021 07:23
Type: Bug Report
1
Images are missing in the PDF file when the report was exported from VBA
When you export a report from VBA, the image is missing in the PDF file. It is important that the problem is reproducible only on machines that Telerik Reporting has never been installed. With the same code, when exporting from VS, the report is correctly exported. The attached PDF files represent the outcome from both exports.
Attached Files:
1 comment
ADMIN
Neli
Posted on: 10 Dec 2021 07:38

Hello,

If you experience such a problem, we recommend using the Fuslogvw to investigate the issue. Steps on how to use it are given in the Assembly Used in ObjectDataSource is Not Loaded by the Standalone Report Designer KB article.

The generated log will contain the assembly binding failures. In it, check if Telerik.Reporting.dll is not missing in a specific folder. Then copy the DLL to that folder.

The problem is related to the assembly resolution by the .NET runtime. When the report is processed, its images are serialized in a special data structure that serves as a cache. Its idea is to ensure the image can be actually created and to preserve only the unique images - this allows us to keep a single image instance in memory and display it on every page in a multipage report. When such an image needs to be rendered in the output document (PDF in your case), it is deserialized from that structure and a lightweight instance that contains only the raw bytes of the image is created.

This lightweight class is declared in Telerik.Reporting.Processing namespace, which is contained in the Telerik.Reporting assembly. For the serialization, we use the BinaryFormatter class which is contained in mscorlib.dll. When trying to deserialize that class, the BinaryFormatter fails to locate the Telerik.Reporting assembly (maybe because the mscorlib is located in the GAC and the runtime doesn't know where to load the assemblies from) so it throws an exception.

Regards,
Neli
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.