Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about parameters crystal 8.5 1

Status
Not open for further replies.

mdieckman

MIS
Nov 21, 2006
88
US
I have created a parameter in crystal 8.5 to input a list of member #s. I am using the import pick list function on the parameter to import a list of values from a text file. My question is: Is there any function in crystal 8.5 that allows a select all function?

Importing the pick list gives me the list of values I want, but if I wanted all of them I would still need to add each one when the parameter pops up. I would just create a subreport, but the way the database is designed, it takes forever for the report to run so I'm thinking this is the route I'd like to go, but having to click add through 1000 member ids isn't going to cut it either.

Any suggestions?
 
You could do a pair of parameters, one of which says 'select everything'. Base your test on either select all or match the selected value.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Could you give me an example please?

Do you actually make a parameter that says says 'select everything' as a value? I'm not sure that I follow exactly what you are saying. I'm kind of a newb with Crystal. It would be so much easier if Crystal just had a Select All button when the parameter pops up...

Right now, I just have a parameter {?input} and I have imported a list of values into that parameter.

Thanks for your help.

 
Alrighty, I think I'm getting somewhere.

I'm not sure if this logic will work in my record selection:

Basically, I want to say, if it doesn't equal ALL then select whatever the user inputs and if they select ALL I want it to select all the items in my imported list. Can anybody tell me if I can do this and how? Basically, if I can do it, what do I need to put in after the else if?

(
if {?input} <> "ALL" then
{@MEMID} = {?input}
else if {?input} = "ALL" then

)
 
(
if {?input} <> "ALL" then
{@MEMID} = {?input} else
if {?input} = "ALL" then
true
)

You also need to add "ALL" to your list of values.

-LB
 
Thanks LB. Now will saying true give me all records in the database or just the items in my imported list?
 
All in the database. If you want only those in your list, then set it up like this:

(
if {?input} <> "ALL" then
{@MEMID} = {?input} else
if {?input} = "ALL" then
{@MEMID in ["val1","val2","val3"] //etc.
)

-LB
 
Doh, I was hoping this could be dynamic. The list can change from each time it is run. I was hoping Crystal was smart enough for me to say all values in my imported list without actually having to manually figit with any SQL or actually change anything. I'll just do it in SQL if that's the case as it's just as easy for me. I appreciate your help though. This process will help me for other reports where the values don't change.

Thanks!
 
Crystal is smart enough to use dynamic parameters, in fact dynamic cascading parameters based on a hierarchy, however you are using an old version of Crystal. Granted, it should have been in CR 8.5 too, and most complained bitterly about their inattentiveness to this base requirement, but one you move to CR XI you'll have dynamic parameters.

There are also 3rd party products that support dynamic parameters:


-k
 
You could consider upgrading. In CR XI, you can select all values from a list of values simultaneously, if you wish.

-LB
 
Bummer...apparantly we are upgrading to version 10 soon. 10 doesn't have this feature either?
 
Regarding this post, i want to add this:
I am using CR XI R2, and i am running the report from a Java application, using the given API.
However, i can not update the ListOfValues of the dynamic parameter before running a new report.
I hoped this was done automatically, but i can notice that ListOfValues objects are always null, when i call the Refresh Action.

Do you have an ideea (even code samples) on how to update the LOV (list of values) when the database changes?

10x

PS: it works fine from the Crystal designer, but not Java code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top