Hello,
I am currently developing an ASP.NET MVC4 application and I am using Infragistics Report Viewer v13.1 for generating reports. I've done everything suggested in posts Configuring Reporting to Work with MVC, Configuring Reporting Under IIS and How to Change the Data Sources at Runtime Using IReportDataSourceProvider. I am using server-side rendering.
For the report I need to set an image of a map as a background and small table representing the legend of the map. The Image property is binded to a byte array containing the actual image bytes and the array is obtained from a data base.
The first time I try to export the report everything works fine - the image is rendered and the table's fields are filled. The problem comes when I try to export the report again (without refreshing the page) - then the table's fields are filled but the background image is not rendered. The problem occurs in all browsers (IE, Chrome, Firefox) and regardless the type of file (pdf, xps, excel).
After few days of searching and debugging I've found out that something is happening between events "exportStarted" and "exportCompleted" that is making the image to disapear (but I can't be 100% sure about that).
So I'm asking for your opinion on how this can be solved. Please let me know if you have any suggestions.
Sincerely,
Denis Angelov
Hello Denis,
Thank you for contacting Infragistics!
I may need more information. Please let me know if there are any errors that occurred. In addition, if possible, please attach a copy of the cs/vb file.
If you have any questions, please let me know as well.
There are no errors or exceptions, just blank background image after the first time I export the report.
Here are the files that follow the logic I've implemented.
Let me know if you need any additional information.
Sincerely,Denis
Thank you for the files.
Although they are helpful, I may need more information from you. If possible please attach a copy of the igr file together with your reply.
Hello Vivian,
Here are the 4 igr files that I use for the different paper sizes used for printing.
Thank you for the information.
Please let me know the version you are using as well.
It seems that my code is quite similar.
As I said in my first post, I think that the image somehow disappears somewhere between the first export and the second export but I can't debug the part between the exports in order to examine the problem. I was wondering whether there is somekind of a timeout for keeping the image present or maybe some cache that is being cleared or something that is erasing the data source.
If possible, please investigate what can be causing the abscence of the image (byte array) the second time the report is being exported.
Thank you in advance.
Sincerely,Denis Angelov
Please let me know if the byte array is defined similarly as the following forum thread:
http://es.infragistics.com/community/forums/t/56541.aspx
ImageData, as well as the other parameters used for filling the table at the bottom of the page, is part of class Map (in a previous reply of our correspondence I have sent you a file called Report Viewer - Export.rar where there is an image with name igr.png where you can clearly see this). So byte[] ImageData is a property of class Map and the byte array is obtained from a data base.
Please let me know if the ImageData part of the parameters as well.
Version=13.1.20131.1007