Solved

Using Switch and IsNull commands together - Crystal XI

Posted on 2011-02-14
5
628 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
  • 3
  • 2
5 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 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 100

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now