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,
Thank you for your post. I have been looking into your post, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Hi stefan, i have uploaded a sample project which depicts the scenario of my application. whenever i genrate preview for bulk data as given in this sample , my application gets hanged ,UI becomes unresponsive and xamreportpreviwer takes atleast 2 to 3 minutes to render the grid's data .Further more , in many cases ,the columns of xamdatagrid are also clipped , as shown in the attached image
pleaase answer my both queries
Looking forward to your and thanks alot in advance