@sagarbele, sorry for the trouble. Can you share a little more detail to help us reproduce the problem?
The existing “readStringFromFile” method will first try to de-compress the file if it’s extension ends with “.gz”. Is it possible that your report has a “.gz” extension but isn’t actually compressed? If so it could be that the issue is in the writing of the report output correctly, rather than in the reading of the output file for viewing.
Can you share the saved report that is failing to open (you can find this in your REPORT_RESULTS folder) or can you share a failing unit test that demonstrates the problem?
Note: this works only if the file is text (and your method too). For compressed ones (binary) it won’t work.
Actually it’s an uncompressed XML file without encoding (this could be a problem in some languages). If parsing is required there’s no need to store it in a String, XML parsers do just fine with input streams.
@sagarbele, this does seem to be a bug. From what I can gather, this is limited to where the report is rendered to the default “Web” renderer, rather than to any non-web renderer. If you were going to go into your REPORT_DATA folder and rename all of your *.reportdata.gz to *.reportdata, my guess is that things will work. We can raise a ticket for this and apply a fix for the next version of reporting. If you need this backported to a version that is compatible with you, then it may be that you need to fork and create a point release for yourself that contains the necessary fix.