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

use parameter fields for multiple fields

Status
Not open for further replies.

chuchuchui

Technical User
Joined
Dec 23, 2004
Messages
33
Location
US
Crystal XI, IBM UniVerse

I was curious if it is at all possible to use a Parameter Field to select multiple values from different fields.

I have a number of fields that at some time or another need reports generated from them either being null or not null.

I would like to be a selection box so you can "mix and match" the fields that you want to be NULL and fields you don't want to be NULL.

example:

The selections box:

NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNDINSPDPREM})
ISNULL({PA_COVERAGES_VEHICLES_ID.UNDINSPDPREM})
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.PIPPREM})
ISNULL({PA_COVERAGES_VEHICLES_ID.PIPPREM})

user selections:
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
ISNULL({PA_COVERAGES_VEHICLES_ID.UNDINSPDPREM})


output would be all the policies that met the user selections. Is this at all possible?

The only thing I tried was just a parameter field and "manually" inserting it into the formula editor of the select expert which did not work and I'm not sure how to go about it. Thanks!
 
For coding ease, I'd use values in the parameters, with descriptions, and select view description only so the user sees the description.

Then let's say that each is a numeric value as in:

1) NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
2) ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
etc.

So the record selection would read something like:

(
if 1 in {?UserChoice} then
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
)
and
(
if 2 in {?UserChoice2} then
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
)
etc...

Should work.

-k
 
Ooops, should have been:

(
if 1 in {?UserChoice} then
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
)
and
(
if 2 in {?UserChoice} then
ISNULL({PA_COVERAGES_VEHICLES_ID.UNINSBIPREM})
)
etc...

-k
 
Well it almost works...When I use AND I do not seem to retrieve any information when I use OR it works buuuuut when I add another group i.e.
AND
(
if 3 in {?coverages} then
NOT ISNULL({PA_COVERAGES_VEHICLES_ID.UNDINSBIPREM})
)
OR
(
if 4 in {?coverages} then
ISNULL({PA_COVERAGES_VEHICLES_ID.UNDINSBIPREM})
)

and try to select the isnull portion this seems to be ignored.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top