Posted 23 August 2021, 11:27 am EST
Hello,
we have the Active Reports 14 and have a probelm when inserting an image at runtime into a .rpx, which is then exported as a PDF.
We are using Visual Studio (C#) and have the .rpx as an embedded resource. First we load the resource as a byte array into a MemoryStream and then as XmlTextReader into the SectionReport.LoadLayout(…). After that we set the image as follows:
((Picture)this.Sections["QRDetail"].Controls["QRCODE"]).Image = QRCodeImage;
Then we set the SectionReport.DataSource and start the report with SectionReport.Run().
When the PDF is exported, the image is empty.
We have also tried to save the .rpx to disk with SectionReport.SaveLayout(c:.…) after setting the image and load it again with LoadLayout(c:.…) and then export it as PDF. Again you get an empty image in the PDF. But what we noticed that the saved .rpx contains the image.