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

Select by Parameter 1 or Parameter 2

Status
Not open for further replies.

mfroggie

Vendor
Jan 22, 2002
44
0
0
US
I have a simple report to print a list of active quotes but the client wants to be able to either print by a exp date range or by a reference number. I have it set up to select EXPDATE or REFERENCE using a selection formula and putting that in Sort but I want to also be able to select the EXPDATE Range or Reference no. range instead of printing all open quotes. Any help is appreciated.

Thanks,

Mfroggie

Mfroggie
 
You can set up three parameters and use them in your selection formula like this:

(
(
{?PrintBy} = "Exp Date" and
{table.expdate} = {?DateRange}
) or
(
{?PrintBy} = "Ref No" and
{table.refnumber} = {?RefNoRange}
)
)

Selections will have to be made for all parameters, but if the PrintBy option is not selected, the corresponding range will have no effect, so you can ask people to enter "000" or something like that in the prompt text if {?PrintBy} doesn't equal the corresponding field.

-LB
 
Ok, I have setup 3 parameters

?Printby (bolean)
?EXPDATE (number)
?REFERENCE (string)

And I have setup this formula as @select

(({?PrintBy} = "EXPDATE"
and {OEORDH.EXPDATE} = {?EXPDATE}) or({?PrintBy} = "REFERENCE"
and {OEORDH.REFERENCE} = {?REFERENCE}))

Now I am not sure if I am doing the correct next step but I add a select record for @select = ?Printby.

I get an error that I need a bolean here and it hightlights the "EXPDATE"

Thank you for your help.

mfroggie

Mfroggie
 
Do not create this in the field explorer. Just go to report->selection formula->record and add:

(
(
{?PrintBy} = "EXPDATE" and
{OEORDH.EXPDATE} = {?EXPDATE}
) or
(
{?PrintBy} = "REFERENCE" and
{OEORDH.REFERENCE} = {?REFERENCE}
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top