Hello Support,
We are using Document.Report (infragisitcs version 14.1) object to create a report and export it in the PDF format. The report is generated correctly for the first time, however, on the consecutive attempts the values in the report is not updated. In the every next attempt the report generated for the first time is displayed.
We have tried deleting the .pdf file before recreating it and also have disposed the object of the Report and Section object. We observed that the same problem occurs with the sample projects available with the installer. Can you please let us know if there is any way to get the updated report on every attempt of its creation?
The symptoms you describe here indicate some kind of file permissions issue, and not something that the document engine could be responsible for. I attached a sample that demonstrates things working correctly, at least in this simple scenario, so maybe you can modify this to reproduce the problem you're seeing, and we'll take another look.
If you run the sample, select a color from the dropdown, and click the button, it will generate a PDF document with a rectangle drawn in that color. If you run the sample again, select a different color, you will see that the file is overwritten as expected with the new content.
Hi Brian,
Thank you for your quick response. We tested the sample application that you provided, with this too we were able to replicate the issue that we have mentioned above. We ensured that the folder in which the file is created has proper permission; we also tried we also tried running the application with the Administration privileges (“Run as Administrator”). In this scenario as well the issue re-occurred.
We have attached herewith the video file showing the issue that occurs. If you see in spite of changing the colors from the dropdown, the rectangle is created with the same color with which the PDF was created initially. Further, when we tried creating the PDF with the new name, it first opened the earlier PDF and then opened the new one. It seems that it retains the document in the memory and every time refers the same one. Can you please review the video and let us know what could be the issue.
Unfortunately videos don't really help in scenarios like this because I can't see things like exactly what path it is going to, whether the file at that location actually got deleted, whether the PDF reader is being closed before the new document is being opened, etc.
Personally I would start with stuff like this:
1. After the line of code that deletes the existing file, check the file at that path to make sure it has actually been deleted.
2. Make sure you close the PDF reader before writing the new content.
3. Check the file permissions on the path to which you are writing.
Hi,
What version of the controls are you using in this video?