I posted yesterday about some travails I was having with RDLC and the behavior of drill through reports. The basics of that was that the system was requiring a second full postback on to process any events generated by a drill through report.
Well, after a bit of sleep, I succeeded in bypassing that whole issue.
To get the necessary behavior, I worked in two steps. The first was in the DRILLTHROUGH event handler, and the second was in the PRERENDER event handler.
So, first things first. Previously, in the DRILLTHROUGH event handler I was getting my data and my parameters, and setting them to the DRILLTHROUGH report. Much the way that every document out there states you're supposed to do. To that, I say BAH!!
My solution required me to not assign the new datasets and parameters to my drillthrough report, but rather to the local report assigned to my ReportViewer class (i.e. the PARENT report).
But, this would make the drill through report devoid of data you claim? Well, that's the whole bit about the PRERENDER class. In there, I check the ReportViewer's LocalReport instance to determine if we're in a DRILLTHROUGH situation, and if so, then I call the PERFORMBACK function of the ReportViewer class.
Which basically pushes us back to the parent report (i.e. the one that I assigned the new datasets to).
Insert an appropriate level of diabolical laughter here, and then we're all sorts of good to go. Now, onto my next problem.