Crystal Reports Parameter / Null question

Posted on 2006-07-12
Medium Priority
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?
Question by:hwgtech
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
LVL 77

Expert Comment

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'
else if {mytable.myfield} >{?paramfield} then

LVL 35

Expert Comment

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}


Author Comment

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

Accepted Solution

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

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

LVL 101

Expert Comment

ID: 17267850
Glad i could help


Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free 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

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…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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