Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Displaying Problem Post Reply Post New Topic
Author Message
viperbyte
Newbie
Newbie


Joined: 13 May 2013
Location: United States
Online Status: Offline
Posts: 38
Quote viperbyte Replybullet Topic: Formula Displaying Problem
     Posted: 01 Jul 2013 at 5:33am
Good morning all,
 
Can you folks please take a look at my NetSales formula and tell me what I'm doing wrong?  As-is the formula only displays values when Ctype = 1.  When Ctype equals 1, the expected values display.  But when Ctype is not one nothing displays.    The value of {SALES_HISTORY_DETAILS.EXTPRICE} should be displaying when CType <> 1.  I've tried it with {SALES_HISTORY_DETAILS.EXTPRICE} on the report suppressed, not suppressed, not on the report... no matter what I do {SALES_HISTORY_DETAILS.EXTPRICE} won't display.  And I know there's data in {SALES_HISTORY_DETAILS.EXTPRICE}.  When I drop the {SALES_HISTORY_DETAILS.EXTPRICE} thingie on the report for testing I see values.
 
//Net Sales
if {SALES_HISTORY_DETAILS.CTYPE} = 1 then
{SALES_HISTORY_DETAILS.EXTPRICE} + {@NegateCredits} else
{SALES_HISTORY_DETAILS.EXTPRICE};

//NegateCredits
{SALES_HISTORY_DETAILS.CREDITS} * -1.0;


Edited by viperbyte - 01 Jul 2013 at 5:35am
IP IP Logged
rusmanicai
Newbie
Newbie
Avatar

Joined: 14 Sep 2011
Location: United States
Online Status: Offline
Posts: 17
Quote rusmanicai Replybullet Posted: 01 Jul 2013 at 5:49am
In Report Options check "Convert Database NULL Values to Default" and "Convert Other NULL Values to Default". also use parentheses
//NegateCredits
({SALES_HISTORY_DETAILS.CREDITS} *( -1.0));
IP IP Logged
viperbyte
Newbie
Newbie


Joined: 13 May 2013
Location: United States
Online Status: Offline
Posts: 38
Quote viperbyte Replybullet Posted: 01 Jul 2013 at 6:22am
Thanks rusmanicai,
 
I'm using CR 8.5,  I don't see  "Convert Database NULL Values to Default" and "Convert Other NULL Values to Default" exactly.  But I do have something close to one of those.  I have a "Convert Null Field Value to default", which I checked and now everything works.  I also added the parentheses like you said.  I've wasted hours on this.  Super Thanks.


Edited by viperbyte - 01 Jul 2013 at 6:23am
IP IP Logged
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