Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Need String Value, not Numeric Value Post Reply Post New Topic
Author Message
miamitourism
Newbie
Newbie
Avatar

Joined: 14 Jan 2011
Online Status: Offline
Posts: 24
Quote miamitourism Replybullet Topic: Need String Value, not Numeric Value
     Posted: 14 Jan 2011 at 6:39am

I am a fairly new user to Crystal, and I am in desperate need of assistance, because I cannot figure this out!

 

I am working with 3 tables. I will summarize what data fields are included (but note there are many other fields that I am not using for this report). 

 

To help you understand the relationship, we have "Clients" (identified as “Accounts” in our database, but exist in the Client table) that have Bookings with our company, and each of those Bookings takes place at a Hotel (identified as “Partners” in our database, but exist in the Client table also).

 

1)  CLIENT TABLE- contains:

  • Client Name
  • Client Number

2)  BOOKING TABLE- contains:

  • Client Number
  • Booking Number

3)  HOTEL TABLE- contains:

  • Booking Number
  • Client Number

You can obviously tell that the client number is the common denominator here, but the issue I am having is that I need the hotel NAME for each booking, not the NUMBER.  I thought that I would need to link the “Client number from the hotel table to the client number in the client table, but when I do that, I get NO results in that field. I’m thinking it’s because my joins are wrong.... remember that both clients and partners are both in the Client table.  Perhaps I’ve confused Crystal!  I hope that makes sense.

Anyone have any suggestions?

 

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 14 Jan 2011 at 8:53am
You need to bring in a second copy of the Client table that you will use to specifically get the hotel name. 
 
In the Database Explorer, when you add a table that already is included in the report, Crystal will let you know it's already there and ask if you want to "alias" it.  In this message box, click on the "Yes" or "OK" button (I don't remember what says exactly.)
 
At this point you will see a second copy of your Client table with the name "Client_1".  For clarity, I would rename with to "Client_Hotel" by right-clicking on it and selecting "Rename".  You are not renaming the underlying table, just the alias that Crystal uses to refer to it.
 
You will then link from your HOTEL table to the Client_Hotel table and use the field from Client_Hotel to get the hotel name.
 
-Dell
IP IP Logged
miamitourism
Newbie
Newbie
Avatar

Joined: 14 Jan 2011
Online Status: Offline
Posts: 24
Quote miamitourism Replybullet Posted: 14 Jan 2011 at 9:31am
That was EXACTLY what I needed!! I had no idea you could do that.
 
That was so easy, it's a little scary!! Big%20smile I cannot thank you enough!
IP IP Logged
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