| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Re: Selection Formula
In the menu, goto Report--> Selection Formulas
and write this Code:
Status<>0
__________________
Madhivanan Failing to plan is Planning to fail |
|
#3
|
|||
|
|||
|
Re: Selection Formula
Quote:
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 |
|
#4
|
|||
|
|||
|
Re: Selection Formula
If so, then you have to add "and Status<>0" at the end of parameters. You have to hardcode
__________________
Madhivanan Failing to plan is Planning to fail |
|
#5
|
|||
|
|||
|
Re: Selection Formula
Quote:
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 |
|
#6
|
|||
|
|||
|
Re: Selection Formula
From front end , cant you add this at the Where clause?
__________________
Madhivanan Failing to plan is Planning to fail |
|
#7
|
|||
|
|||
|
Re: Selection Formula
Quote:
thanks for your efforits Sunil |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|