Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Problem with drop down list Post Reply Post New Topic
Author Message
totoune
Newbie
Newbie
Avatar

Joined: 16 Feb 2012
Location: Lebanon
Online Status: Offline
Posts: 5
Quote totoune Replybullet Topic: Problem with drop down list
    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
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.