Print Page | Close Window

Dynamic Parameter Select All

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
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=9508
Printed Date: 02 May 2024 at 3:08pm


Topic: Dynamic Parameter Select All
Posted By: yggdrasil
Subject: Dynamic Parameter Select All
Date Posted: 26 Mar 2010 at 1:13am
I have a report with a dynamic parameter which allows multiple values.
You can select names a few at a time, or click on the double arrow to select all names on the list.
My users want the names selected to show in the title of the report.
So far, so good, but when they have selected all, they want the word 'All' in the title. When we were using static parameters, it was always an option.
But this list of names is very fluid, and it needs a dynamic parameter to avoid constant maintenance.
I can give them the list, but is there any way to determine if they have clicked on that double arrow?
TIA




Replies:
Posted By: lockwelle
Date Posted: 26 Mar 2010 at 3:44am
you could try using a command object to give the option of ALL (simple UNION) and then code the report accordingly.
 
At least that is what I would try first.
 
HTH


Posted By: yggdrasil
Date Posted: 26 Mar 2010 at 5:13am
That is a great idea.
 I've got it working for the main report just as I wanted.
I still have to make it cross to the linked subreport, but I'm getting there
Thank you


Posted By: yggdrasil
Date Posted: 31 Mar 2010 at 1:14am
I was a bit too premature there. I can get All as a parameter option, but I cannot work out how to make the report use all the possible people when I do.

I did have "{PEOPLE_LOOKUP.FULLNAME_SFI} = {?Caseworker} " in the report selection, and that works well if they select any particular ones or the lot.      But   if {?Caseworker} = 'All'  how do I get all of them in to the calculations? 
Maybe I have the sql command wrong, I put
 SELECT rc.ROLE_CODE,  plk.FULLNAME_SFI
 FROM   (ROLE_CODE rc INNER JOIN ROLE_LINK rl
ON rc.ROLE_CODE=rl.ROLE_CODE)
INNER JOIN PEOPLE_LOOKUP plk ON rl.PERSON_ID=plk.PERSON_ID
 WHERE  rc.ROLE_CODE='CSSS'
union
select rc.ROLE_CODE, 'All' from  ROLE_CODE rc  WHERE  rc.ROLE_CODE='CSSS'



Posted By: lockwelle
Date Posted: 01 Apr 2010 at 3:09am
The report selection is basically returning a true or a false to include or exclude the record, so you can modify the if statement to be something like:
 
{PEOPLE_LOOKUP.FULLNAME_SFI} = {?Caseworker} OR {PEOPLE_LOOKUP.FULLNAME_SFI} = "All"
 
HTH



Print Page | Close Window