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

Array Parameter dosen't work right in the Filter

Status
Not open for further replies.

ssakkerm

Programmer
Feb 5, 2003
13
US
Hi everyone.
I have Crystal XI working through ODBC with Progress DB.
Anyway, I have Report what has to show Production Data by one or many Departments.
My DB table is ProductionTran, and Dept-ID is the field from this Table.
Users will be be entering Date-Range and one or many Dept-ID's.
For some reasons using just ProductionTran.Dept-ID to connect to Param {?DeptID} to retrieve Data from this table doesn't work fast enough.
But if I use one more DB Table -- cd-GroupWorkcenter -- I can connect cd-GroupWorkcenter to
ProductionTran by Workcenter-ID -- works in 5 sec with one week data set, which is good for the user.
I created if - else query in the filter,
kinda
"if {?DeptID} = "077" then cd-GroupWorkcenter. Group-ID in ["23","45","54"]"
else
if {?DeptID} = "100" then cd-GroupWorkcenter. Group-ID in ["13","41","30"]"
e.t.c.
The query looks for Groups in cd-GroupWorkcenter table, gets Workcenter-IDs for these Groups, and connects to ProductionTran with Workcenter-IDs.
And if user enters in Parameter {?DeptID} one value -- it works fine and fast,
if more then one -- it works only for the first value.
How can I built the query for this array parameter to pull data for each member of the array {?DeptID} ?

Thanks,

ssakkerm,
programmer
if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top