Hi,
i am using XamReportPreview to preview the XamDataGrid the total page i am previewing is 32, it take almost 15 - 30 second to generate the preview (and my UI become unresponsive while generating preview but i don't want my UI un responsive ).
Following are the steps that we following to Generate the Preview:
Report reportObj = new Report();
EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(xamDataGridObject);
reportObj.Sections.Add(section);
previewer.GeneratePreview(reportObj, false, true); ==> This line take too much time to execute.
Window window = new Window();
window.ShowDialog();
Looking forward for fruitful suggestion
Thanks & Regards,
Kashif Mujeeb
Hello Kashif,
The Print preview process is a CPU and time consuming operation and it takes some time before it generates the preview, but when it is moved on a separate thread taht the UI's, the UI seems not to hang on my side, but it still takes time before the preview is generated.
Still UI hang when previewing heavy data, work around not completely worked for me.
Thanks,
Kashif
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I have modified your sample, so now the UI doesn’t hang. Basically I used another thread for generating the PrintPreview. The generating process will still take 15-30 seconds, because this is a time and CPU consuming operation, but the UI doesn’t freeze. Pelase let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Stefan,
Have a look at the attached project.