After spending some time searching the forums for other people with these same issues, I've come up empty handed and decided it was time to make a post. I'm using the VS2005 WebForms ReportViewer object to embed remote (i.e. not using rdlc) reports on an asp.net page. When the page is first rendered, I have code to set the ServerReport.ReportPath property to the location of a parent-level report on my report server. Each record in this report has a drillthrough link to another server report, and each record in this detail-level report has ANOTHER drillthrough link to a third report that is an even more detailed view of the data. So in short, I have a set of drillthrough reports that can go three levels deep and the top-level report is rendered by default when the page is first viewed.
The behavior that I would expect is that when I click on the drillthrough links in the first or second report, the ReportViewer would incur a postback and automatically do the plumbing to render the appropriate drillthrough report with the proper parameters passed in by the parent report. I would also expect the "back" button in the ReportViewer toolbar to correctly navigate back up the tree to the top-level parent report without any additional programming.
The behavior that I'm ACTUALLY seeing is that the drillthrough works fine from TopLevelReport to MidLevelReport works fine, but when I click to drillthrough from MidLevelReport to BottomLevelReport, the ReportViewer re-renders MidLevelReport with different parameters, as if I had gone back to TopLevelReport and clicked on a different record. However, if at this point I click on a drillthrough link in the new rendering of MidLevelReport, it correctly navigates to BottomLevelReport.
Also, the back button functionality is unpredictable; sometimes I receive this exception when clicking the back button from MidLevelReport:
System.InvalidOperationException: Back call without drillthrough report at Microsoft.Reporting.WebForms.ReportViewer.Toolbar_Back(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.ToolbarControl.OnBack(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.BackGroup.BackButton_Click(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.ScriptSwitchImage.EnabledImage_Click(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.HoverImage.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
When clicking the back button on BottomLevelReport, instead of throwing the above exception it correctly navigates back to MidLevelReport, but then the back button is disabled and I can't go back up to TopLevelReport.
I've experimented with hooking into the ReportViewer.DrillThrough and ReportViewer.Back events to see if maybe I'm just expecting the ReportViewer to handle some under-the-hood plumbing that I'm supposed to code myself, such as updating the value of ServerReport.ReportPath or calling ServerReport.Refresh. I won't go into lengthy details of all the combinations of coding I've tried, but all of them introduced some sort of incorrect navigation behavior or outright exceptions. What I really need is for somebody experienced with using ReportViewer to display remote drillthrough reports more than two levels deep to tell me exactly what I need to do in my DrillThrough and/or Back event handlers in order to make the ReportViewer behave in the expected way.
Thanks in advance to anybody who replies; I've been stuck on this problem for a couple of days now and I'm starting to consider abandoning the idea of using ReportViewer for this project.
vigg:
After spending some time searching the forums for other people with these same issues, I've come up empty handed and decided it was time to make a post. I'm using the VS2005 WebForms ReportViewer object to embed remote (i.e. not using rdlc) reports on an asp.net page. When the page is first rendered, I have code to set the ServerReport.ReportPath property to the location of a parent-level report on my report server. Each record in this report has a drillthrough link to another server report, and each record in this detail-level report has ANOTHER drillthrough link to a third report that is an even more detailed view of the data. So in short, I have a set of drillthrough reports that can go three levels deep and the top-level report is rendered by default when the page is first viewed.
The behavior that I would expect is that when I click on the drillthrough links in the first or second report, the ReportViewer would incur a postback and automatically do the plumbing to render the appropriate drillthrough report with the proper parameters passed in by the parent report. I would also expect the "back" button in the ReportViewer toolbar to correctly navigate back up the tree to the top-level parent report without any additional programming.
The behavior that I'm ACTUALLY seeing is that the drillthrough works fine from TopLevelReport to MidLevelReport works fine, but when I click to drillthrough from MidLevelReport to BottomLevelReport, the ReportViewer re-renders MidLevelReport with different parameters, as if I had gone back to TopLevelReport and clicked on a different record. However, if at this point I click on a drillthrough link in the new rendering of MidLevelReport, it correctly navigates to BottomLevelReport.
Also, the back button functionality is unpredictable; sometimes I receive this exception when clicking the back button from MidLevelReport:
System.InvalidOperationException: Back call without drillthrough report at Microsoft.Reporting.WebForms.ReportViewer.Toolbar_Back(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.ToolbarControl.OnBack(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.BackGroup.BackButton_Click(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.ScriptSwitchImage.EnabledImage_Click(Object sender, EventArgs e) at Microsoft.Reporting.WebForms.HoverImage.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
When clicking the back button on BottomLevelReport, instead of throwing the above exception it correctly navigates back to MidLevelReport, but then the back button is disabled and I can't go back up to TopLevelReport.
I've experimented with hooking into the ReportViewer.DrillThrough and ReportViewer.Back events to see if maybe I'm just expecting the ReportViewer to handle some under-the-hood plumbing that I'm supposed to code myself, such as updating the value of ServerReport.ReportPath or calling ServerReport.Refresh. I won't go into lengthy details of all the combinations of coding I've tried, but all of them introduced some sort of incorrect navigation behavior or outright exceptions. What I really need is for somebody experienced with using ReportViewer to display remote drillthrough reports more than two levels deep to tell me exactly what I need to do in my DrillThrough and/or Back event handlers in order to make the ReportViewer behave in the expected way.
Thanks in advance to anybody who replies; I've been stuck on this problem for a couple of days now and I'm starting to consider abandoning the idea of using ReportViewer for this project.
I am facing the exact same issues and am in the same boat. Depending on whether these multilevel drillthrough server reports work properly, I might abandon or use the Reportviewer for this project. its very crucial.
I am also having another issue. In my "mid level drill through report", the Dundas chart that i am using isnt showing either. It shows when its not a drillthrough but the top level report. But not in the drillthrough mode. HELP PLEASE !!
|||
I try this before and it works perfectly but i don't get your problem exactly so i advice you to check the examples in this link
http://www.gotreportviewer.com/
Same issue here, with a variation...
I've got a report that takes a parameter, and another similar report without a parameter. Both have drillthroughs to detail reports. On the report without the parameter, the drillthrough works just fine. On the report *with* the parameter, clicking on the drillthrough link simply reloads the page. It does a postback, the event targets appear to be set, but the drillthrough event does not get fired. I discovered that the very fact that I am setting the parameters (eg, ReportViewer1.ServerReport.SetParameters(_params)) is causing the drillthrough event to not fire--I set the parameters on one of the non-parameterized reports to an empty list of parameters, and behold, the drillthrough event is no longer fired.
Is this a bug with the report viewer, or is there another way to set parameters that doesn't break the drillthrough event? I've tried setting the callback both before and after the parameters are set, so I'm really out of ideas.
No comments:
Post a Comment