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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using Crystal and MAS90 w/ a report. Linking, maybe? 1

Status
Not open for further replies.

aaronburro

Programmer
Jan 2, 2003
158
0
0
US
Bear with me, I'm a bit new to Crystal Reports, so I'm trying to figure this little thing out.

I'm trying to display the phone number for the shipping destination on our Bills of Ladings. Currently, the workaround is to place the phone number on AddressLine3 for both ShipTo's and in Customer Maintenance. Ultimately, this is not helpful, because sometimes we need to use AddressLine3.

So, I made a formula that looks like this:

if {SO1_SOEntryHeader.ShipToCode} <> "" then {AR1_CustomerMaster.PhoneNumber} else {SOB_CustShipToAddress.Telephone}

I then proceeded to add the tables AR1_CustomerMaster and SOB_CustShipToAddress.Telephone. Then, I went to the linking expert and linked as follows:

SO1_SOEntryHeader.CustomerNumber --> AR1_CustomerMaster.CustomerNumber
SO1_SOEntryHeader.CustomerNumber --> SOB_CustShipToAddress.CustomerNumber
SO1_SOEntryHeader.ShipToCode --> SOB_CustShipToAddress.ShipToCode

I link all of these using the normal equal-to link

Then, I go and run MAS90 and go to Picking Sheet Printing, choose the form and click Form to edit/preview the form. When I go to the lightning bolt to refresh the data, I get the following message:

"ODBC error:[ProvideX][ODBC Driver]Column Not Found: PhoneNumber"

Then I click OK and it tells me there was an error in the database.

My guess is that I am linking wrong. Any help would be appreciated
 
Aaron,

Link to the ship-to file with a left outer join. There will not always be a record in the ship-to file and an equal join will cause any record on SO1 without a shipto code in SOB to be excluded from the selection.

Also, go to File, Report Options and check "Convert Null field value to default"

 
saint, I went ahead and tried your suggestion and I wind up w/ the same messages popping up. I did a LO join from OrderNumber on one test and from ShipToCode on another, and neither worked. what am I missing?
 
When you remove that phone number field entirely, does the message persist? If not, you may consider writing a small subreport that will determine which phone number to display. That might be an easy workaround.
 
yep. when I change that formula to just a blanket string, it works fine. I don't really know how to do subreports yet, so where would I be able to learn such a thing?
 
why did you not just add the phone number from the customer master file table, that table will link up perfectly and allow you to just add the field.
 
long and the short of it is that sometimes the phone number needed to be pulled from CustomerMaster, sometimes it needed to be pulled from ShipTo. I haven't revisited this problem, as it is not the most pressing of concerns at this moment ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top