Help with Crystal Report

  • Thread starter Thread starter RJN
  • Start date Start date
R

RJN

Hi

I'm new to VS.Net Crystal Report. I'm using data sets as the source for
crystal report. I've a dataset which has 2 data tables. The first
table's schema is like this

Ptid String
Prid String
Chid String
PtName String
Count int

The columnc Ptid, Prid and Chid are the primary key columns

The second table's schema is like this

Prid String
Chid String
Prtext String
Chtext String

The columnc Prid and Chid are the primary key columns

There is foreign key relationship between Prid and Chid between the
tables.

My report is something like this.
I want to group based on Ptid and Prid and for each of these matching
values I want a list of Chid and Count.

Ptid1
Prid1
Chid1 100
Chid2 0
Prid2
Chid1 0
Chid2 400

Total 500

Ptid2
Prid1
Chid1 300
Chid2 0
Prid2
Chid1 600
Chid2 0

Total 900

I'm able to set up the dataset as the source to the crystal report. When
I add the tables, Crystal report links the tables and identifies the
relationship.

But I'm not able to get the list of all chid's for a given Prid.

My report looks something like this

Ptid1
Prid1
Chid1 100
Prid2
Chid2 400

Total 500

Ptid2
Prid1
Chid1 300
Prid2
Chid1 600

Total 900

Can somebody help me how will I be able to get such a report. Is there
any possibility of saying

select chid from table2 where table2.prid = table1.prid

Any help is highly appreciated.

Regards

RJN
 
Hi RJN,

You should be setting up the relationship in your link properties; you may
also want to do some linking in your record selection section, although the
first idea is probably where you need to be.

HTH,

Bernie Yaeger
 
Back
Top