?
Solved

CR Parameter for Null and empty string

Posted on 2013-05-16
10
Medium Priority
?
360 Views
Last Modified: 2013-05-17
I have issue with a parameter in CR XI R2 ver.

Report has several fields and several parameters.
One of Parameter is used against a field that could have next values:
 Full,
Three quarter full,
Half full,
One quarter full.
Unknown.

Problem is that this field could have value Null and it could be empty too.

Case is more complicated as user wants to show particular record even if this field do not have value it means if record for this field has value Null or is empty and show on report as  Unknown.
It means that Unknown actually covers three values first sting: Unknown ,second: Null  and thired  empty string.

Any Idea how to do this?
0
Comment
Question by:Taras
[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
  • 5
  • 5
10 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39172836
SOmething like


(
(
{?Parameter} = "Unknown"
AND
(
IsNull({Field}
OR
{Field} = ""
)
)
OR
{?Parameter} = {Field}
)

mlmcc
0
 

Author Comment

by:Taras
ID: 39173571
What is with bracket after IsNull
(
(
{?Parameter} = "Unknown"
AND
(
IsNull({Field})<<<<
OR
{Field} = ""
)
)
OR
{?Parameter} = {Field}
)
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39173584
Database felds and Crystal objects  are inserted with { } around them.

mlmcc
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 

Author Comment

by:Taras
ID: 39173651
mlmc.
Count brackets opened and count brackets closed.????
something is missing.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39173699
What error are you getting?

Can you copy and paste your formula?

mlmcc
0
 

Author Comment

by:Taras
ID: 39173742
Before I had.

{Field1}  = {?Par1} and
not {Field2} and
{field3}= {?Par3} and
{field4} in {?Date From:} to {?Date To:} and
{field5} in{?Amount_From:}to {?Amount_To:} and
{field6} = {?Par6} and
{field7} = "" and
{field8} = {?Par8} and
{field9} = {?Par9}



Now I have as you sugested

{Field1}  = {?Par1} and
not {Field2} and


(
(
{?Par3} = "Unknown"
AND
(
IsNull({field3}
OR
{field3} = ""
)
)
OR
{?Par3} = {field3}
)
and


{field4} in {?Deadline Date From:}to{?Deadline Date To:} and
{field5} in{?Amount_From:}to {?Amount_To:} and
{field6} = {?Par6} and
{field7} = "" and
{field8} = {?Par8} and
{field9} = {?Par9}

I am geting error missing ")"
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39174095
You are missing the ) on the IsNull

IsNull( {Field1} )

mlmcc
0
 

Author Comment

by:Taras
ID: 39175324
It is showing them now but not as "Unknown"  just as empty fileds.
I need to show:  empty, null and Unknown as Unknown in report???

I have question regarding this approach.

As parameter work on base to exclude all other records if they do not have parameter value.
I have users that sometimes ask for parameter for a filed to be present as option but not exclude records that have no entry or Null in that filed. They still want to see them beside selected parameter fileds.

With your suggestion is this way that I can apply this option on any filed that has parameter in report, and it will pull empty or Null filed value  out,  beside selected values for parameter filed?

Do I sound confused.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39175598
Your question was how to select the records you wanted.  To convert the field to UNKNOWN you need a formula

If IsNull({Field3}) OR {Field3} = "" then
     "Unknown"
Else
     {Field3}

mlmcc
0
 

Author Closing Comment

by:Taras
ID: 39175629
mlmcc :-)
thanks a lot.
I will post another question for rest.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

649 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