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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum number of parameter values - Crystal XI

Status
Not open for further replies.

pontupo

Technical User
Jul 9, 2007
33
US
Is there a maximum number of values that a parameter is able to have? Specifically, I'm interested in creating either a static parameter or dynamic parameter that has a very long list of possible values from a database. However, in both cases the list of values gets cut off around "S" and Crystal won't import the full list. :'(

Pont
 
There is a registry setting that limits this. I believe it is ordinarily set to 1000 in XI. I would use a command to populate the list where you can limit the values to less than 1000. Or, if you do a search, you could find a reference to the specific registry setting.

-LB
 
If you put your values into an Excel spreadsheet, you could use it as a table to be read by the Crystal.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
lbass:
What kind of a command can you use to populate the list?

I'll take a stab at finding that registry setting. I don't see any particular reason to limit that list of values (obviously I wouldn't want to put a million values in there... but my list isn't -that- long!).

Madawc:
My values are in a table in the database now. Does it make a difference if Cystal reads the values from a database or an Excel file?
 
Thanks for the help, lbass.

Here is a link to the article I located on the BO Support website for modifying the registry in CR XI release 1 and 2:

Note: the article discusses extending the number of values in a dynamic parameter, but the same technique applies to static parameters whose values are populated by appending database values.

Note also that there is some discussion of it on these forums here: but that article is out of date and modifying those registry settings does nothing.
 
Are you all set then? Or do you still want to pursue the command approach?

-LB
 
I'm all set, though if you're willing, I'm still curious about what that approach would be...
 
Interesting. I now receive what I think is basically a null pointer exception and CR crashes when I actually apply these parameters. I can get the full list into the list of values... but I'm not sure that I can actually utilize the resulting parameter. Still investigating...

Pont
 
Here's the error, found through debugging with VisualStudio:
Unhandled exception at 0x012ac991 in crw32.exe: 0xC0000005: Access violation reading location 0x00000000.
 
OK, I guess I spoke too soon. Restarting -seems- to have eliminated the error. Oddly, the report wasn't working properly even when I moved it to the webserver and my ASP reports portal, so something was definitely wrong with it, though it could have just been caused by my computer being confused by registry changes.

I'd recommend that if you follow the above posts and modify your registry (a scary thing to begin with) you be sure to backup your registry ahead of time. Further, restart your computer before taking advantage of the changes. Delete any parameters in the report your trying to pull a large number of values into and recreate them as well.
 
There was no special approach in using a command, it is just that by creating a command, you can add a where clause that limits the values available to be within the limits set in your registry. Then you would reference the command instead of a table when setting up your list of values.

-LB
 
Would this command be on the database end then? Like a stored procedure or a function?
 
If you go to database->database expert->your datasource, you will see "Add command" above the list of your tables--if your datasource supports this. Here you can enter a SQL query directly. Commands can be used as entire datasources for a report (like a view) or can be used to populate lists of parameter values (without linking to any other tables; be sure NOT to use any fields from the command in the report proper), or can be linked to tables (although this will slow your report).

-LB
 
Very interesting. I'll definitely be exploring the use of these Commands.... I think I noticed that menu option before, but have never tried them out.

In my particular case, I was pulling a field that is from a database view that was setup specifically to limit the list of values already... so although I could set up a command to further filter the list, I'd have to come up with something smart to help me decide what values to exclude.

Still, I can definitely see how these can be useful.
Thanks much,

Pont
 
Just to add to this. I can run a separate query that has many thousands of rows and export to a text file. Then in the static parameter I can import the entire text file(all rows). Obviously not good for dynamic parameters, but still worth mentioning maybe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top