Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Pulling data even when nothing is populated? Post Reply Post New Topic
Author Message
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Topic: Pulling data even when nothing is populated?
    Posted: 20 Apr 2012 at 8:35am
Hello everyone,
 
I have a report that pulls data when there is a date within the parameter fields.  I need it pull the data if there is nothing in the parameter fields, and populate the data with 0's.  So, if the act_close_dt is between 4/20/12 and 4/21/12, then pull the data, but if there's nothing then put 0 in the fields.  Any ideas? 
 
date({S_SRV_REQ.ACT_CLOSE_DT}) in date({?@start_dt}) to date({?@end_dt}) and
{S_SRV_REQ.SR_STAT_ID} <> 'Cancelled' and
(isnull({S_SRV_REQ.SR_PROD_VERSION}) = true or {S_SRV_REQ.SR_PROD_VERSION} <> 'Email') and
{S_SRV_REQ.RESOLUTION_CD} <> "copay penalty"
 
Thank you in advance.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Apr 2012 at 4:17am
Well....
SQL returns an empty set...there no are rows, so there is nothing there, so CR won't print anything.
 
What you could do is create the values in 'new' detail section that you dynamically hide if there are any rows...or conversely show if there are no rows of data.
 
I don't know of a function to check for no data off the top of my head, I can see working around it with formulas, but I would check for a way to determine if there rows first.
 
HTH
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.018 seconds.