Solved

Crystal Reports Parameter / Null question

Posted on 2006-07-12
5
249 Views
Last Modified: 2008-03-04
I am trying to create a parameter that can/cannot be used in a report. For some reason, if they don't put anything in the parameter, it prints everything, and if they do, it prints everything as well. I tried having the select expert only print records that were = to the parameter, but then it requires something in the parameter. Any clue on how I can include a parameter that if they enter something, it filters by, but if they leave blank, it prints everything?
0
Comment
Question by:hwgtech
5 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 17095213
Hi hwgtech,
I think the approach depends on which version of CR you have.

In CR11 you could set a default value for the parameter which would indicate no selection had been made.
Then in your record selection you would use a formula like:

If {?paramfield} = 999999 then   //999999 indicates 'all values'
true
else if {mytable.myfield} >{?paramfield} then
true
else
false

Pete
0
 
LVL 34

Expert Comment

by:James0628
ID: 17095564
Like Pete said, it may depend on which version of CR you're using, but in CR 10, I can use a formula in the record selection like the following and if I don't enter anything for the parameter, I get everything.

{?param} = "" or {field} = {?param}

 James
0
 

Author Comment

by:hwgtech
ID: 17096002
I am using 8.5 with saleslogix CRM. I tried both and nothing! Any other suggestions?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 17096660
Try something a little simpler

if {?MyParameter} = "ALL" then
  TRUE
else
   {table.MyField} = {?MyParameter}

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17267850
Glad i could help

mlmcc
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

13 Experts available now in Live!

Get 1:1 Help Now