cancel
Showing results for 
Search instead for 
Did you mean: 

Using a formula in Parameters

Former Member
0 Kudos

Post Author: hollyschulz

CA Forum: Formula

Possible? If so, how? Every time I try to create / modify my parameter I can't choose a formula in the value field.

I am trying to get a prompt that will select a certain number of documents of a certain type- I already have the record selection to ignore the other "types" - All I have now is a document # range, but if I want to select 30 and only 25 of those are the type I need, then the total summarized count will be off.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Post Author: hollyschulz

CA Forum: Formula

Thanks to you both for your answers

Former Member
0 Kudos

Post Author: foghat

CA Forum: Formula

Right, you can use a parameter inside a formula, but you cannot use a formula as part of a parameter.

Former Member
0 Kudos

Post Author: helpwithcr

CA Forum: Formula

i am predy new to CR....pardon me if i am mentioning something so simple or silly.well i created a parameter and then used that parameter inside a formula and use that combination inside the report, so whenever the prompt comes up it actually going thru parameter -> formula then the result.... for example -


i had a phone number value entered to my parameter as 1234567890and in my formula i have this picture funtion to convert that to a proper form Picture(ToText({?p_phone}),"(xxx) xxx-xxxx")so the result will be (123) 456-7890This must be the only solution ....but I don't think u can do direct formula integration inside parameters

Former Member
0 Kudos

Post Author: foghat

CA Forum: Formula

You can't use formulas in parameters. Formulas aren't evaluated until after the query executes and the query hasn't executed until after you select a parameter and run the report.You could either create a static parameter and hard code the values you want to select from or you can create a view in your database that returns the values you want and then base your dynamic parameter on that.