Click to See Complete Forum and Search --> : Selection Formula


sunil_ms18
March 16th, 2005, 02:18 AM
Hello Friends,
While making reports i gave condtion like Status<>0 and it appeared in selection formula tab and if i try to run this report from ASP page it showed me values of status 0 as well. so if possible please tell me how to give condtion like status <>0 i saw in previous reports where status<>0 was attaching it self after selection criteria automatically.
example my selection criteria is,
{SOM_ACTIVITY_.JEOPARDY} = {?Jeopardy} and
{SOM_ACTIVITY_.TARGET_DATE} = {?Target_Date} and
{SOM_ORDERDATECALCULATOR_.ORDER_TARGET_DATE} = {?Order_Target_Date}

but what i get in sql query is(which is made by other developer before me),
WHERE SOM_ACTIVITY_"."SERVICE_ORDER_ID"="_TSK_ORDERCOMPLETION_"."SERVICE_ORDER_ID" AND "_SOM_ACTIVITY_"."SERVICE_ORDER_ID"="_SOM_ORDERDATECALCULATOR_"."SERVICE_ORDER_ID" AND "_SOM_ACTIVITY_"."SERVICE_ORDER_ID"="_SOM_CUSTOMERORDER_"."ORDER_ID" AND "_SOM_ACTIVITY_"."RESPONSIBLE_GROUP" LIKE '' AND "_SOM_CUSTOMERORDER_"."CUSTOMER" LIKE '' AND "_TSK_ORDERCOMPLETION_"."SERVICE_ORDER_STATUS"=1 AND "_SOM_ACTIVITY_"."JEOPARDY"=123 AND "_SOM_ACTIVITY_"."TARGET_DATE"=121322 AND "_SOM_ORDERDATECALCULATOR_"."ORDER_TARGET_DATE"=1213 AND
_TSK_ORDERCOMPLETION_."SERVICE_ORDER_STATUS" <> 9 AND
_TSK_ORDERCOMPLETION_."SERVICE_ORDER_STATUS" <> 10

so please tell me how can i add condtion like status<>0 without it appearing in selection formula.
Please reply i am in need of it.
Thanks for reading and taking efforts
Sunil

Madhi
March 16th, 2005, 06:16 AM
In the menu, goto Report--> Selection Formulas
and write this Status<>0

sunil_ms18
March 16th, 2005, 06:22 AM
In the menu, goto Report--> Selection Formulas
and write this Status<>0

Thanks Mahi fopr you reply,
BUT,
what you said is ok but it wont work if i need to specify some parameters that will be entered by user and at front end we take selection parameters and replace parameter values which are given by user. in this case we may need to hardcode that after parameter addition to selection criteria add status<>0 and that may not desirable in view to make it report independent and minimum hard coing.
Hope this might provides more insight in my case
Regards
Sunil

Madhi
March 16th, 2005, 06:28 AM
If so, then you have to add "and Status<>0" at the end of parameters. You have to hardcode

sunil_ms18
March 16th, 2005, 06:39 AM
If so, then you have to add "and Status<>0" at the end of parameters. You have to hardcode
thanks Madhi,
But i have seen a report already designed where you need not hard code it you have user selection criteria and it will add the criteria like status<>0 automatically and wont require anything to be done at front end and when i am looking at that report i am not able to figure out where it had been added?
Hope fully i might get answer
regards
sunil

Madhi
March 16th, 2005, 06:53 AM
From front end , cant you add this at the Where clause?

sunil_ms18
March 17th, 2005, 12:22 AM
From front end , cant you add this at the Where clause?
Sorry Madhi thanks for your efforts but it is not what i can do in order to make my front end independent and generic for all reports
thanks for your efforits
Sunil