D
dolphinearth
Hi all. I want to know if anyone might be able to help me with this
strange problem. I need to have a simple report that can draw up to
any number of records.
Now, I have a Visual Studios 2003.Net Crystal Report generated though
the Studios. Is there any way I can get it to use a subreport and
insert that sub report every time when my foreach loop runs? Or is
there any way I can get hold of C# code to do this?
Here is my code.
foreach (DataRow r in dsContents.CaseContents.Rows)
{
eRD.SetParameterValue("CaseNumber",r["PackNo"].ToString());
eRD.SetParameterValue("PartDesc",r["ItemDesc"].ToString());
eRD.SetParameterValue("PartNumber",r["PartNo"].ToString());
eRD.SetParameterValue("PackQty", r["PackQty"].ToString());
}
dsContents.CaseContents is the dataset I use within the Web Service.
eRD is the Report object I made.
In the dataset there are two rows, but only the last row is shown in
the subreport. I also use Parameters in the subreport, since I cannot
add a dataset, otherwise I get a error of "Load Report Failed" on the
web service. Is there a way of getting the subreport to be added
throuch code in C#? Any help is appreciated.
Thank you.
strange problem. I need to have a simple report that can draw up to
any number of records.
Now, I have a Visual Studios 2003.Net Crystal Report generated though
the Studios. Is there any way I can get it to use a subreport and
insert that sub report every time when my foreach loop runs? Or is
there any way I can get hold of C# code to do this?
Here is my code.
foreach (DataRow r in dsContents.CaseContents.Rows)
{
eRD.SetParameterValue("CaseNumber",r["PackNo"].ToString());
eRD.SetParameterValue("PartDesc",r["ItemDesc"].ToString());
eRD.SetParameterValue("PartNumber",r["PartNo"].ToString());
eRD.SetParameterValue("PackQty", r["PackQty"].ToString());
}
dsContents.CaseContents is the dataset I use within the Web Service.
eRD is the Report object I made.
In the dataset there are two rows, but only the last row is shown in
the subreport. I also use Parameters in the subreport, since I cannot
add a dataset, otherwise I get a error of "Load Report Failed" on the
web service. Is there a way of getting the subreport to be added
throuch code in C#? Any help is appreciated.
Thank you.