Click to See Complete Forum and Search --> : Crystal - If Statement ? Very Basic
jedooley
Mar 20th, 2008, 02:21 PM
Can someone tell where I would enter and structure an If Statement in Crystal to do the following. I am familiar with the statements but not sure where it would go.
I have a Charge Amount and an Overide Amount. I want it to display the charge_amt field only when the overide_amt field is null.
charge_amt and overide_amt are my fields
thanks
brucevde
Mar 20th, 2008, 03:04 PM
Create a Formula field that returns the proper amount field. Then print/display the Formula field on the report. The Formula would contain the following
If IsNull({Your Table Name.Overide_Amt}) Then
{Your Table Name.Charge_Amt}
Else
{Your Table Name.Overide_Amt}
jedooley
Mar 25th, 2008, 11:24 AM
Thank You Very Much. How can I modify this code so that if the Overide Column is null or = $0.00 ?
If IsNull ({fox_trans_charge.override_amt}) Then
{fox_trans_charge.charge_amt}
Else
{fox_trans_charge.override_Amt}
brucevde
Mar 25th, 2008, 12:18 PM
If IsNull ({fox_trans_charge.override_amt}) Or {fox_trans_charge.override_amt} = 0 Then
...
jedooley
Mar 25th, 2008, 12:43 PM
Thank You but that will just bring back the original data.
Does this not have to be part of a Where Clause?
Can you help me with that. thanks
techgnome
Mar 25th, 2008, 01:14 PM
No, it goes into the report...
It's been too long since I've made a report, but we do this kind of stuff all the time. Another thing you can do it to bring up the properties of the field and make its visibility conditional on any criteria you want.
-tg
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.