Page Number in PrintLayout RRS feed

  • Question

  • Hello.

    I use a customized reportviewer component, to display reports. This component includes a microsoft reportviewer component in it along with our toolbars.

    I want to display reports only in Print Layout. No normal mode allowed. I used SetDisplayMode(DisplayMode.PrintLayout) instead of RefreshReport() in order to get that effect. It works. But there are two drawbacks.

    1. The getTotalPages( ) method gets only number of logical pages, which mean nothing in PrintLayout.

    2. It takes  5 - 10 times longer time between RenderingBegin and RenderingComplete when comparing display layouts. For example: A report takes 5 seconds to be completely rendered in Normal mode. Same report takes 45 seconds to be displayed in PrintLayout.

    I found the printing example in to be a working solution. But rendering the report without displaying in order to get number of streams (pages) takes 20 seconds additional time. So I don't want to use that solution.

    Now my questions are;

    1. Microsoft Reportviewer displays the first page in approximately 10 seconds. The rendering is not finished at that instant. Then it displays the number of page as (1 of 1), (1 of 2), (1 of 3) ........(1 of 59)  and counting one by one to the last page, at a total of 45 seconds. This seems to be an acceptable solution for me. Since I don't use the toolbar of the MS reportviewer, I can't display the number of pages like that. I want to know if there is an event or a code block that I can get the latest rendered page number to display like the microsoft's component did. Again, I am using a component which includes an instance of MS reportviewer.

    2. Is there a solution to get the report faster, when working only in PrintLayout ?

    Thank you all, in advance !
    Friday, September 21, 2007 12:21 PM