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

Output based on condition

Status
Not open for further replies.

Zugdud

IS-IT--Management
Feb 26, 2003
158
US
Ok im real new to crystal reports, and am trying to output based on a condition. Condition is: If field Character01 is not null print OrderHead.Character01, else print Shiphead.Address

This has got to be real common so mabey im missing something? Can't I just create a formula that will do this?

Thanks for any help
 
This is with crystal syntax:

If not(IsNull{OrderHead.Character01})) Then
{OrderHead.Character01}
Else
{Shiphead.Address}
 
If you need 2 of those field be in report:

Right Click on OrderHead.Character01 -> Format Field -> Common tab -> across of Suppress, click on x+2 and type: not isnull(Character01) -> Save

Right Click on Shiphead.Address -> Format Field -> Common tab -> across of Suppress, click on x+2 and type: isnull(Character01) -> Save

You can use very simple formula @OrderOrAddress
If isnull(Character01) then
Shiphead.Address
Else
OrderHead.Character01

Place this formula in details section…should work.

Alik
 
Thanks for the follow up guys! I plugged it in and everything worked great! awesome!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top