[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Parameter with Value, or Null or empty sting.

Posted on 2013-05-17
6
Medium Priority
?
322 Views
Last Modified: 2013-05-25
I have a question regarding parameter that could have value or Null value or empty string “” value.


For example I have report with four fields: field1,field2,field3,field4.
For every field I  have parmeter Par1,Par2,Par3,Par4.

I understand that parameter is filter applied in selection criteria against a field.
Records will be selected based on value or values of the parameter or parameters for the field or fields.

Sometimes user asks for option to have specific values, multiple values or All values option for particular parameter.
I am ok with that  situation and I know how to provide it and what this selection will bring back.

However I was not sure about situation when there are scenario that in the same filed could be values and could be null values too and user ask selection on this way to be done:
 
You have parameter e.g.  Par3 for that field3. In report as I mentioned you have  other fields with their parameters.
You select other fields based on their parameter values  and you came to the Par3 you select value and for example there is no value-match for that filed it means complete record will not be pulled out,  does not matter that other fields have value.

Lot of times  customer wants and  asks  to pull out that record  out and show empty field in our case  field3 that Par3 was filtering and hit Null or empty string.
I never was sure how to provide it.
Any Idea?
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
  • 3
  • 2
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39175843
SO if Par3 has 45 as the value to look for what you want is 45 or NULL?

(IsNull({Field3}  OR {?Par3} = {Field3})

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 39176996
Do you want to allow the user to specifically ask for the records where field X is null or an empty string (instead of asking for some other value), or do you want to include those records, no matter what value the user asked for?

 mlmcc's suggestion should give you the second one, although he left out the ")" for the IsNull function:

(IsNull({Field3}) OR {?Par3} = {Field3})


 If you want to allow the user to specifically ask for the null values, you could have a special parameter value for that.  One obvious choice would be "Null", assuming that your field will never be that string.  Then that part of the formula would look something like:

(
({?Par3} = "Null" and IsNull ({Field3})) or
 {?Par3} = {Field3}
)


 If you want them to be able to ask for the records where the field is an empty string, they could just enter an empty string in the parameter.  If you want to combine that with the "Null" option, so that it gives you both the null and empty string records, you could use:

(
({?Par3} = "Null" and (IsNull ({Field3}) or {Field3} = "")) or
 {?Par3} = {Field3}
)


 James
0
 

Author Comment

by:Taras
ID: 39190720
James I am interested in for that first  option you mentioned.

 Let say can we put both option empty string “” and Null value for the field3  as “NoEntry”.
To not confuse user with "" or "Null" , he see that as no entry.

Now when parameter is opened in front of the user he sees next choices e.g. :
A
B
C
D
NoEntry.

If he wants e.g.  A and B   he will pick up A and B and selection will pull only records for A and B no other.
If he wants A and B plus those with empty string or Null values he  will select :  A, B, NoEntry.

How code with Par3 looks for this?
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 39191893
I think it would just be something like this:

(
({?Par3} = "NoEntry" and (IsNull ({Field3}) or {Field3} = "")) or
 {?Par3} = {Field3}
)


 James
0
 

Author Closing Comment

by:Taras
ID: 39194738
Thanks a lot.
0
 
LVL 35

Expert Comment

by:James0628
ID: 39196416
You're welcome.  Glad I could help.

 James
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 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