| <img alt="Image" src="cid:uf32gweyf5y" style="width:100%; height:100%" /></div> |
| <img alt="Image" src="/Telerik.ReportViewer.axd?culture=en-NZ&uiculture=en-US&instanceid=3d09e5a8d49d412c9e85073ece538511&&optype=ReportImage&StreamID=m4b13jtidmk" style="width:100%; height:100%" /> |

This is the fill error i was getting after i added a parameter to one of the tables in the report.
In my report.xsd, I found the Fill method in the xsd's Designer.cs.
this is what I did. I found the method holding the two parameters. It included the datatable as a parm and the MemberParm which is the name I gave the new parameter in this report.
I copied this method .......
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] |
| [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] |
| public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable, int MemberParm) { |
| thisthis.Adapter.SelectCommand = this.CommandCollection[0]; |
| this.Adapter.SelectCommand.Parameters[0].Value = ((int)(MemberParm)); |
| if ((this.ClearBeforeFill == true)) { |
| dataTable.Clear(); |
| } |
| int returnValue = this.Adapter.Fill(dataTable); |
| return returnValue; |
| } |
To here. Then, I just commented out the signiture line and replaced it with a line that only included the datatable parm, now. Of course I had to comment out the two lines pertaining to the MemberParm as well, now I had a fill method with one parm .......
(the lines I commented out start with // iqworks)
| // iqworks |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] |
| [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] |
| //iqworks public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable, int MemberParm) |
| public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable) |
| { |
| //iqworks thisthis.Adapter.SelectCommand = this.CommandCollection[0]; |
| // iqworks this.Adapter.SelectCommand.Parameters[0].Value = ((int)(MemberParm)); |
| if ((this.ClearBeforeFill == true)) |
| { |
| dataTable.Clear(); |
| } |
| int returnValue = this.Adapter.Fill(dataTable); |
| return returnValue; |
| } |
| // end of iqworks |
I placed the cursor over the class lib name, right clicked and hit Build, the build was successful this time.
I saw posts that lead me to documentation that told me "I needed to add a method" but it never told me "where to go to add the method" ?
Anyway, is there anything else I need to do ?
Seems like this should automatically be done just like it automatically adds or changes the original one method with the new parameter ? Not sure ?
thanks
public
partial class OrdProfMulti : Telerik.Reporting.Report
{
public OrdProfMulti( )
{
InitializeComponent();
try
{
this.arloeDataSet1TableAdapter1.GetData(Convert.ToInt32(this.Report.ReportParameters["rOrdNo"].Value.ToString()));
this.arloeDataSet1TableAdapter1.Fill(this.aRLOEDataSet1.ARLOEDataSet1Table, Convert.ToInt32(this.Report.ReportParameters["rOrdNo"].Value.ToString()));
}
catch (System.Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message);
}
}
private void OrdProfMulti_NeedDataSource( object sender, EventArgs e )
{
Telerik.Reporting.Processing.
Report report = (Telerik.Reporting.Processing.Report)sender;
this.arloeDataSet1TableAdapter1.GetData(Convert.ToDecimal(this.Report.ReportParameters["rOrdNo"].Value.ToString()));
this.arloeDataSet1TableAdapter1.Fill(this.aRLOEDataSet1.ARLOEDataSet1Table, Convert.ToDecimal(this.Report.ReportParameters["rOrdNo"].ToString()));
report.DataSource = aRLOEDataSet1;
}
}