cancel
Showing results for 
Search instead for 
Did you mean: 

How can I manipulate a parameter value after user input

Former Member
0 Kudos

Post Author: fsu304

CA Forum: Crystal Reports

I have a parameter that is used in my sql command and I want to be able to change the value of it if it reach a certian criteria. For example the user enters the string "FDT" i want to change the parameter to equal "7" before it gets sent to the database to gather the records. How can I accomplish this??

Any help would be awesome.

Heath

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Post Author: yangster

CA Forum: Crystal Reports

no you can not massage a paramter before and pass it back without doing it within a procedureyou can however do this within crystal in the select expertif = 'FTD' then field1 = 7 elseif = 'ABC' then field1 = 2but because this is done post sql you take a performance hit as nothing is pushed down to the sql level

Former Member
0 Kudos

Post Author: fsu304

CA Forum: Crystal Reports

Thanks for your quick response yangster. So there is no way to create a formula that would be run that would manipulate the value of the parameter before it is applied to the database.

I am converting all of our reports to crystal from a program called Actuate and in actuate you can manipulate the parameters before they are sent to the database for record selection.

Heath

Former Member
0 Kudos

Post Author: yangster

CA Forum: Crystal Reports

the easiest way to achieve this would be to create a lookup table that represents the value you have entered to mean something else in your primary selectionso your table would be a simple value, descriptionthe parameter the user enters 'FDT' = 7 in the table, it is then joined back to your initial queary and will only return you results for 7you can't create if statements with a commandand you cannot use a case statement with a parameterthe other alternative would be to write a procedure that takes in your value and converts it then runs your sql