Please Help with Crystal Reports.

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.
 
L

Larry Linson

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?

This newsgroup deals with Microsoft Access database. Your question does not
appear to have anything to do with Microsoft Access. Crystal Reports and
Microsoft Access Reports are not, repeat _not_, compatible. I have been told
that there is a feature in Crystal similar to subreports, but that it is
more difficult to use -- but that is the extent of my knowledge of the
subject. You will stand a better chance of getting a useful answer if you
ask in a newsgroup devoted to the software you are using... Visual Studio,
C#, Crystal Reports, or some combination of those.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top