2011/06/20

LOVの文字列とコード

BI Publisher の値リスト(LOV: List of Values)と、値リストを用いたメニュー式のパラメータについて説明します。

マニュアルには明確な記述が見受けられませんが、固定値だけでなく、SQL問い合わせでも、「ラベル」と「値」を定義できます。

【値リストの設定】
タイプに「SQL問い合わせ」を選択し、ラベルと値に相当する2つの列をSELECT句に指定します。1列目がリストに表示される名称、2列目がデータソースに実際に渡される値となります。
select dname, deptno from dept order by deptno
Figure 1: LOV setting


【出力結果】
出力結果は以下の通りです。パラメータに表示されるメニュー項目にはdnameが表示され、抽出にはdeptnoが用いられています。
Figure 2: How the LOV appears, and how it is used in the query



念のため確認しましたが、10g (10.1.3.4) および 11g(11.1.1.3) 共に動作します。

元ネタ:
http://forums.oracle.com/forums/thread.jspa?threadID=2238724


[Summary]
You can determine the label-value set in List of Values (LOV) with SQL.
select dname, deptno from dept order by deptno


The values of the first column (dname) come up on the drop down list. The values of second column (deptno) are the actual values to be passed to the data set.  Please see the figure 1 and 2.


For your reference:
http://forums.oracle.com/forums/thread.jspa?threadID=2238724

0 件のコメント:

コメントを投稿