How do you create a parameter for a formula field? My formula field is (unit cost*qty) which creates a total cost. An example would be the user wanting to filter out any total cost under $100?
Depending on your database connection, you could create a SQL Expression field that does the calculation instead of using a formula. You could then use this SQL Expression in your Record Selection.
Just what is 'total cost'? If it comes from a single detail line, then create a parameter and put a line in the record selection,
Code:
@MinCOst >= (unit cost*qty)
If it comes from several records, group them together, do a summary total and then use Report > Selection Formulas > Group to do a group selection. (If you're not already familiar with Crystal totals, the basics are explained at FAQ767-6524).
It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods change between versions, and higher versions have extra options.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
There is no special method for setting a formula equal to a parameter. You create a parameter (field explorer->parameter->new), name it "cost" and then go to report->selection formula->record and enter:
{@yourformula} < {?cost}
As Bob suggested, if you can use a SQL expression instead of the formula, you will get faster results.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.