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

Dynamic Drop Down List Box for Parameters 2

Status
Not open for further replies.

dbielenda

MIS
Nov 15, 2001
119
US
Has anyone ever been able to create dynamic drop down list boxes for parameters in Crystal Reports Version 8.5? If so, how did you go about doing this? I do not have much programming experience, but would like to enhance future reports with this feature. Thank you! s-)

 
Hi Dbielenda,

If by "dynamic" you mean a list of parameters "outside"
Crystal, this can't be done. The best you can hope for is setting up defaults or a "pick list" within the report itself. If something changes, you have to modify the report manually.

Nuffsaid.
 
Its just that it would be nice if the user can pick from a list instead of having to type it in. The database changes very often, so to go back and change the report would be inefficient. I read that it can be done with Visual Basic or Seagate Info? Thanks for your input!
 
When you set default values for a paramter, you can browse from table, and browse from field, and then take the dataset it returns to easily create default values in a drop down box (it beats keying it all in).

But, as Nuffsaid reported, it is not dynamic. However, you can mass delete and mass add all the values in th emethod I outlined above in a matter of minutes. Unless your database is really changing rapidly this should suffice.

However crystal decisions if you are listening we need this to be dynamic. Actually a paramter that limited the entry in the parameter field to a valid database record would be nice. It would be time consuming since the report could conceivable have to read the entire database to make sure the paramter is OK, then read the thing again to produce the report. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Thanks dgillz for your input. As always, you are very informative! s-)
 
Dgliz,

Not sure if you are aware of this but, when you browse a field, Crystal offers up only a sample of the data. Not all records would be available to "Pick From".

I whish Crystal would come up with something to assist with pick lists. We use Info here and I have reports that use pick lists which I have set up in text files. This works well for the end user, and I only have to modify one text file if any changes occur, eventhough there could be 50 reports that use this list. BUT IT'S STILL A PAIN !!!!

Anyways, enough "venting".

Nuffsaid.
 
The "Dynamic" picklist concept works in Seagate analysis version 7. Here you reference a picklist .txt file which can be updated easily when you set up the report to be run from the desktop (you don't set the picklist in hte report at design time)...but when you use a picklist to set a range of user input for a report parameter at design time...it will be hard coded to the report and unchangeable...unless periodically you open the report in the designer and reset the values
 
Nuffsaid-

I had been told (by ken hamandy I believe) that you get 500 records when browsing a field (unfortunately, I picked a table with only 45 records in it so it was a poor test). However, I was under the impression that browing a field meant you selected the field object and clicked on "browse field data". I did not think what I did within create paramter field was the same.

I did notice that when I browse field data (under my definition) that I never see the "P.SQL 2000" logo come up (I do most of my work with Macola databases which uses P.SQL 2000). However, when I create the picklist from within create a paramter field, and I browse table/field, I do see the P.SQL table come up. I don't know if that actually MEANS anything, but it is interesting. I would test this but today I am away from the home office and not working with Macola.

If no one posts otherwise, I will do a test on a larger table and post results by Monday. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Dgillz,

I brought this to your attention because it has happened to me. We're on a SQL db and I connect through ODBC. (don't know if this makes any difference.) Anyways, I have a list of about 900 items and when I "browse it" I never see them all. (parameter browsing included) Is 500 some kind of limit? Would be interested in what you discouver.

Nuffsaid.
 
The default limit for browsing records is 500. In order to change this limit, you need to modify your registry settings. Here are the keys (pulled from Ken's most recent newsletter -
For Crystal Reports:
Versions 4.x and prior, in a file called CRW.INI
Version 5.x, in registry key HKEY_CURRENT_USER\Software\Crystal Software
Versions 6.x - 8.x, in registry key HKEY_CURRENT_USER\Software\Seagate Software

Setting the number of records read when you "Browse" a field (500 by default).
The key is "MaxNBrowseValues" in the DatabaseServer Folder
The "BrowseTimeout" key can also be increased or set to '0' (unlimited time).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top