By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,945 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,945 IT Pros & Developers. It's quick & easy.

Help with Crystal Report

P: n/a
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



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"RJN" <rj*@yahoo.com> wrote in message
news:uF**************@TK2MSFTNGP10.phx.gbl...

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



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.