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

If then statement 1

Status
Not open for further replies.
Feb 26, 2004
58
US
I am trying to write and If then statement. If the Reduced amount field is 0 or no record then I want the list price to print otherwise if there is a record and and amount I want the reduced amount to print. I cannot get the list price to print. It shows up blank. the Reduced amount prints when it is supposed to. I am thinking it has something to do with no record in the Brokerage-offer table.
How do I check if there is no record.

THese are the two formulas I have tried.

Basic
formula = {Brokerage.ListPrice}
If {Brokerage_Offer.ReducedAmount} > 0 then
formula = {Brokerage_Offer.ReducedAmount}
end if

Crystal
If ({Brokerage_Offer.ReducedAmount} > 0) then
({Brokerage_Offer.ReducedAmount})
else {Brokerage.ListPrice}

Can you help? Please!!
 
Hi, Use a left outer join between the tables so that all Brokerage records will be returned even if no Brokerage_Offer record exists.
( assumes Brokerage --> Brokerage_Offer link)
[profile]
 
Crystal
If Not IsNull({Brokerage_Offer.ReducedAmount}) and
({Brokerage_Offer.ReducedAmount}) > 0 then
({Brokerage_Offer.ReducedAmount})
else {Brokerage.ListPrice}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top