Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: filter Post Reply Post New Topic
<< Prev Page  of 2
Author Message
psrs0810
Newbie
Newbie


Joined: 22 Apr 2009
Online Status: Offline
Posts: 15
Quote psrs0810 Replybullet Posted: 10 Jun 2009 at 10:16am

I need the all of the information if any one of the four fields have a value.  If all four fields are blank or even 0.00, I do not need them.

I am trying to reduce the amount of information, because it starts out with over 25,000 rows and I am trying to reduce it down to a managable 9,000.

Thanks

IP IP Logged
psrs0810
Newbie
Newbie


Joined: 22 Apr 2009
Online Status: Offline
Posts: 15
Quote psrs0810 Replybullet Posted: 11 Jun 2009 at 7:19am

I am using this formula, because ther are some values that a below 0:

{CIDS_2009_CHRG.May}>0

or

{CIDS_2009_CHRG.May}<0

or

{CIDS_2009_BUDGET_CHRG.May}>0

or

{CIDS_2009_BUDGET_CHRG.May}<0

or

{CIDS_2009_VOL.May}>0

or

{CIDS_2009_VOL.May}<0

or

{CIDS_2009_BUDGET_VOL.May}>0

or

{CIDS_2009_BUDGET_VOL.May}<0

BUT it is still eliminating rows of information that has values.  Any ideas?

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 11 Jun 2009 at 7:46am

Are any of the values null?  Comparison against a null value does not return true or false, it returns null and no more comparisons are made.  This is because the database processes "or" statements until it gets a non-false result and null is not false.  I know, it's confusing!

What type of database are you using?  If it's Oracle, I would create a SQL Expression for each field that looks like this:

 

nvl({CIDS_2009_BUDGET_VOL.May}, 0)

 

This will return a 0 if the value is null.  There's probably a way to do something similar in SQL Server and other databases (unless you're using something like Excel as a data source.)

 

The Selection formula would then look like this:

 

({%CHRG} <> 0
or
{%BUDGET_CHRG} <> 0
or
{%VOL} <> 0
or
{%BUDGET_VOL} <> 0)

 

-Dell

 

IP IP Logged
psrs0810
Newbie
Newbie


Joined: 22 Apr 2009
Online Status: Offline
Posts: 15
Quote psrs0810 Replybullet Posted: 11 Jun 2009 at 8:19am
Is null just blank or no value?
 
Also, when I try to put in the % in the formula, it gives me "field name is not known" or " ) is missing"
 
the database we use is a Siemens product 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 11 Jun 2009 at 10:51am
You have to create the SQL Expressions in Crystal in order to use them.
IP IP Logged
psrs0810
Newbie
Newbie


Joined: 22 Apr 2009
Online Status: Offline
Posts: 15
Quote psrs0810 Replybullet Posted: 11 Jun 2009 at 1:20pm
Sorry, I am not fluent in SQL
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.016 seconds.