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

x
?
Solved

Using Switch and IsNull commands together - Crystal XI

Posted on 2011-02-14
5
Medium Priority
?
635 Views
Last Modified: 2012-05-11
I am using the Switch command with success untilllooking for the NULL.  See attachment.  The following 2 codes work but do not find  NULL and replace it with "Unknown".
switch ({C_BILLING.PatientType}like "E", "Emergency Room",
        {C_BILLING.PatientType}like "I", "Inpatient",
        {C_BILLING.PatientType}like "O", "Outpatient",
        {C_BILLING.PatientType}like ' ', "Unknown Account(s)")
OR
iif (IsNULL ({C_BILLING.PatientType}),"Unknown",
switch ({C_BILLING.PatientType}like "E", "Emergency Roomx",
        {C_BILLING.PatientType}like "I", "Inpatient",
        {C_BILLING.PatientType}like "O", "Outpatient"))

For testing,
I used:   iif (IsNULL ({C_BILLING.PatientType}),"Unknown", "xx")
It worked to return the "unknown".

What is wrong that will not allow either one of the first two codes to work?
Thank you....



Crystal-Help.jpg
0
Comment
Question by:rwarren99
[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
  • 3
  • 2
5 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 34890170
I don't know why those don't work

I would do it as

If IsNull({C_BILLING.PatientType}) then
    "Unknown"
Else
    Your Switch or if statements.

mlmcc
0
 

Author Comment

by:rwarren99
ID: 34891434
THAT WORKED ...
THANK YOU...

I am running XI 11.5.8.826
Any reason why my code would not work?
Thanks Again...
0
 

Author Closing Comment

by:rwarren99
ID: 34891452
Thank you for the assistance...
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34894041
As I stated, I don't know of a reason it doesn't.  It seems like it should but that may just be the way an iif works.

mlmcc
0
 

Author Comment

by:rwarren99
ID: 34895662
Thank you again for your assistance....
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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 Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

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