Abey
Abey

Reputation: 165

creating a crystal parameter from a formula output

In my report there is a Purchasing Group number with values like 100,101,102....201,202,203..301,302,303... etc. There is a formula to identify the Purchasing group department -

If {PURGRP} startswith '1' then 'Purchasing Dept.' else if {PURGRP} startswith '2' then 'Construction Agreements Office' else if {PURGRP} startswith '3' then 'Storerooms' else......

The report is grouped by these departments. i am trying to create a parameter which allows the user to select the Department by the names in the formula, but i am not able to append these names to available values as they are derived from a formula. One option is hard coding the values, but I was hoping there could be a more dynamic way.

Upvotes: 0

Views: 394

Answers (1)

PowerUser
PowerUser

Reputation: 11791

My first thought was to capture all the department names in shared array, but I don't see any way to attach that to the parameter.

In all likelihood, having a separate lookup table in your main database is the simplest and least error-prone path. I suppose you could write a maketable query that would make your lookup table dynamic, but Crystal Reports isn't built for this purpose.

Upvotes: 1

Related Questions