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

Parameter Issue

Status
Not open for further replies.

ekta22

IS-IT--Management
May 3, 2004
359
US
Hi,

I have created a parameter in my report. I am having little trouble with the code. The way I want this parameter to work is that if the user enters the value "N" for this parameter I want to display all the records from the database where length of the field is 6 and last two characters are alphabets. If they enter the value "L", show all the other records.

How do I code this?

Thanks!
 
Hi there,

Is this what your after?

if {?Param} = "N" then
length({Table.Field}) >= 6 and right({Table.Field},2) in "A" to "Z" else

if {?Param} = "L" then
length({Table.Field}) < 6

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
(
(
{?parm} = "N" and
len({table.field}) = 6 and
not isnumeric(right({table.field},1)) and
not isnumeric(mid({table.field},5,1))
) or
{?parm} = "L"
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top