Server-side-select --- Client-side-select
I use a parameter-field (PF) named {?Og} to enable the user to select an 8-digit number (the datatype of the corresponding SAP-DB-field is 8-digit) (a.e. "50237309".
The parameter-field looks like:
content description
5023709 Ansfelden
50236441 Braunau
5023708 Tragwein
...
The database contains a field {IL BB_INFOSET.PA9155-OGRU} containing the number (as a string) as mentioned above.
The selection-Expert contains following formula:
{IL BB_INFOSET.PA9155-OGRU} = {?Og}
Although the parameter-field {?Og} is multi-select (the user may select one or more than one value (and I really don't care what happens if he enters nothing at all at this point =) ) it works fine!
Everything is alright and the select-statement runs on the server (instead of the client) which is fine, because personally I would rather evaluate 4.000.000 Datasets on the server-side than on the client-side ;-)
until...
The parameter-field HAS TO look like this (and no workaround here, I'm afraid):
content descr. (is always empty)
Ansfelden [5sd4f53dsf] [5023709]
Baunau [5544sd5f4sd] [50236441]
Tragwein [5hn5cv4bcvbcvb] [5023708]
...
The ogru-number is now located between the second pair of brackets <[]>
So I made up the following formula:
#################################################################
//make an array containing the numbers from the parameter-field
stringVar array ogru;
//count for the parameter-field
numberVar l := Count ( {?Og} );
//counter variable
numberVar i;
//loop to copy the array...
for i := 1 to l step 1 do (
//redim destination-array
redim preserve ogru[ i ];
//cut and copy into my array
ogru[ i ] := Mid( {?Og}[ i ], InStr ( {?Og}[ i ], "]" ) + 3, 8 );
);
//select-statement
{IL BB_INFOSET.PA9155-OGRU} = ogru;
#################################################################
This formula is working as tested in a formula field (because I never ever trust myself )
According to the staff at Crystal Reports (CR) a parameter-field IS an array.
So why is example 1 executed on the server-side while example 2 is executed on the client-side (very bad!)?
Is there a way to do this on the server-side as well?
We use SAP R/3 which is why I can't use stored procedures.
help me please.
SAP R/3 4.6c
CR 8.5
CE 8.0
I use a parameter-field (PF) named {?Og} to enable the user to select an 8-digit number (the datatype of the corresponding SAP-DB-field is 8-digit) (a.e. "50237309".
The parameter-field looks like:
content description
5023709 Ansfelden
50236441 Braunau
5023708 Tragwein
...
The database contains a field {IL BB_INFOSET.PA9155-OGRU} containing the number (as a string) as mentioned above.
The selection-Expert contains following formula:
{IL BB_INFOSET.PA9155-OGRU} = {?Og}
Although the parameter-field {?Og} is multi-select (the user may select one or more than one value (and I really don't care what happens if he enters nothing at all at this point =) ) it works fine!
Everything is alright and the select-statement runs on the server (instead of the client) which is fine, because personally I would rather evaluate 4.000.000 Datasets on the server-side than on the client-side ;-)
until...
The parameter-field HAS TO look like this (and no workaround here, I'm afraid):
content descr. (is always empty)
Ansfelden [5sd4f53dsf] [5023709]
Baunau [5544sd5f4sd] [50236441]
Tragwein [5hn5cv4bcvbcvb] [5023708]
...
The ogru-number is now located between the second pair of brackets <[]>
So I made up the following formula:
#################################################################
//make an array containing the numbers from the parameter-field
stringVar array ogru;
//count for the parameter-field
numberVar l := Count ( {?Og} );
//counter variable
numberVar i;
//loop to copy the array...
for i := 1 to l step 1 do (
//redim destination-array
redim preserve ogru[ i ];
//cut and copy into my array
ogru[ i ] := Mid( {?Og}[ i ], InStr ( {?Og}[ i ], "]" ) + 3, 8 );
);
//select-statement
{IL BB_INFOSET.PA9155-OGRU} = ogru;
#################################################################
This formula is working as tested in a formula field (because I never ever trust myself )
According to the staff at Crystal Reports (CR) a parameter-field IS an array.
So why is example 1 executed on the server-side while example 2 is executed on the client-side (very bad!)?
Is there a way to do this on the server-side as well?
We use SAP R/3 which is why I can't use stored procedures.
help me please.
SAP R/3 4.6c
CR 8.5
CE 8.0