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;
}
}
Hi,
i need to run the following query in order to be able to create a dataset and bind it to my parameter which
is supposed to be a drop down.
what i am trying to do is creating a temp table to create a dataset for Month and Year drop downs
my problem is that , the query builder does not support 'Declare' so i am basically not able to use my query.
What can i do to create a drop down param and bind it to a dataset which is not actually running on an existin table in my database.
Thanks very much
Zahra
declare
@months table(
monthName
varchar (50),
monthValue
int)
insert
into @months(monthName,monthValue)
select
'January',1 union
select
'Feburay',2 union
select
'March',3 union
select
'April',4 union
select
'May',5 union
select
'June',6 union
select
'July',7 union
select
'August',8 union
select
'September',9 union
select
'October',10 union
select
'November',11 union
select
'December',12
select
monthName, monthValue from @months order by monthvalue asc