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

How to use a formula field in a parameter

Status
Not open for further replies.

CCSVermont

Vendor
Feb 13, 2006
11
US
I have a formula field, "Store Dept", a "select" formula, that is used to group a report.

I want to use this in a parameter, as a dynamic value.

It does not show up in the pick list of values/fields to select from when creating the parameter.

Can this be done? If so, how?

I simply want the user to be prompted for the "Store Dept" or "Store Dept Range" to select data for.

Thanks
 
Hi,
The parameter can be created with default values of
Store Dept
and
Store Dept Range

In your report create a formula that, based on what the user picked, applies the formula you want to use..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I don't quite understand you, or maybe this would require a re-write of my report..??

I don't know quite how to do what you're suggesting yet.

My formula "Store Dept" is created from fields in the data, like: "0010", "0020" and "1000" are all "Department 1", then "2001", "2002" are "Department 2".

Then I'm sorting and Grouping on the "Store Dept" formula.

When I try to create the parameter to request "what store departments", I cannot pick my formula field "Store Dept" to select them.

Maybe this is a limitation of Crystal, based on how I did this report?

If it requires a rewrite, then I'll skip department selection for now.

TIA
 
What you want to do doesn't lend itself to the dynamic parameter approach. Instead, create a parameter {?dept} that has options 1,2,3,4,5, etc.

Then use a record selection formula like:

(
{?dept} = '1' and
{table.department} in ['0010','0020','1000']
) or
(
{?dept} = '2' and
{table.department} in ['0020','0220','2000']
) or
(
{?dept} = '3' and
{table.department} in ['0030','3300','3000']
) //etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top