Solved

Crystal Reports Parameter / Null question

Posted on 2006-07-12
5
255 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
[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 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 35

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 101

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 101

Expert Comment

by:mlmcc
ID: 17267850
Glad i could help

mlmcc
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

729 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