Oct 20, 2009 02:55 PM|N_EvilScott|LINK
Not sure what I am missing, but its probably something stupid and simple, like it usually is! :)
I have a page with a ReportViewer control that I am setting dynamically based on the type of report the user has requested. Here is my source code in question:
if (reportType == "Detailed")
Reports_Orders_By_Surgery_Center_Detailed Orders = new Reports_Orders_By_Surgery_Center_Detailed();
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = "Main/Admin/Reports/Templates/OrdersBySurgeryCenterDetailed.rdlc";
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Reports_Orders_By_Surgery_Center_Detailed_Data", Orders.GetData(companyID, startDate, endDate)));
ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(OrdersBySurgeryCenterDetailed_SubreportProcessing);
ReportViewer1.Drillthrough += new DrillthroughEventHandler(OrdersBySurgeryCenterDetailed_Drillthrough);
ReportViewer1.LocalReport.EnableHyperlinks = true;
bool temp = ReportViewer1.LocalReport.IsDrillthroughReport;
protected void OrdersBySurgeryCenterDetailed_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
Reports_Orders_Items_By_Surgery_Center_Detailed OrderItems = new Reports_Orders_Items_By_Surgery_Center_Detailed();
int OrderNumbers = GetOrderNumbers();
e.DataSources.Add(new ReportDataSource("Reports_Orders_Items_By_Surgery_Center_Detailed_Data", OrderItems.GetData(OrderNumbers)));
protected void OrdersBySurgeryCenterDetailed_Drillthrough(object sender, DrillthroughEventArgs e)
// just something to check and see if the drill through event fires.
bool temp = false;
successLabel.Text = "yay!";
Problem I am having is that no matter what I do or try, the Drillthrough event never fires no matter what.
I have my parent report set up with proper text box properties that tell it to Jump To another report and pass parameters, but it just doesn't fire the event. The IsDrillThrough property is always false as well when I check it.
What am I missing?