Hi Guys, we working on some reports, going over them again, reading what would be better.
We started creating reports using the wizard, so we had designtime support. Great, that works. But now I want to add some more flexibilitty to the code. So I added a NeedDataSource event to the report including the next code:
of course in de constructor I set: this.DataSource = null;
Nou when I set breakpoints, I can see my DS is filled. No problem but all my textboxen throw: the expression contains object 'Name' that is not defined in the current context. Where name is different for every textbox.
The structure of the DS is still the same.
It seems I cannot get the fields in the DB anymore
How is that possible.
We started creating reports using the wizard, so we had designtime support. Great, that works. But now I want to add some more flexibilitty to the code. So I added a NeedDataSource event to the report including the next code:
this.generalReportDataSetTableAdapter1.Connection.ConnectionString = ConfigurationManager.ConnectionStrings["Report.ConnectionString"].ConnectionString; |
this.generalReportDataSetTableAdapter1.FillByClientIdAndBetweenStartAndEndDate(this.generalReportDataSet.GeneralReportDataSetTable, |
Convert.ToInt32(this.ReportParameters["pClientId"].Value), Convert.ToDateTime(this.ReportParameters["pStartDate"].Value), Convert.ToDateTime(this.ReportParameters["pEndDate"].Value)); |
Processing.Report report = (Processing.Report)sender; |
Report.DataSource = this.generalReportDataSet; |
of course in de constructor I set: this.DataSource = null;
Nou when I set breakpoints, I can see my DS is filled. No problem but all my textboxen throw: the expression contains object 'Name' that is not defined in the current context. Where name is different for every textbox.
The structure of the DS is still the same.
It seems I cannot get the fields in the DB anymore
How is that possible.