Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Commands and Multi-Value Prompts Post Reply Post New Topic
Author Message
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Topic: Commands and Multi-Value Prompts
     Posted: 31 May 2011 at 2:11pm
I'm having a problem with a report that I'm working on.  The report uses a number of commands that have parameters.  The 3 parameters that are causing me problems are string parameters that can have multiple values, with a default value of 'All'.
 
In the commands, the parameters are used like this:
   and ('All' in ({?param_dept_m})  or team.GS_ASSOC_DEPT in ({?param_dept_m}))
   and ('All' in ({?param_funct_group_m}) or exists (
     Select 'X'
     from GS_FUNC_GROUP_FLAT_V grp
     where team.GS_FUNCT_GRP = grp.CHILD_CODE
       and grp.PARENT_CODE in ({?param_funct_group_m})) )
   and ('All' in ({?param_funct_team_m}) or team.CODE in ({?param_funct_team_m}))
When I leave the default of All or enter a single value in each parameter, everything works fine.  When I enter multiple values I get the following error:
 
Failed to retrieve data from the database.  Details:  ORA-00907: missing right parenthesis [Database Vendor Code: 907]
 
Oracle version is 11g.  Crystal version is 2008 SP3 with no fix packs.
 
For all of the work I've done in Crystal over the years, this is the first time that I've worked with multi-value prompts in commands and I'm stumped.
 
Thanks!
 
-Dell


Edited by hilfy - 31 May 2011 at 2:12pm
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 01 Jun 2011 at 4:07am
check out this thread from another site. it may help you with commands and paramters
sharona
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 01 Jun 2011 at 7:32am
Actually, all I had to do was take out the parentheses around the parameters.  It works if I do this:
and ('All' in {?param_dept_m}  or team.GS_ASSOC_DEPT in {?param_dept_m})   
and ('All' in {?param_funct_group_m} 
  or exists (
    Select 'X'
    from GS_FUNC_GROUP_FLAT_V grp
    where team.GS_FUNCT_GRP = grp.CHILD_CODE
      and grp.PARENT_CODE in {?param_funct_group_m}))   
and ('All' in {?param_funct_team_m} or team.CODE in {?param_funct_team_m})
 
-Dell
IP IP Logged
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