Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting records with null field and displaying text in that field

Status
Not open for further replies.

rorymo

Technical User
Nov 7, 2003
75
US
Hi,
I am very new to Crystal so please bear with me..
I am working on a subreport.
I need to select records that:
have matching reference numbers and
have a specific name and
have a specific type (name)
If one of these records has a null in the "type" field,
I want to display the record but have that field display
a literal (like "unassigned").

Here is the code I am using:

{call_req.ref_num} = {?Pm-call_req.ref_num} and
{ctct.c_last_name} like "*395 desktop*" and
{act_log.type} = "CB"

If I add this code to the end:

if isnull({act_log.type})
then {act_log.type} = "Unassigned"

It returns "A Boolean is required here".

I can't figure out how to break out the first two
conditions, test for null or "CB" and print the
"CB" records and the null records with "Unassigned"
where the "null is".

Any help would be greatly appreciated!

 
Hi,
Instead of using the test for null as part of the selection formula, create a new formula ( maybe like this):

Name it anything you like then enter:
Code:
if isnull({act_log.type}) 
then {act_log.type} = "Unassigned" else
{act_log.type}

Use this formula instead of the actual field in your report.

hth,
[profile]

 
Thank you very much!
I'll try it right now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top