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

Automate selection of values in the parameter?

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
Hi,
We are using CR 9.0 & SQL Server.

In a report we are using a parameter called code (for example Product code).

Need:
The end-user want to select the Product Code or Product Name as a parameter. (ie) They need both Product Code/name as parameters.

Question:
There is any way to do the following in CR 9.0:

If the end-user selects the ProductCode, then the corresponding Product Name has to filled in the ProductName Parameter Text Box automatically and vice versa.

Example:
Prod Table

Product Code Product Name ExpDate Manf.Date
222 AAAA --- ---
444 BBBB ---- ---
666 CCCC ----

Parameters:
ProdCode : Drop Down
ProdName : Drop Down

if the end user select the ProdCode as 444
then the ProdName automatically select BBBB like

ProdCode : 444
ProdName : BBBB

Please let me know if you have any questions/suggestions.

Thanks
MK



 
Parameters are poorly designed and implemented by Crystal.

They are not hierarchial nor can they be based on another parameter selection.

Given your example, I don't see why you'd need 2 parameters if the Name is distinct for each value.

What you might do is prepopulate the parameter with both the value and then place the name in the description part of the parameter.

That way the user will see both at selection time.

You can use a text file to preload these values into the report (but they can't be dynamically updated by CVR, another weakness).

The format is:

%%%%ShowDescOnly 0
1 This is Number 1
2 This is number 2

Check out the Import/Export Picklist in the Set Default Values of the Parameter to get an idea of how to do this.

-k
 
Thanks for your suggesion -k. I will let you know the result.
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top