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

Help needed: IF...Then...Else

Status
Not open for further replies.

bloomlight

IS-IT--Management
Jun 12, 2006
149
US
I am creating a report and need help. My report needs to show the certain referral source (1 or 2) . the IF statement is like this:

IF {typecode} = "ReferringSource1"
then
display the record
else
IF {typecode} = "ReferringSource2"
then
display the record


How to ask Crystal report to display the record? there are about 5 fields (columns) to display (ID, names, referral source, ets....). do I need to list all fields to be displayed? in other words, do I have to code the following in the formula:

IF {typecode} = "ReferringSource1"
then
ID
Name
Referral source
......
......
else
IF {typecode} = "ReferringSource2"
then
ID
Name
Referral source
......
......


Is there a better way to coding this? Any help would be greatly appreciated!


 
I would put the formula(s) into the suppress section of the detail (multiple detail lines?). Each detail line would be shown/suppressed based on the one the formula's above, thus you can control what fields are being shown. I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top