Hi,m using report object to generating print preview for xamdatagrid , however if the grid contains data in bulk,preview generation gets very slow and takes quite a long time.is there any solution or work aorund to make its performance better?
i am not using physically existed report item for rendering, rather m creating report object from code and utilizing it . this is my coode snippet
Report reportObj = new Report(); reportObj.PageHeader = "PageHeader"; reportObj.ReportSettings.Margin = new Thickness(50, 50, 50, 50);
EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(xamdatagrid); reportObj.Sections.Add(section); XamReportPreview previewer = new XamReportPreview(); try { previewer.GeneratePreview(reportObj, false, true);
Window window = new Window(); window.Title = WindowTitle; window.Content = previewer; window.ShowDialog(); } catch (Exception ex) { // LogHelper.WriteLog(ex.ToString()); }
My reqiurement is to render complete grid at stretch to the preview so that user can determine the number of pages and record count for printing from it.but my application gets hanged when the data size increases and takes quite along time to response and render preview which seems as application contain some bug or unreacheable code,which is not the case
looking forward to your reply,thanks in advance
Hello Sam,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Hi,
I am facing the same issue, actually this line take more time to execute.(I am preview almost data of 32 pages)
previewer.GeneratePreview(reportObj, false, true);
Would appreciate if you test this as in above mention scenario (more than 32 pages )
Thanks & Regards,
Kashif Mujeeb