Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: RE:Displaying null value in report Post Reply Post New Topic
Author Message
swapna123
Newbie
Newbie


Joined: 14 Sep 2010
Online Status: Offline
Posts: 15
Quote swapna123 Replybullet Topic: RE:Displaying null value in report
    Posted: 28 Sep 2010 at 5:38am
HI All,
 
 
IAm using crystal2008
I have a sql code in which some columns are null but there is value 0 in the column count..which is not displayed in the report.i tried all ways but couldn't figure out solution for this.
 
   If you look at the code in the second half when i use 0 = then it displays in toad as well as in report also..but when there is data..it displays both the data and the 0. I want to display data when there is data..or 0.
 
 

SELECT COUNT,

counttype,

siteid,

storeloc

FROM ( SELECT COUNT ( * ) AS COUNT,

'NRRETURNNULLWO' counttype,

siteid,

storeloc

FROM maximo.matusetrans

WHERE matusetrans.issuetype = 'RETURN'

AND matusetrans.refwo IS NULL

AND matusetrans.transdate >= TO_DATE (:startdate)

AND matusetrans.transdate <= SYSDATE

GROUP BY siteid, storeloc)

UNION

(SELECT 0 COUNT,

'NRRETURNNULLWO' counttype,

'siteid' AS siteid,

'storeloc' as storeloc

FROM DUAL

WHERE 0= ( SELECT COUNT ( * ) AS COUNT

FROM maximo.matusetrans

WHERE matusetrans.issuetype = 'RETURN'

AND matusetrans.refwo IS NULL

AND matusetrans.transdate >= TO_DATE (:startdate)

AND matusetrans.transdate <= SYSDATE) )

 

Thanks
Swapna
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.031 seconds.