Hi
I have a windows application. I am using following code right after setting the LocalReport ReportPath. Report rendering is too slow if use following line of code and Report viewer does not show spiny and the text that says “Report is being generated.”
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
Please advise how can make it fast and show spiny.
Thanks in advance.
As to how to make it fast, you need to either increase the horsepower of your system or optimize your SQL query.
As to the spiny thingy, I believe that setting the zoom on the report viewer changes the zoom of the report once it is rendered. From what I can tell, the spiny thingy is rendered prior to the report being rendered.
I think the report viewer is actually showing the spiny thingy, but your report viewer is too large and the spiny thingy always appears in the middle of the report viewer.
I've yet to find an answer as to how to move the spiny thingy closer to the upper left corner of the screen. If you figure it out, let me know!
|||
Thanks for your reply. I think it is not related with SQL server query or system speed. If I take out following line of code it works superfast and spiny also appears.
Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
Me.ReportViewer1.ZoomMode = ZoomMode.Percent
Me.ReportViewer1.ZoomPercent = 80
I am getting a dataset from the server and then assigning that dataset to RDL file in Windows application at client side so there is no SQL server involved.
Spiny does not appear even after taking out Zoom mode and zoom percent. I guess something is wrong with setting DisplayMode.PrintLayout.
|||Any answer?|||
Just a reality check on Mr. Spiny:
Are you executing this report asynchronously?
>L<
|||Yes.|||Then, see here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=231258&SiteID=1>L<
|||Thanks Lisa,
I am using a Report Viewer for Windows application and I guess by default AsyncRendering is True. I did not find any way to make it false to give a try. I am still not able to figure it out why "SetDisplayMode(DisplayMode.PrintLayout)" making report rendering so slow and also it is making spiny to disapear.
Appreciate you help.
|||Hi there,
Of course you're right that there is this difference between web and winform usage -- and I often forget which we're talking about <sigh>. I apologize.
Did you try using the ShowProgress property to get Mr. Spiny?
You probably haven't touched it at all. And I don't think that setting display mode to false would automatically set ShowProgress False, but it *might* have that effect -- test its value, just in case, after you use the SetDisplayMode method.
Can you verify a couple of things about this report -- what is the interactive page size versus the standard page size? If the two are different, this might explain why you don't see the progress feedback in one case but you do in the other (if the page sizes are significantly different, I mean).
Alternatively, if you have been omitting the zoom-setting lines after the SetDisplayMode line when you don't set display mode, then Greg's explanation completely maks sense: the original zoom value shows enough of the page to show the progress feedback, while your chosen zoom value here does not.
>L<
No comments:
Post a Comment