Re: Forms: How to let the user choose the 'order by'
Date: 1997/04/24
Message-ID: <335F6281.37D7_at_flash.net>#1/1
aut7b1p_at_sbs.de wrote:
>
> I'm wondering that I can't find a way to make it possible to let the user
> change the order-by clause.
>
> I've tried to use a control-block, but the required triggers themes to be
> somewhat difficult;
> The second, I've tried to use LOV's, but I don't know how to fill the LOV
> at runtime with the required table-column-names or view-column-names.
> Third, I tried to let the user just click on the column, but this requires
> a lot of PL/SQL-programming, too (I've found just mouse-event triggers
> that I can use, the trigger must be at form-level... isn't there a thing
> like 'on-enter-tablecolumn' ?).
>
> I'm not a PL/SQL-novice, but Oracle Forms is new to me.
>
> Are there any code-examples, free librarys, good books (I've already read
> 'Oracle Developer / 2000 -Handbook from Oracle Press) or just ideas that
> can help ?
>
> Thx, bye Juergen
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
We have used a generic form that looks something like this:
+--------------------------------------------------------------------+ |+-----------------+ +------------------------+| || Column | <ADD TO SORT > | Order By: || +-----------------+ +------------------------+| ||order_no | <Remove From Sort> | SKU || ||quantity | | Store || ||value | < OK > | || || | | || |+-----------------+ < Cancel > +------------------------+| +--------------------------------------------------------------------+
Anyway, you get the basic idea. We call the form with a list of available columns. When the user clicks on a column in the left list then they add it with ascending or descending (not shown). The user can then construct exactly the list they want. The form then passes back the order by clause. Upon return the calling form clears the block, sets the order by clause in the block property, and requeries the block.
Another way that would be interesting would be to have buttons (no bevel) as the column header. When the user clicked the column header, change the order by clause and requery as above.
Loyal Barber
MCI Systemhouse
Received on Thu Apr 24 1997 - 00:00:00 CEST