[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Crystal Formula-Null values

Posted on 2013-05-16
2
Medium Priority
?
494 Views
Last Modified: 2013-05-28
Hello all,
I have a crystal formula as below:
When any one of the field is null the report doesnt display data.How can I rewrite or handle this.
{Patients.NsID}+ " / " +{Patients.Room} +" / "+{Patients.Bed}

Open in new window

0
Comment
Question by:Star79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1000 total points
ID: 39173015
Try this

Local StringVar strOutput;
If Not IsNull({Patients.NsID}) Then
    strOutput := {Patients.NsID} + " / "
Else
    strOutput  := " / ";

If Not IsNull({Patients.Room}) Then
    strOutput  := strOutput  + {Patients.Room} + " / "
Else
    strOutput  := strOutput  + " / ";

If Not IsNull({Patients.Bed}) Then
    strOutput  := strOutput  + {Patients.Bed};

strOutput

Open in new window


mlmcc
0
 
LVL 35

Accepted Solution

by:
James0628 earned 1000 total points
ID: 39174281
You could also go to File > "Report Options" and check the "Convert database null values to default" option and a null field will be replaced by an empty string.  That option will effect almost every formula in a report, so if you actually need to see nulls in some formulas, you may not want to use that option.

 More recent versions of CR also include an option in the formula editor to control how that specific formula treats nulls, so you could see if you have that option.

 James
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

656 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