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!

ReportNet - If Then

Status
Not open for further replies.

JKas

Programmer
Jan 20, 2005
28
US
Hello,

I am trying to create the following If-Then Statement in reportNet 1.1:

IF ( [GIFT_AMOUNT]is null ) THEN
( [GIFT_CREDIT_AMOUNT] )
ELSE
( ' ' )

Both the Gift_Amount and Gift_Credit_Amount fields are in the query. However, the report does not run. However, if I change the statement to the following, the report runs fine:

IF ( [GIFT_AMOUNT]is null ) THEN
( 'A' )
ELSE
( 'B' )
The report runs, and the column now has either an 'A' or 'B' displayed.

My question is this, shouldn't I be able to create an If- Then contruct in which the results can display a field (i.e data model item) already selected in the query?

Thanks
 
What do you want to display of [GIFT_AMOUNT]is NOT null ??

Have you tried this :
IF ( [GIFT_AMOUNT]is null ) THEN
( [GIFT_CREDIT_AMOUNT] )
ELSE
( [GIFT_AMOUNT] )

And if your GIFT_AMOUNT are numeric the following might work:
IF ( [GIFT_AMOUNT]is null ) THEN
( [GIFT_CREDIT_AMOUNT] )
ELSE
( 0 )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top