2013年9月30日月曜日

Oracle APEX - Multiple Active Reports/Tabular Forms on one APEX page / アクティブレポートやタービュラーフォームを1ページに表示する

English Follows Japanese
通常、APEXでは1ページに複数のアクティブレポートやタービュラーフォームを表示することは出来ません。
ですので、通常のHTML作成と同じようにiFrameやDivやEmbed Objectタグを使用します。

以下では、Page1にアクティブレポートまたはタービュラーフォームを複数表示させるタブを作成します。

1) ページ1に表示させたいページ2を作成する

2) ページ2のページ編集でページテンプレートを"ポップアップ"にする

3) 共有コンポーネント > セキュリティ属性 > ブラウザ・セキュリティに行き、フレームへの組み込みを”許可”にします

4) ページ1で以下のようなHTMLのリージョンを作成します。

 DIVを使用する場合:
 <br/><div id="testdiv"></div>
 <script type="text/javascript">
 $('#testdiv').load('f?p=&APP_ID.:2:&SESSION.');
 </script>

 Embed Objectを使用する場合:
 <object data="f?p=&APP_ID.:2:&SESSION." width="100%" height="100%">
  <embed src="f?p=&APP_ID.:2:&SESSION." width="100%" height="100%"> </embed>
  Error: Embedded data could not be displayed.
 </object>

 iFrameを使用する場合:
 <IFRAME src="f?p=&APP_ID.:2:&SESSION."
  name="reportframe" id ="reportframe"
  style="width:120%;height:120%"
 scrolling="auto" />

 ##注意!DIVでは値の更新は不可能です。iFrameはIEがうまく動作しないなどあるので私はObjectを使用しました。
参考URL(英語): http://roelhartman.blogspot.jp/2009/03/two-interactive-reports-on-one-page.html


-----------------------------------------------

iFrame/Div/Embed Object is very useful to show multipul Active Reports or Tabular Forms on one APEX page.

The below is to show Active Reports/Tabular Form(Page 2) on Page 1

1) Create page 2 you want to show on page 1

2) on page 2, change Page Template to "Popup"

3) Shared Component > Security Attribute > Browser Security, set Embed in Frame to "Allow"

4) on Page 1, create a HTML Region and set the source as followings

For DIV Setting:
<br/><div id="testdiv"></div>
<script type="text/javascript">
$('#testdiv').load('f?p=&APP_ID.:2:&SESSION.');
</script>

For Embed Object Setting:
<object data="f?p=&APP_ID.:2:&SESSION." width="100%" height="100%">
<embed src="f?p=&APP_ID.:2:&SESSION." width="100%" height="100%"> </embed>
Error: Embedded data could not be displayed.
</object>

For iFrame Setting:
<IFRAME src="f?p=&APP_ID.:2:&SESSION."
name="reportframe" id ="reportframe"
style="width:120%;height:120%"
scrolling="auto" />

##Note that a user cannot update records on tabular forms with DIV tag. In addtion IE has always some trouble with iFrame so for me, object tag is the best choice.

Reference: http://roelhartman.blogspot.jp/2009/03/two-interactive-reports-on-one-page.html

0 件のコメント:

コメントを投稿