问题
In our project, report generation can take a very long time. Is there a way to obtain number of generated pages while the document is processed?
Simple progress bar is not enough, we need to show users that something is really happening.
回答1:
XDocReport doesn't provide a kind of progress monitor. I think this idea could be interesting, please create an issue for that.
It should be interesting too to know where report generation can take a very long time. The report process is :
generate docx (or odt) from a docx (or odt) template. Is this step takes time? If it takes time, I think you don't use XDocReport cache (retrieve the report from the registry instead of loading very time the docx/odt template)
convert the generated docx to PDF. I think this step can takes time. For that, I'm afraid that you cannot improve performance.
The progress monitor could track step 1 and 2:
- for step 1 you cannot know the page because docx doesn't contain information about page.
- for step 2 I think we could track PDF page if you use our POI/iText converter that we will able to modify to support progress monitor.
来源:https://stackoverflow.com/questions/25399223/how-to-get-document-generation-progress-in-xdocreport