Print Page | Close Window

Problem with drop down list

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17980
Printed Date: 05 Apr 2025 at 6:35am


Topic: Problem with drop down list
Posted By: totoune
Subject: Problem with drop down list
Date Posted: 09 Nov 2012 at 11:07am
Dear experts,

i am developing a report using crystal 2008. i have a parameter as dropdown list and i have put it as optional and in the selection formulas i have put the following:
(
if ( isNULL({?fav2@select code,name from [@z_cust]})


or not hasvalue({?fav2@select code,name from [@z_cust]})

or ({?fav2@select code,name from [@z_cust]}) = '')


then {_Z_CUST.code}='999'

else
({_Z_CUST.code}= {?fav2@select code,name from [@z_cust]}))


The problem is if i don't select anything from the dropdown list it is giving an error "Parameter has no value"

thanks



Replies:
Posted By: lockwelle
Date Posted: 10 Nov 2012 at 4:09am
I don't use the parameter screen or the selection formulas, so this is a bit off for me, but have you tried checking the box on the paramter screen 'Is Null'?
 
that might get you past some of the issues.
 
the only other idea is time the parameter and compare against teh empty string.
You can also try "" instead of '' though both should work
 
it's at least worth a try



Print Page | Close Window