| CFDOCUMENTITEM | |
| 説明
cfdocument タグによって作成された PDF または FlashPaper ドキュメントに対するアクション項目を指定します。次のアクションがあります。
|
|
| カテゴリ
データ出力タグ | |
シンタックス<cfdocument ...>
シンタックス 1
<cfdocumentitem type = "pagebreak"/>
シンタックス 2
<cfdocumentitem
type = "header"、"footer">
header/footer text
</cfdocumentitem>
</cfdocument>
|
|
| 関連項目
cfreport、cfdocument、cfdocumentsection |
|
| ヒストリ
ColdFusion MX 7: このタグが追加されました。
|
|
| 使用方法
cfdocumentitem タグを使用して、PDF または FlashPaper レポートの形式設定を制御します。このタグは、<cfdocument> </cfdocument> ペアで囲む必要があります。 改ページ、ランニングヘッダ、またはランニングフッタごとに 1 つの cfdocumentitem タグをコーディングします。 cfdocument スコープ変数、cfdocument.currentpagenumber を使用して、現在のページ番号をヘッダまたはフッタに表示することができます。cfdocument.totalpagecount を使用して、ページの総数を表示することもできます。例 : ... <cfdocumentItem type= "footer> #cfdocument.currentpagenumber# of #cfdocument.totalpagecount# </cfdocumentitem> 次に示すように、cfdocumentsection タグの有無にかかわらず、cfdocumentitem タグを使用することができます。 cfdocumentsection が設定されていない場合 : cfdocumentitem 属性は、次に示すようにドキュメント全体に適用されます。
cfdocumentsection タグが設定されている場合 : cfdocumentitem 属性はそのセクションのみに適用され、以前に指定したヘッダおよびフッタは無効になります。 |
|
例<cfquery datasource="cfdocexamples" name="parksQuery">
SELECT parkname, suptmgr from parks
</cfquery>
<cfdocument format="PDF">
<cfdocumentitem type="header">National Parks Report</cfdocumentitem>
<!--- 総ページ中の現在のページを示すフッタを使用 --->
<cfdocumentitem type="footer">
<cfoutput>Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</
cfoutput>
</cfdocumentitem>
<h1>公園リスト</h1>
<table width="95%" border="2" cellspacing="2" cellpadding="2" >
<tr >
<th>公園</th>
<th>Manager</th>
</tr>
<cfoutput query="parksQuery">
<tr>
<td><font size="-1">#parkname#</font></td>
<td><font size="-1">#suptmgr#</font></td>
</tr>
</cfoutput>
</table>
</cfdocument>
|
|
| TYPE | |
| 必須 | |
|
アクションを指定します。
|
|