Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Including Null Records in a Range Post Reply Post New Topic
Author Message
Foxman
Newbie
Newbie
Avatar

Joined: 07 Jan 2011
Location: United States
Online Status: Offline
Posts: 3
Quote Foxman Replybullet Topic: Including Null Records in a Range
    Posted: 07 Jan 2011 at 4:08am
Newbie here!  In the past I have always came to this forum and found a solution to my issues, but this time I couldn't find anything about this exact issue I'm experiencing.

I'm trying to pull over User Initials from "   " to "KZZ" on a bar graph, but I need it to include "null" records too.  I have a subreport with a bar graph that includes "L  " to "ZZZ".   I also have a start & end date parameters in place, which works perfectly.

Can someone please tell me why my formula won't give me the null records? Or possibly suggest different formulas to try?  My formula currently is:

{Tables_1.Insert_Date} = {?Choose Beginning Date} to {?Choose Ending Date} and
{Tables_1.UserInitials} in ['   ' to 'KZZ'] or
{Tables_1.Insert_Date} = {?Choose Beginning Date} to {?Choose Ending Date} and
IsNull({Tables_1.UserInitials})

Thank you in advance for your help!


Edited by Foxman - 07 Jan 2011 at 5:35am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jan 2011 at 5:55am
if you are uing "" for null flip the formula option to ' use default values for null'
 


Edited by DBlank - 07 Jan 2011 at 6:55am
IP IP Logged
Foxman
Newbie
Newbie
Avatar

Joined: 07 Jan 2011
Location: United States
Online Status: Offline
Posts: 3
Quote Foxman Replybullet Posted: 07 Jan 2011 at 6:35am
Thank you for responding so quickly!  This might be a stupid question, but I have only been using Crystal for about 3 months and I'm mainly self taught.  Can you please explain a little more in depth on this or maybe give me an example of how to use this in a formula?  Again, thank you for your help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jan 2011 at 7:11am
I did not see your ISNULL statement at the end.
If you use an ISNULL statement you have to make it the first condition in the entire statment.
As for my other suggestion you might not have this option. I am using CR XI. Other users have not found the option I am referring to but ... inside the formula editor there is an drop down list option to choose how to handle null values as either null or as a default value.
if your data is NULL instead of an empty string you have to decide how you want to deal with it. If you do state how to handle a NULL or use the option I mentioned above a formula will stop evaluating when it hits a NULL and return nothing.
I also have never had luck with using "X to Y" on an alpha.
Maybe try left(uppercase(field),1) in ['A','B',...]
 
IP IP Logged
Foxman
Newbie
Newbie
Avatar

Joined: 07 Jan 2011
Location: United States
Online Status: Offline
Posts: 3
Quote Foxman Replybullet Posted: 02 Feb 2011 at 9:30am
I was able to get this resolved.  Thank you all for your help!
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.047 seconds.