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!

VeryUrgent

Status
Not open for further replies.

buh

Programmer
Apr 3, 2002
27
0
0
US
I am a having a multi value parameter with 8 column of a physical table. when the user select multiple column, he allowed to give search condition for each column, i am having 8 individual parameter for the search field.He can randomly select the column, he will enter the search condition.If i use if statement or swich statement, i will take about some 3 pages of coding, because of the combinations of 8 columns in the Record Selection Formula Editor. Any idea to reduce my code.If u are not clear with this, tell me.Because i am in hurry,

Regards,
Buhari
 
Buh-

First of all, please do not make posts titled "very urgent" or "help please". Make your post descriptive of what you are trying to accomplish and you will get better help.

OK, to your question, to use a record selection for a mutli-valueparameter field, usually you just write a formula:

{fieldname} in {?MaultValueParameter}

This will give you only those records that match the MV parameter. Is this what you want? If not please explain more clearly. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Buh, you probably want to give hime an 'all' option on each criteria. Then in the select formula you can write 8 lines:

(if {?param1} = 'all' then True else {field1} = {?Parame1})
and
(if {?param2} = 'all' then True else {field2} = {?Parame2})
and ...

This won't get passed to the SQL WHERE, but it will work.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top