Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Restrict zero in Formula field Post Reply Post New Topic
Author Message
madhugangaraju
Newbie
Newbie


Joined: 29 Mar 2010
Online Status: Offline
Posts: 13
Quote madhugangaraju Replybullet Topic: Restrict zero in Formula field
     Posted: 29 Mar 2010 at 10:08pm
Hi All Iam designing a report in crystal report basing on a stored procedure.In this report i created the formula field 'DTM2003' contains the following code
if {SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.RouteName}={?ROUTE NAME} and
{SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.DocDate}={?Date} then
{SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.DTM200MLD}

actually This formula field results only required value but the results the extra value 0 and this zero is displaying on the report. when i observe the browse field data option for this formula field it showing the original value and zero value but i need only the original value but not zero on the report. how should i get this
madhu
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Mar 2010 at 4:33am
the question is: is the value of 0 legitimate, or is the field NULL and the report converting it?
 
Either way, I think that all you need to is to modify the formula like:
if {SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.RouteName}={?ROUTE NAME} and
{SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.DocDate}={?Date} then
  if {SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.DTM200MLD} <> 0 then
  {SP_JD_SALESMENWISEAGENTBALANCE_RPT_RETURNS;1.DTM200MLD}
else
  ""
 
HTH

IP IP Logged
madhugangaraju
Newbie
Newbie


Joined: 29 Mar 2010
Online Status: Offline
Posts: 13
Quote madhugangaraju Replybullet Posted: 31 Mar 2010 at 11:06pm
thanks for your reply
i tried it but it again shows the zero value but not the original value
thanks in advance
madhu
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Apr 2010 at 3:11am
well, I would play with the report and try to determine where the 0 is coming from...from the data, which part, why?  Not in the raw data, what is being converted.  Once you know what is causing the 0 you can code to remove it.
 
HTH
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