Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Group selection via Parameter Post Reply Post New Topic
Author Message
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Topic: Group selection via Parameter
    Posted: 27 Feb 2012 at 3:10am
Hello,
 
Quick question. Im struggling here.
 
I have a simple report to show the yearly quarters sales by CUSTOMER.
 
amongst our customers, we have different BRAND DEALERS for different brands.
 
These dealers are identified in our database by a boolean field.
 
there are only 5 different types of brand dealers giving me 5 boolean fields.
 
{KUcheck}
{FAcheck}
{GEcheck}
{TOcheck}
{GTcheck}
 
I have these parameters in my report;
 
PERIOD
 
YEAR
 
BRAND
 
 
What I want to do is, if the brand parameter selected by the user, is say "KU" , then I want to have my customers group only show customers who have {KUcheck}=TRUE,
 
and so on for the other 5 brands.
 
I have tried to enter this formula into the Select Expert under the GROUP selection part:
 
IF {?brand}="KU" THEN {Table.KUcheck}=TRUE ELSE
IF {?brand}="FA" THEN  {Table.FAcheck}=TRUE ELSE
IF {?brand}="GE" THEN {Table.GEcheck}=TRUE ELSE
IF {?brand}="GT" THEN {Table.GTcheck}=TRUE ELSE
IF {?brand}="TO" THEN {Table.TOcheck}=TRUE
 
 
But this is not working. It is returning ALL customers.
 
 
Can anyone advise please?
 
 
Thanks in Advance,
 
mike.
 
Regards,

Michael Jones
IP IP Logged
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Posted: 27 Feb 2012 at 3:31am
{TABLE.YEAR} = {?Year} and
{TABLE.MANUFCTR} = {?Brand} and
(IF {?brand}="KU" THEN {TABLE.KUCHECK}=TRUE ELSE
IF {?brand}="FA" THEN {TABLE.FACHECK}=TRUE ELSE
IF {?brand}="GE" THEN {TABLE.GECHECK}=TRUE ELSE
IF {?brand}="GT" THEN {TABLE.GTCHECK}=TRUE ELSE
IF {?brand}="TO" THEN {TABLE.TOCHECK}=TRUE ELSE
FALSE)
 
 
Sorted it. I put the above forumla in the record selection expert and it works just how I need it to.
 
 
Regards,

Michael Jones
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.047 seconds.