Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic parameters odd behavior in CR 2008 Post Reply Post New Topic
Author Message
HugoM
Newbie
Newbie
Avatar

Joined: 11 Nov 2010
Location: Australia
Online Status: Offline
Posts: 1
Quote HugoM Replybullet Topic: Dynamic parameters odd behavior in CR 2008
     Posted: 11 Nov 2010 at 5:28pm
Hi everyone,
 
I having problems using dynamic parameters in Crystal 2008 SP2; this is a sample of the table I'm using:
 
Country    Division   Team
USA          Finance   Team 1
USA          IT           Team 1
Canada     Finance   Team 2
 
 
I'm creating the parameters with the option 'allow multiple values', and I'm cascading the values (Country, Division, Team).
 
If for example I only select USA, I have Finance and IT, and then I can select team 1; which is correct.
 
If I select Canada, then I have only Finance, and then Team 2; which is also correct.
 
Now when I select the two countries: USA and Canada; I have the two divisions: Finance and It; then I select Finance.
 
I was expecting to have both Team 1 & 2, but Cyrstal reports is showing only one team, and the Team displayed is based on which Country is listed first on the 'Selected Values' window. For example I select Canada and the USA the Team listed after selecting Finance is Team 2; if I select USA and then Canada Team 1 is listed after selecting the Finance Division.  (????)
 
Does someone knows the reason and/or a workaround?
 
I was expecting the parameters would select the team as 'select distinct team from table1 where country in ('Canada','USA') and division in ('Finance').
 
Note: I cannot change the values on the table or the order of the fields.
 
Any help will be highly appreciated.
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Nov 2010 at 3:51am
you probably need to do an IN [] sort of statement.  I haven't used CR parameters in years, but what you are describing sounds like CR filling an array.  You are only looking at the first member of the array, which is not the complete picture.
 
The syntax may be a little off (you can check in help) but I would try something like:
{table.field} IN {?parameter}
 
HTH
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