Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Parameter with wild card Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Dec 2011 at 9:18am

 LOL

So in your sample data there is no data (shown) that supports the relationships that you are talking about, which I think is ultimately the employees / crew of a company.
I am guessing that there is another data field in your table that shows where the person is employed (company) and this is duplicated for a company record.
Can you please clarify exactly what this set up is.
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 08 Dec 2011 at 9:30am
There is no crew Table , and LastName fileld contains person's name, his company name,his crew names.
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 08 Dec 2011 at 9:34am
This Table(People) relationship with other Tables by CaseId)
 
People(Table)               Casid(Table)
 
----------------             ----------------
CaseId                          CaseId
First name                     CCT
Lastname                       Status
Ctype                             DTIme
etc.....                              etc.....
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Dec 2011 at 9:52am

sorry but it is hard to gather a complete picture of your set up. How to write your select statement, it is critical to get the design correct.

I still do not understand, using the People table only (this is the only table you have in your report correct?), how I can look at 3 rows of data,
1 for james Brown
1 for Lone Star Company
1 for Jim Pusak
 
and understand that both james and Jim are asscoiated with the Lone Star Company?
There has to be something in these rows of data that link them or identify them as being togther somehow.


Edited by DBlank - 08 Dec 2011 at 9:53am
IP IP Logged
Kerkuk
Newbie
Newbie


Joined: 08 Dec 2011
Online Status: Offline
Posts: 22
Quote Kerkuk Replybullet Posted: 08 Dec 2011 at 11:16am
I have 4 tables
People
Count
Casid
Boat
 
they are(relationship) connected to each other by (CCN-Case Number)
and People tables fields (First name , Last name(which include crew member-company name) and other fields.
Yes  both james and Jim are asscoiated with the Lone Star Company.
No there is no rows of data that link them or identify them as being togther.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Dec 2011 at 12:25pm
Originally posted by Kerkuk

No there is no rows of data that link them or identify them as being togther.
 
so there is no way that I can ever figure out by looking at your data only that james and Jim are associated with the Lone Star Company.
The only way I will ever know this fact is because a person knows it can can tell that fact to me.
Is that correct?
If so then you would have to write a huge piece of code that translates this information into something that the computer can use.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 09 Dec 2011 at 3:18am
sounds like the only option is a stored proc. as it is going to be nearly impossible with CR only to do this.
there is really no way that you can parse a string to search for a name and get all the relationships, when the relationships appear to be in the name.
 
I wouldn't think that it would be too hard in a stored proc as you can create a temp table that you can add names to probably by selecting records from the table where the name exists in the record you want...but doing so in CR would not be as simple as you need to 1 get the record, then go back and read all the records again to find the matches...which is something that CR doesn't do.
 
I feel that a stored procedure to retrieve your reports data is the simpliest and best solution.
 
you might be able be make this work with a sub report by having the main report return a record(s), then linking to the subreport, and selecting all records where their name is found in the main reports name....but it would have to be an exact match (wild cards are bound to mess up the result)
 
again, as always (as DBlank knows), I say go with a stored proc.
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum