首页 > 数据库技术 > 详细

Sort Detail Data Block Example - Oracle Forms

时间:2016-12-25 01:43:13      阅读:250      评论:0      收藏:0      [点我收藏+]
Example is given below to sort detail data block data (toggle asc or desc) with push buttons used as header of grid, by setting ORDER_BY property of data block using SET_BLOCK_PROPERTY command.
 
The following is the screen shot of this example and this form can be downloaded from the below link:
技术分享
 
In this example two data block are being used, one is to contain push buttons to sort data and one is to hold the data in detail block.
 
On every push button of header the following code is written on When-Button-Pressed trigger:
Begin
 If Nvl(Get_Block_Property(‘scott_emp‘, order_by), ‘ENAME ASC‘) = ‘ENAME ASC‘ then
    Set_Block_Property(‘scott_emp‘, order_by, ‘ename desc‘);
 Else    Set_Block_Property(‘scott_emp‘, order_by, ‘ename asc‘);  End if;
 Go_Block(‘scott_emp‘);  Execute_Query;
End;

You see in above example when I am getting the current setting of order by property of the block, I am reading it in upper case because it returns in upper case even if I am setting the property in lower case.

Sort Detail Data Block Example - Oracle Forms

原文:http://www.cnblogs.com/quanweiru/p/6218908.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!