CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 16th, 2005, 02:18 AM
    sunil_ms18 sunil_ms18 is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 5
    sunil_ms18 is an unknown quantity at this point (<10)
    Exclamation Selection Formula

    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
    Reply With Quote
      #2    
    Old March 16th, 2005, 06:16 AM
    Madhi Madhi is offline
    Senior Member
     
    Join Date: Jul 2004
    Location: Chennai, India
    Posts: 1,064
    Madhi will become famous soon enough (50+)
    Re: Selection Formula

    In the menu, goto Report--> Selection Formulas
    and write this
    Code:
     Status<>0
    __________________
    Madhivanan

    Failing to plan is Planning to fail
    Reply With Quote
      #3    
    Old March 16th, 2005, 06:22 AM
    sunil_ms18 sunil_ms18 is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 5
    sunil_ms18 is an unknown quantity at this point (<10)
    Re: Selection Formula

    Quote:
    Originally Posted by Madhi
    In the menu, goto Report--> Selection Formulas
    and write this
    Code:
     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
    Reply With Quote
      #4    
    Old March 16th, 2005, 06:28 AM
    Madhi Madhi is offline
    Senior Member
     
    Join Date: Jul 2004
    Location: Chennai, India
    Posts: 1,064
    Madhi will become famous soon enough (50+)
    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
    Reply With Quote
      #5    
    Old March 16th, 2005, 06:39 AM
    sunil_ms18 sunil_ms18 is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 5
    sunil_ms18 is an unknown quantity at this point (<10)
    Re: Selection Formula

    Quote:
    Originally Posted by Madhi
    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
    Reply With Quote
      #6    
    Old March 16th, 2005, 06:53 AM
    Madhi Madhi is offline
    Senior Member
     
    Join Date: Jul 2004
    Location: Chennai, India
    Posts: 1,064
    Madhi will become famous soon enough (50+)
    Re: Selection Formula

    From front end , cant you add this at the Where clause?
    __________________
    Madhivanan

    Failing to plan is Planning to fail
    Reply With Quote
      #7    
    Old March 17th, 2005, 12:22 AM
    sunil_ms18 sunil_ms18 is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 5
    sunil_ms18 is an unknown quantity at this point (<10)
    Re: Selection Formula

    Quote:
    Originally Posted by Madhi
    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
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:53 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009