Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Error Post Reply Post New Topic
Author Message
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Topic: Formula Error
    Posted: 03 Aug 2012 at 4:43am
In the following formula, I am calculating invoice total {oep65.bigt65} less freight {oep65.bict65} and adding back customer discount {oep65.bdis65} to get the gross invoice less freight for a specified date range.

This part of the formula works fine:

if {oep65.dtin65} >= 1120101 then {oep65.bigt65}-{oep65.bict65}+{oep65.bdis65} else 0

I am required to only count 75% of sales for one of our customers. For everyone else, I count 100%.

I tried to modify the formula as follows:

if {slp05.cnam05} = 'CUSTOMER NAME' and {oep65.dtin65} >= 1120101
then (({oep65.bigt65}-{oep65.bict65}+{oep65.bdis65})*.75) else 0 or
if {oep65.dtin65} >= 1120101 then {oep65.bigt65}-{oep65.bict65}+{oep65.bdis65} else 0

I am getting a boolean on the "0" that I have in bold above. Do you have any suggestions as to how I could modify the formula to calculate the single customer at only 75%?

Thanks,

Karen
IP IP Logged
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Posted: 03 Aug 2012 at 4:56am
I think I got it...I needed to say ELSE IF

if {slp05.cnam05} = 'CUSTOMER NAME' and {oep65.dtin65} >= 1120101
then (({oep65.bigt65}-{oep65.bict65}+{oep65.bdis65})*.75) else if
{oep65.dtin65} >= 1120101 then {oep65.bigt65}-{oep65.bict65}+{oep65.bdis65} else 0
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.