Continueing with my earlier post on the RDLC and Drill Through reports, in this article we'll be checking the second method of passing parameters through filtering of report items.
The steps till completing the design of the reports are still going to remain the same. So please refer,
http://blogs.msdn.com/selvar/archive/2010/03/03/dynamically-passing-parameter-to-drillthrough-report-in-rdlc-part-1.aspx
We'll be doing the code change only in the DrillThrough event handler code. Look at the below lines of code.
protected
{
ds.EnforceConstraints =
adap.Fill(ds,
}
report.DataSources.Add(
Finally, run the project, You'll see MainReport rendering in the ReportViewer control.
Click on any of the EmployeeID and you'll see the JumpFilterReport displayed for the selected EmployeeID.
If you carefully look at the difference between what we saw in the Part - 1 and now is, the QUERY that is executed in this sample is an unfiltered one. The filtering is done at the report level. If you're a person who is worried about the performance, then my recommendation would be to follow Part - 1.
That pretty much concludes our sample. I’ve uploaded the sample please change the connections string values in the web.config and in the Default.aspx.cs files and try executing the report. Happy programming!!.
HTH!
Selva.
[All the Posts are AS-IS with no warranties]