Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Addition with NULL value !!! Post Reply Post New Topic
<< Prev Page  of 2
Author Message
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 10 Dec 2008 at 3:57am
Hi,
i.e. Strange,I have tested the report created table in sql server 2005 with 6 numeric values one value is null used crystal XI to create the report used OLEDB.
 
and it doesn't give me zero it gives me the correct value
 
Cheers
Rahul
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 10 Dec 2008 at 4:15am
Hi
 
Here is another method use SQL
 

select ISNULL(t1, 0) +ISNULL(t2, 0)+ ISNULL(t3, 0) + ISNULL(t4, 0) + ISNULL(t5, 0) + isnull(t6,0)

from

Tax_t
 
Cheers
Rahul
IP IP Logged
karthizen
Newbie
Newbie
Avatar

Joined: 10 Dec 2008
Location: India
Online Status: Offline
Posts: 17
Quote karthizen Replybullet Posted: 10 Dec 2008 at 6:13am

Thank you rahul.....

I will check out again and let you know.Smile

 

Regards,
Karthik...
IP IP Logged
RitaInHood
Newbie
Newbie


Joined: 07 Jul 2008
Online Status: Offline
Posts: 25
Quote RitaInHood Replybullet Posted: 10 Dec 2008 at 1:15pm
How about

if isnull ({TAX_CALC.TAX_AMOUNT1})
then a:=0, else a:={TAX_CALC.TAX_AMOUNT1};

if isnull ({TAX_CALC.TAX_AMOUNT2})
  then b:=0, else b:={TAX_CALC.TAX_AMOUNT2};

  . . etc . ..

result:=a+b+c+d+e+f;


IP IP Logged
karthizen
Newbie
Newbie
Avatar

Joined: 10 Dec 2008
Location: India
Online Status: Offline
Posts: 17
Quote karthizen Replybullet Posted: 10 Dec 2008 at 11:24pm
Works good yaar !
 
Thanks !
Regards,
Karthik...
IP IP Logged
karthizen
Newbie
Newbie
Avatar

Joined: 10 Dec 2008
Location: India
Online Status: Offline
Posts: 17
Quote karthizen Replybullet Posted: 11 Dec 2008 at 3:27am
How about this?
 
Formula:
 
(if isnull ({TAX_INFO.TAX_AMOUNT_1}) then 0 else ({TAX_INFO.TAX_AMOUNT_1})) +
(if isnull ({TAX_INFO.TAX_AMOUNT_2}) then 0 else ({TAX_INFO.TAX_AMOUNT_2})) +
(if isnull ({TAX_INFO.TAX_AMOUNT_3}) then 0 else ({TAX_INFO.TAX_AMOUNT_3})) +
(if isnull ({TAX_INFO.TAX_AMOUNT_4}) then 0 else ({TAX_INFO.TAX_AMOUNT_4})) +
(if isnull ({TAX_INFO.TAX_AMOUNT_5}) then 0 else ({TAX_INFO.TAX_AMOUNT_5})) +
(if isnull ({TAX_INFO.TAX_AMOUNT_6}) then 0 else ({TAX_INFO.TAX_AMOUNT_6}))
Regards,
Karthik...
IP IP Logged
<< Prev Page  of 2
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.012 seconds.