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

Parameter pick list 2

Status
Not open for further replies.

thread

Technical User
Mar 20, 2001
41
US
Using Crystal 7 - I have created a parameter for "keyname" that I use to select which students for whom to run the report. To create the pick list, I choose discreet values, multiple values and allow the user to change the value if necessary. I added all of the names from my database (using the add all function) but when I run the report and use the drop down list from my parameter, I do not get all of the names (there are 1500 or so) - The ones that are missing are scattered through the list. If I choose to run all students the missing students show up on the report and if I type the name into the parameter field, they show up also - They just don't appear in my drop down list for my parameter! Any suggestions? - Thanks!
 
Under file, options, database tab, make sure "select distinct data for browsing" is selected. This will allow for better, if not perfect, data import when you initially build your default values list.

In terms of the default list being updated, please see FAQ149-1485 on dynamic parameter default values.

Please post again if you have any questions/comments. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
If you are referring to the drop down list not containing all entries for a particular field, this is because of default settings where the report will only grab the first 8 seconds worth of data (bit rusty here on the exact amount of time it browses.) if this is the issue, let me know and I'll dig up the solution on how to get the pick list to return all data on a field. Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Thanks for the answers - dgillz - I don't appear to have that particular option on my database tab - perhaps that is version related?
Bruce - Yes, I am not finding all the entries on my drop down tab. Thanks to both of you for your help! - Gail
 
The "add-all" that you refer to adds all of the values that APPEAR in the browse sample list. This is usually not all of the values in the database. By default, CR will only show values from the first 500 records in that table. Check the list stored in the parameter and you will probably see that it doesn't contain all of the values.

To get them all in you can create a text file of the values and import it as a pick list. To get the format of the text file I would export your current list and open the text file. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The default is set by a browsetime limit, along with the maxbrowsevalues.. I found the info I was looking for and here is the solution if you want to pull directly from your database:


· browse more records than those displayed in the Browse Fields window

· populate the default values for a parameter with more database field records?


Solution

The number of records browsed, and the number of records used to populate default values for a parameter are determined by two items in the Windows registry:

· Browse Timeout - specifies how long (in seconds) Crystal Reports browses the data in your database

· MaxNBrowseValues - specifies how many records Crystal Reports browses in your database

Once the conditions have been satisfied for one of these items, Crystal Reports stops browsing the database.

WARNING============

The Windows registry stores configuration data that is crucial to the operation of the Windows operating system. Only people experienced with using the Windows registry should undertake the following steps. Do NOT modify the registry if any of these steps are confusing to you.

=====================

To access the BrowseTimeOut and MaxNBrowseValues items in the registry:

1. Close Crystal Reports (CR). This ensures the following changes are saved.

2. In Windows 9x/NT, go to 'Start' then click 'Run'.

3. Type 'Regedit' (no quotes), then click 'OK'. This opens the Registry Editor.

4. Drill down as shown below.

· If you have version 5 of CR, drill-down to following registry subkey:

HKEY_CURRENT_USER\Software\Crystal Software\Crystal Reports\DatabaseServer

· If you have version 6, 7, or 8 of CR, drill-down to following registry subkey:

HKEY_CURRENT_USER\Software\Seagate Software\Crystal Reports\ DatabaseServer

5. To change how long CR browses the data in your database:

· Double-click the BrowseTimeout item. This opens the 'Edit DWORD Value' dialog box.

· In the 'Base' section, select 'Decimal'

· In the 'Value Data' box, type in the maximum number of seconds you CR to spend reading your database before stopping and displaying all unique values it found. Entering zero disables the timeout option.

· Click OK to save the change.

6. To change how many records CR browses in your database:

· Double-click the MaxNBrowseValues item. This opens the 'Edit DWORD Value' dialog box.

· In the 'Base' section, select 'Decimal'.

· In the Value Data box, type in the maximum number of records you want CR to read before stopping and displaying all unique values it found.

· Click OK to save the change.


7. On the 'Registry' menu click 'Exit'

8. Restart Windows.

The next time you re-open Crystal Reports, these changes will be in effect.
Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Thanks - I'm going to try the registry changes today - I'll fill you in on the results - Gail
 
Bruce - You are the man! It works beautifully! - Thanks - Gail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top