Solved

Issue with Crystal 10 Record Selection

Posted on 2011-03-03
6
236 Views
Last Modified: 2012-05-11
Hello experts:

I have a report with the following record selection criteria:
 
(({NewThreats.SuspiciousAmountIndicator} = '1' and

{NewThreats.LowAverageBalanceIndicator} = '1' and

{NewThreats.SimilarAmountsIndicator} = '1' and

{NewThreats.UnusualZeroesIndicator} = '1' and

(not isnull({NewThreats.DrawingOnRDPIndicator}) and

{NewThreats.DrawingOnRDPIndicator} = '1'))  or

 
({NewThreats.SuspiciousAmountIndicator} = '1' and

{NewThreats.LowAverageBalanceIndicator} = '1' and

{NewThreats.SimilarAmountsIndicator} = '1' and

{NewThreats.UnusualZeroesIndicator} = '1' and

(not isnull({NewThreats.DrawingOnExposureIndicator}) and

{NewThreats.DrawingOnExposureIndicator} = '1')))
 
I added the criteria below but the results are the same as before
even though there's tons of RDI on the database.

Or
({NewThreats.Hittype} = 'RDI')




 The new formula looks like this:

(({NewThreats.SuspiciousAmountIndicator} = '1' and

{NewThreats.LowAverageBalanceIndicator} = '1' and

{NewThreats.SimilarAmountsIndicator} = '1' and

{NewThreats.UnusualZeroesIndicator} = '1' and

(not isnull({NewThreats.DrawingOnRDPIndicator}) and

{NewThreats.DrawingOnRDPIndicator} = '1'))  or

 

 

({NewThreats.SuspiciousAmountIndicator} = '1' and

{NewThreats.LowAverageBalanceIndicator} = '1' and

{NewThreats.SimilarAmountsIndicator} = '1' and

{NewThreats.UnusualZeroesIndicator} = '1' and

(not isnull({NewThreats.DrawingOnExposureIndicator}) and

{NewThreats.DrawingOnExposureIndicator} = '1')) or

 
({NewThreats.Hittype} = 'RDI')


)



 Thanks

 


0
Comment
Question by:lancerxe
6 Comments
 
LVL 12

Expert Comment

by:JayConverse
ID: 35028683
or  ({NewThreats.Hittype} = 'RDI')

needs to be outside the last parenthesis.


0
 
LVL 77

Expert Comment

by:peter57r
ID: 35028694
Do you have any Null values in HitType?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35028707
Can any of the non-null tested fields be NULL?

Have you tried it

({NewThreats.Hittype} = 'RDI')

OR

Original

mlmcc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 35028778
Try moving the NULL checks to the top, like attached.
~Kurt
(
  (
    (
      not isnull({NewThreats.DrawingOnRDPIndicator} or
      not isnull({NewThreats.DrawingOnExposureIndicator}
    ) and
    {NewThreats.SuspiciousAmountIndicator} = '1' and 
    {NewThreats.LowAverageBalanceIndicator} = '1' and
    {NewThreats.SimilarAmountsIndicator} = '1' and
    {NewThreats.UnusualZeroesIndicator} = '1' and 
    {NewThreats.DrawingOnRDPIndicator} = '1'
  ) or
  {NewThreats.Hittype} = 'RDI'
)

Open in new window

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35029115
That is not the same since the the tested field after the null test is different.

I thought the same at first.

Is NewThreats the only table in the report?

mlmcc
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 35029192
Good catch.  Since the "DrawingOn.." fields are set explicitly to = '1', there's no need for a NULL check at all, since if it's '1', it can't possibly be NULL.
(
  (
    (
      {NewThreats.DrawingOnRDPIndicator} = '1' or
      {NewThreats.DrawingOnExposureIndicator} = '1'
    ) and
    {NewThreats.SuspiciousAmountIndicator} = '1' and 
    {NewThreats.LowAverageBalanceIndicator} = '1' and
    {NewThreats.SimilarAmountsIndicator} = '1' and
    {NewThreats.UnusualZeroesIndicator} = '1'
  ) or
  {NewThreats.Hittype} = 'RDI'
)

Open in new window

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question