Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select statements in CR

Status
Not open for further replies.

pollux0

IS-IT--Management
Mar 20, 2002
262
US
I have two tables. table1 lists all available hotels, two fields: "hotelidnumber" "hotelname". table two lists reservations made which stores the "hotelidnumber" of the hotel reserved at.

In crystal reports i created a simple "group" of reservations by hotel. The problem is, that the "hotelIdNumber" is listed for each group header instead of the hotel name. How can i select the hotel name to be at the header of each sub group. In asp it would be simila to:

select hotelname from table1 where hotelidnumber in(select hotelidnumber from table2)

thanks in advance
 
hi
did you link your hotel table to the other table base on hotel id?
your group should be from the first table hotel id
and in this group add the reservation field from the second table
cheers

pgtek
 
Do you want to group by hotel name? Or do you just want to identify each group by a meaningful hotel name rather than an ID?

In Crystal 8.5, the system automatically uses the group field as the group header. But you are quite free to delete it in the display and use something else, such as name.

You can also use a formula field, maybe name followed by ID, and possiblly a remark where you'd like to highlight something.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top