Hi,
I am trying to export a grid into PDF format having huge data. In my scenario grid contain almost half million records. When trying to export my grid, application got halt. If i try to export the same grid with less records i.e. few hundreds than it is working fine.
heuristic130 said: Hi, I am trying to export a grid into PDF format having huge data. In my scenario grid contain almost half million records. When trying to export my grid, application got halt. If i try to export the same grid with less records i.e. few hundreds than it is working fine.
What kind of project are you working on that requires such a huge export?
Here's some estimated calculations on an export that huge:
Total pages in exported PDF: 10420+
Total export time: 33+ minutes (given you had a monster machine to take the abuse)
Memory Usage Required: 5GB+
Virtual Memory Required: 11GB+
I am working on a Stock Exchange Trading system. Within a single day huge number of orders can be placed in market. I am working with reports, showing all the orders of single day in a Grid. Plus we are providing the facility to export the data into PDF format so that they can traverse the e-file(PDF file) among the members, surveillance or any body else.
Well i have observe that PDF do get generated, but it really took a lot of time. I just want to know is there any way around that user have not to wait for that much long. If i start Asynchronous thread, will it do the work for me?
It would be pretty tricky to avoid cross-threading issues since you are dealing with bound data here.
The only safe way to do this would be to copy your entire datasource onto the other thread and properly marshal the data to that thread. Then you would have to create a WinGrid and a WinGridDocumentExporter, all on the other thread, and then export the new WinGrid. That way everything takes place on the other thread and there is no interaction with the UI thread other than copying the data. And, of course, your application will freeze while you are marshalling the data to the other thread.