Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: restriction with NULL values Post Reply Post New Topic
Author Message
maciaso
Newbie
Newbie
Avatar

Joined: 20 Mar 2008
Location: United States
Online Status: Offline
Posts: 11
Quote maciaso Replybullet Topic: restriction with NULL values
     Posted: 30 Oct 2008 at 5:03am
Hi there,
 
I am trying to build a restriction from 2 different fields and one of this fields contains null values.  The report is excluding this from my totals.  Can you please help.
 
Please see below for the current structure:
 
not ({wr.prob_type} in ["ASSESSMENT", "EVENTS", "EVENTS - MOVES", "LIFE SAFETY", "MOVES", "PREVENTIVE MAINT"]) and
isnull ({wr.cause_type}) or {wr.cause_type} <> "PROJECT"
OM
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 31 Oct 2008 at 1:55am
Hi,
 
Not Clear with your question........?
 
Cheers
Rahul
IP IP Logged
maciaso
Newbie
Newbie
Avatar

Joined: 20 Mar 2008
Location: United States
Online Status: Offline
Posts: 11
Quote maciaso Replybullet Posted: 31 Oct 2008 at 6:24am
I want to restric some records to show on a report:
Crystal is doing it well but it a recor has a Null value it does not get included in the total
OM
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 31 Oct 2008 at 7:50am
Hi,
Here is what you need to do
 
Create a 2 formulas place one  in details section one in Report Footer section
 
Formula1
Global NumberVar IsnullNotnullCount;
Shared NumberVar Test;
WhilePrintingRecords;
If (IsNull({table.fieldname})) or Not(IsNull({table.fieldname})) then
(
    ISnullnotnullCount := Isnullnotnullcount + 1;
    test:=IsnullNotnullCount
)
Then Create Second formula to place the total in report footer and enter the code below
 
Formula2
Shared numbervar Test;
Test;
 
 
Cheers
Rahul
 


Edited by rahulwalawalkar - 31 Oct 2008 at 7:51am
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