Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

618 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