M
Mike
Hi all,
I'm actually filling a report created with CR, using a stored proc.
The
data is returned in an ouput parameter of ref cursor type,
and retrieved from a dataset using ADO. To display the data on the
report,
i used unbound fields, as i have single values only. Meaning, my
dataset has
one row but with multiple columns, each of them, bound to my unbound
fields.
Those unbound fields were added to the Header section of the report,
as they
need to be displayed only once. That works perfectly, i bound them
using this
code from a class :
FormulaFieldDefinitions fielddefs;
fielddefs = myrpt.DataDefinition.FormulaFields;
DataRow r = ds.Tables[0].Rows[0];
foreach(FormulaFieldDefinition f in fielddefs)
{
f.Text = r[f.Name].ToString();
}
Reportviewer.ReportSource = myrpt;
The name of each unbound field, has got the same name of the column
name in my dataset.
Ok, my question is, assuming i would now have several rows in my
dataset, the
data should normally be displayed in the details section. So , how to
bind
my unbound fields to the dataset in this case ? I've tried the
SetDatasource
method, but it didn't work.
Any Idea ?
Thanks,
Mike
I'm actually filling a report created with CR, using a stored proc.
The
data is returned in an ouput parameter of ref cursor type,
and retrieved from a dataset using ADO. To display the data on the
report,
i used unbound fields, as i have single values only. Meaning, my
dataset has
one row but with multiple columns, each of them, bound to my unbound
fields.
Those unbound fields were added to the Header section of the report,
as they
need to be displayed only once. That works perfectly, i bound them
using this
code from a class :
FormulaFieldDefinitions fielddefs;
fielddefs = myrpt.DataDefinition.FormulaFields;
DataRow r = ds.Tables[0].Rows[0];
foreach(FormulaFieldDefinition f in fielddefs)
{
f.Text = r[f.Name].ToString();
}
Reportviewer.ReportSource = myrpt;
The name of each unbound field, has got the same name of the column
name in my dataset.
Ok, my question is, assuming i would now have several rows in my
dataset, the
data should normally be displayed in the details section. So , how to
bind
my unbound fields to the dataset in this case ? I've tried the
SetDatasource
method, but it didn't work.
Any Idea ?
Thanks,
Mike