PowerBuilder Filter

Posted on 2006-06-08
Last Modified: 2013-12-26
How do I set the filter in the dw that has 2 groups.
1st group by AircraftID
2 group by Item_id and the details sections lists all the parts per Item with Remaininig hours.
How do I filter to display only the smallest value per part.
Thanks in advance.
Question by:Namik48075
    LVL 4

    Accepted Solution

    First put your sql as follows,

    Select AircraftID, ItemId, Min(RemainingHours)
    From YourTable
    Group By AircraftID, ItemId

    Then create only one group in the datawindow design by AircraftID.
    and Place the AircraftID in the header of the group band.

    Place the ItemId and Min(RemainingHours) in the detail band.

    I hope this can solve ur problem.
    LVL 5

    Assisted Solution

    If you would like to use DW functionality instead of the SQL suggested, aggregate function in DW expressions can use "for group x" for example Min(RemainingHours for group 2)

    Assisted Solution

    you can use setfilter to filter your dw.

    ls_filter = "kod2>"+sle_2.text+"and kod2<"+sle_3.text+"and kod='"+ddlb_1.text+"'"
    dw_1.Filter( )

    if you want to disable filter you can use below

    dw_1.Filter( )

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project ( automates most of the tasks discussed in this article. You can even fin…
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now