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!

duplicate id numbers

Status
Not open for further replies.

begley

Programmer
May 1, 2003
22
US
I have two oracle personnel files, linked by ID number. The 1st file has person info, the 2nd has work and home phone numbers. I want to print everyone's info all on 1 line with both work and home phone. I am getting two lines for each person.

Thanks Amanda
 

LB

You are right. I did mean phone type and that works just fine.
I did the first suggestion (on your last post)because we can have duplicate names, created the group, changed the group on the report and refreshed data. Got an error at that point that says "A string can be at most 254 characters long and opened the phone formula window. This is the formula

whileprintingrecords;
stringvar phone:= phone + {VW_PER_PHONE.PHONE_TYPE} + " " + "("+{VW_PER_PHONE.PHONE_NUM}+")"+", ";
(all on one line).

This formula worked with the id group in the report, but not with the name group.

Sorry, things just keep going wrong! Thanks for your help..
 
If you have only one phone number per phone number type, I would push this processing back to the server and do away with the Crystal formulas. Assuming that you have three phone number types, 'H', 'W', 'P', add your phone number table to the report three times and give it three different aliases. For the first instance add a selection formula PHONE_TYPE='H', for the second, PHONE_TYPE='W', and PHONE_TYPE='P' for the third. Join each of the phone number tables to the person table as left outer joins. Now you will have a single record per person with the three phone numbers (or null) in each record.

This will not work if you have the possibility of multiple phone numbers per phone number type.
 
I thought I responded to your post again yesterday, but I guess it didn't go through. I think that when you eliminated the group and replaced it with the name+ID group you inadvertently eliminated the reset formula. So try placing the first formula into the group (name-ID) header, and this should resolve the problem. The reset formula {@resetphone} is:

whileprintingrecords;
stringvar phone := "";

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top