Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter group problem Post Reply Post New Topic
Author Message
savethepennies
Newbie
Newbie
Avatar

Joined: 14 Oct 2009
Online Status: Offline
Posts: 14
Quote savethepennies Replybullet Topic: Parameter group problem
     Posted: 04 Dec 2009 at 4:16pm
Hopefully I can explain this enough that it makes sense. I have a report where I have set up a parameter group with two parameters, school and class. This was the only way I could see to make the class values dependent on the selected school value. The parameters are dynamic and based on id and name fields in tables in the database. The parameter group works in that when a school is selected the class dropdown only contains the classes that belong to the selected school.
 
The problem is that for some reason the school dropdown list does not contain near the number of schools that it should. If I set up a parameter just for school I get everything that I would expect. But for some reason when I add the dependent parameter for class the majority of schools do not appear in the list. Unfortunately I can't just create two separate parameters since there would be a ridiculous amount of classes to choose from and duplicate names that would make it impossible for the user to get the right class for the selected school.
 
I have tried setting up the parameters different ways with the same result each time. I went so far as to create a view in the database so that school and class information would be seen as if it were in the same table but that did not make a difference either. Running a query on what I would think crystal is doing gives me all the schools.
 
I would appreciate any ideas since I am stumped. Please don't think, "Oh, I'm sure he tried that so I won't comment." Hopefully I'm not overlooking something simple but I won't pretend it hasn't happened.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Dec 2009 at 6:15am
I am guessing that you are using the cascading parameters, and the only thing that comes to mind is that there isn't data for all the classes in all the schools, and crystal is eliminating the ones that are empty.
 
I would have thought that the view would have worked.
 
Since you mentioned the view, have you tried the command object?
 
IP IP Logged
savethepennies
Newbie
Newbie
Avatar

Joined: 14 Oct 2009
Online Status: Offline
Posts: 14
Quote savethepennies Replybullet Posted: 07 Dec 2009 at 7:59am
An interesting thought. If Crystal is eliminating selections with empty data I wonder how it makes that determination. I am using a stored procedure as the data source and doubt Crystal would be able to scan through school/class combinations to determine which do not have data in any reasonable amount of time.
I have not tried using the command object for the parameters but I can certainly do so. Thanks for the ideas.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Dec 2009 at 10:55am
if all of the data is coming from a stored proc (seems few people use sp's for CR), I don't see that as a reason for CR to dump the parameter, because as you pointed out, CR doesn't 'know' that there is no data.
IP IP Logged
savethepennies
Newbie
Newbie
Avatar

Joined: 14 Oct 2009
Online Status: Offline
Posts: 14
Quote savethepennies Replybullet Posted: 07 Dec 2009 at 10:57am

The behavior changed when I created a command and based the parameters on that command. The parameter dropdown list did contain more schools but not all. For some reason it stopped at "H" and did not show any after that point. Different but not necessarily better.

I did find a post indicating that this might be an issue/bug. Apparently Crystal has problems with Dynamic Cascading Prompts.
 
The last posts refer to a fix pack that resolves the issue but I am having a heck of a time trying to get the download for CR2008.
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Dec 2009 at 11:20am
Sorry can't be of more help. My company moved away from the CR parameter screen and into custom wizards, so I don't have these problems...just ones of my own making.
IP IP Logged
savethepennies
Newbie
Newbie
Avatar

Joined: 14 Oct 2009
Online Status: Offline
Posts: 14
Quote savethepennies Replybullet Posted: 07 Dec 2009 at 12:19pm
I appreciate the ideas either way. We are very likely going to be switching the way we handle prompting and displaying reports very soon.
 
I did just get a response in the SAP forums saying that the fix is not available for CR2008 and will be included in sp3. Ugh. So I'm going to try and figure out a viable (and quick) workaround.
IP IP Logged
savethepennies
Newbie
Newbie
Avatar

Joined: 14 Oct 2009
Online Status: Offline
Posts: 14
Quote savethepennies Replybullet Posted: 08 Dec 2009 at 3:39pm
After way too many searches and attempts to make something work I discovered that the issue is not a bug. Instead it is an unexpected (and as typically is the case, undocumented) behavior in Crystal. I am providing an explanation so that others who come across the thread might have an answer since I found none in my searching.
 
Hopefully users are aware that there is a limitation on the number of records Crystal will show in parameter dropdowns (or LOVs). By default this is 1000 records which becomes 5 pages in CR2008 LOVs. This limit can be overcome with a registry tweak. When cascading parameters are used the entire group is subject to the limitation, not the individual dropdowns. The limit must be high enough to account for all combinations in the cascaded group. Unfortunately I have not found a value that equates to unlimited in CR2008. The -1 accomplished that in XI but no longer appears to work. I set mine up to 500k and figured that should account for my scenarios.
 
It seems I can now give my head a break until the next report.
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