Back to parent report via drillthrough event
Can someone tell me what im missing. I have one parameter setup to jump to the next report which works fine. The issue is when I hit the button call "back to parent report" on the report viewer itself, I get a error saying some missing parameters or cridentals are missing, How is that so? Below I have my reportdatasource name and reportdatasource value. Is this a bug, or im doing something wrong, can someone assist me. thanks in advance.
case "Example.rdlc":
DateTime DateTime = Convert.ToDateTime(report.OriginalParametersToDrillthrough[0].Values[0].ToString());
genericDataSet.EnforceConstraints = false;
this.report.ReportEmbeddedResource = report.ReportEmbeddedResource;
this.rDataSource.Name = "Datatable";
this.rDataSource.Value = this.BindingSource.Filter = "TimeStamp = #" + DateTime + "#";
this.rDataSource.Value = this.BindingSource;
this.titleParameter = new ReportParameter("Title", this.BookTitle);
this.report.SetParameters(new ReportParameter[] { titleParameter });
this.report.DataSources.Add(rDataSource);
this.report.Refresh();
break;
David SmithPosted Nov 11, 2010, 12:23 PM
I substituted this FIX BELOW: for the BUG: , which i dont completely understand if im only setting the name and value. Which is the same thing. But ok
BUG:
case "Example.rdlc":
DateTime DateTime = Convert.ToDateTime(report.OriginalParametersToDrillthrough[0].Values[0].ToString());
genericDataSet.EnforceConstraints = false;
this.report.ReportEmbeddedResource = report.ReportEmbeddedResource;
this.rDataSource.Name = "Datatable"; This was the problem for some odd reason, i think its a bug in drillthrough event
this.rDataSource.Value = this.BindingSource.Filter = "TimeStamp = #" + DateTime + "#"; This was the problem for some odd reason, i think its a bug in drillthrough event
this.rDataSource.Value = this.BindingSource; This was the problem for some odd reason, i think its a bug in drillthrough event
this.titleParameter = new ReportParameter("Title", this.BookTitle);
this.report.SetParameters(new ReportParameter[] { titleParameter });
this.report.DataSources.Add(rDataSource);
this.report.Refresh();
break;
FIX BELOW:
case "Example.rdlc":
DateTime DateTime = Convert.ToDateTime(report.OriginalParametersToDrillthrough[0].Values[0].ToString());
genericDataSet.EnforceConstraints = false;
this.report.ReportEmbeddedResource = report.ReportEmbeddedResource;
this.reportDataSource = new ReportDataSource("Datatable", this.BindingSource.Filter = "TimeStamp = #" + DateTimeByOp + "#"); the lines I replaced
this.rDataSource.Value = this.BindingSource;
this.titleParameter = new ReportParameter("Title", this.BookTitle);
this.report.SetParameters(new ReportParameter[] { titleParameter });
this.report.DataSources.Add(rDataSource);
this.report.Refresh();
break;