Print Page | Close Window

Need formula help

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4289
Printed Date: 28 Apr 2024 at 2:46am


Topic: Need formula help
Posted By: mavrik
Subject: Need formula help
Date Posted: 17 Sep 2008 at 12:44pm

Item key

Description

Desc 1

R-1

Rave

Rome

 

Reney

Rottle

 

In the example above, I need a formula when item key is blank to insert desc1, and if item key is not blank insert description

Thanks for the help




Replies:
Posted By: roxanne_2929
Date Posted: 17 Sep 2008 at 2:38pm
One way you could do it is by placing the description field and the desc 1 field on top of each other and using the following formulas to suppress each one:
 
In the suppress formula for description, use-
isnull((table.item_key))
 
for the desc1 field suppress formula would be-
not isnull((table.item_key))
 
Make sure you have the suppress box checked and when the formula is entered, the equation icon will turn red.
 
I have used this technique in my reports. The idea being if the item key had data (not isnull) the desc1 will supress. If the item key does not have data (isnull), then the description will suppress. This way, one or the other will be visible, depending on the condition of the item_key.



Print Page | Close Window