Print Page | Close Window

Testing for no data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=838
Printed Date: 05 May 2025 at 3:35am


Topic: Testing for no data
Posted By: Adam
Subject: Testing for no data
Date Posted: 12 Jun 2007 at 11:35pm
Hi!
My problem is how can I define no entry data (doesn' exit in data in the database).
 
For exemple  
    "If {relation.A} = 5 OR {DATA DOESN'T EXIT} then TRUE



Replies:
Posted By: BrianBischof
Date Posted: 13 Jun 2007 at 12:31am
If IsNull(relation.A} OR {Relation.A}=5 Then True

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: Adam
Date Posted: 13 Jun 2007 at 12:47am
Thanks for you answer,  I tried but it doesn't work with "isnull", the relation A don't have nulls records, I  just want to print the relation A when there is 5 or when there isn't nothing in the database
 
Adam


Posted By: Adam
Date Posted: 13 Jun 2007 at 6:14am
I can explain better the problem above:
 
I have two Tables (A and alias_A) in other words two identically tables.Link by ID
 
 
Table.A                                      Table.alias_A
FieldID / ID / Item_ID                 Field- ID /  ID   / Item_ID
15       1110      929                      93      1111      1980
8         980        32                        8         600        45
15       1112      929                       93      1110      1980
15       1111      929                       56      2089      675
13       823        67                         93      1112      1980
                                                     15      1111       929
                                                    
.                                                    .
.                                                    .
I did a filter over{Table.A.Item_ID} =929 and{Table.alias_A.Fiel-ID}=93.
the result will be:
 
FieldID / ID / Item_ID / Field- ID /  ID   / Item_ID
15       1110      929           93      1110      1980         
15       1112      929           93      1112      1980         
15       1111      929           93      1111      1980
 
Now I want print {Table.A.ID} even when  Item_ID or ID doesn't exist, in other words I want that the output will be always "TRUE"
 


Posted By: BrianBischof
Date Posted: 13 Jun 2007 at 7:45am
In the Links tab, change the link between the tables to use all the left table records (I forget the terminology right now). If that doesn't work then use a SQL command to create a Left Outer Join. That will show all records in the left table even when there isn't a matching record in the right side table.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window