locked
Reportviewer inside user control issue RRS feed

  • Question

  • User-786758971 posted

    i'm having a user control(ascx) that contains ReportViewer. I need to get total number of pages in the report (Ex. RViewer.LocalReport.GetTotalPages()). I read that, the this value is available onle after PreRender event of Reportviewer. After this event, in aspx page (that contains this ascx);Render event, I'm getting the value as 0.

    I tried adding Reportviewer directly to another aspx page. Then in Render event of that aspx page, i got the right value for Total pages.

    Why I'm not getting with prior approach?

    Tuesday, October 30, 2012 10:41 AM

Answers

  • User2105670541 posted

    because first the PreRender event executes at Page, then the User Control. so if you are not getting it at your page level event, its because its not yet fired at user control.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 31, 2012 1:32 AM