Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

既定の形式とスタイル

XData ReportDisplay の最上位の <report> 要素で style="none" を設定すると、Zen の標準スタイルシートは無視され、Zen レポートには定義済みのスタイルが存在しなくなります。一方、<report> で style 属性を省略すると、レポートでは Zen レポートの標準スタイルシートが使用されます。このスタイルシートは、以下の名前の定義済みスタイル・クラスのコレクションです。

  • p.banner1

  • inline.banner1

  • table

  • table.table1, ...table.table5

  • table.grid, table.invisible, table.numeric

  • td

  • td.table1, ...td.table5

  • td.grid, td.invisible, td.numeric

  • th

  • th.table1, ...th.table5

  • th.grid, th.invisible, th.numeric

以下の <table> 要素では、class 属性を使用して Zen レポートのテーブルに table.grid という定義済みスタイルを適用します。

<table class="grid" group="Step">
 <item width="0.8in" field="@Number" />
 <item width="0.8in" field="./AllSet" />
 <item field="./DemoText" />
</table>

また、<class> 要素を使用してカスタム・スタイル・クラスを定義し、class 属性を使用してそれらのカスタム・スタイルを適用することもできます。<report> の上位ページ・レイアウトを定義する単一の <document> 要素の中に、必要に応じて一連の <class> 要素を記述できます。詳細は、“Zen レポートのページのフォーマット” の章の "<document>" セクションの "<class>" サブセクションを参照してください。

定義済みスタイルの定義の詳細は、以下のセクションを参照してください。

HTML 形式の Zen レポートで使用する既定の CSS スタイル

Zen レポートの既定のスタイルでは、以下の CSS 文を使用して HTML 出力の外観を制御します。これらのスタイル・クラス名は、XData ReportDisplay ブロックの Zen <report> をレイアウトするときに、<p>、<inline>、または <table> の各要素に適用できます。詳細は、"<report>" の style 属性の説明を参照してください。

th {
     text-align:left
}
  
p.banner1 {
    color:darkblue;
    font-family:Arial;
    border-bottom:1px solid darkblue;
    font-size:24pt;
    font-weight:bold;
}
 
inline.banner1 {
    color:darkblue;
    font-family:Arial;
    border-bottom:1px solid darkblue;
    font-size:24pt;
    font-weight:bold;
}
 
table.table1 {
    border:none;
}
th.table1 {
    text-align:right;
    font-weight:bold;
}
td.table1 {
    text-align:left;
}
  
th.table2 {
    border:1px solid gray;
    text-align:left;
    background-color:#e0e0e0;
    font-weight:normal;
}
td.table2 {
    font-weight:bold;
    border:1px solid gray;
}
  
table.table3 {
      border:none;
}
th.table3 {
    border:none;
    text-align:left;
    font-weight:bold;
}
td.table3 {
    border:none;
    text-align:left;
    font-weight:normal;
}
  
table.table4 {
    border:1px solid gray;
}
th.table4 {
    border:none;
    color:white;
    background-color:#6f6fff;
    text-align:left;
    font-weight:bold;
}
td.table4 {
    border:none;
    text-align:left;
    font-weight:normal;
}
  
table.table5 {
    border:none;
}
th.table5 {
    border:none;
    text-align:left;
    font-weight:normal;
    background-color:#bbbbff;
    border-top:1.5px solid black;
    border-bottom:1.5px solid black;
}
td.table5 {
    border:none;
    text-align:left;
    font-weight:normal;
    line-height:150%;
}
  
table.grid {
    border:none;
}
th.grid {
    border:1px solid black;
    text-align:left;
    font-weight:bold;
}
td.grid {
    border:1px solid black;
    text-align:left;
    font-weight:normal;
}
  
table.invisible {
    border:none;
}
th.invisible {
    border:none;
    text-align:left;
}
td.invisible {
    border:none;
    text-align:left;
}
  
th.numeric {
    border:1px solid gray;
    text-align:right;
    background-color:#e0e0e0;
    font-weight:normal;
}
td.numeric {
    font-weight:bold;
    text-align:right;
    border:1px solid gray;
}

定義済みスタイルを使用するかどうかにかかわらず、<class> 要素を使用してカスタム・スタイル・クラスを定義し、class 属性を使用して Zen レポートの要素に適用できます。

PDF 形式の Zen レポートで使用する既定の XSL-FO スタイル

PDF 形式の Zen レポートの既定のスタイルでは、以下の XSL-FO 属性の attribute-set 定義を使用します。これらのスタイル・クラス名は、XData ReportDisplay ブロックの Zen <report> をレイアウトするときに、<p>、<inline>、または <table> の各要素に適用できます。詳細は、"<report>" の style 属性の説明を参照してください。

<xsl:attribute-set name='p.banner1'>
    <xsl:attribute name='color'>darkblue</xsl:attribute>
    <xsl:attribute name='font-family'>Arial</xsl:attribute>
    <xsl:attribute name='border-bottom'>1pt solid darkblue</xsl:attribute>
    <xsl:attribute name='font-size'>24pt</xsl:attribute>
    <xsl:attribute name='font-weight'>bold</xsl:attribute>
</xsl:attribute-set>
 
<xsl:attribute-set name='inline.banner1'>
    <xsl:attribute name='color'>darkblue</xsl:attribute>
    <xsl:attribute name='font-family'>Arial</xsl:attribute>
    <xsl:attribute name='border-bottom'>1pt solid darkblue</xsl:attribute>
    <xsl:attribute name='font-size'>24pt</xsl:attribute>
    <xsl:attribute name='font-weight'>bold</xsl:attribute>
</xsl:attribute-set>
 
<xsl:attribute-set name='table.table1'>
    <xsl:attribute name='border'>none</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.table1'>
        <xsl:attribute name='text-align'>right</xsl:attribute>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.table1'>
        <xsl:attribute name='text-align'>left</xsl:attribute>
    </xsl:attribute-set>  
  
<xsl:attribute-set name='table.table2'>
</xsl:attribute-set>
    <xsl:attribute-set name='th.table2'>
        <xsl:attribute name='border'>1pt solid gray</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='background-color'>#e0e0e0</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.table2'>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
        <xsl:attribute name='border'>1pt solid gray</xsl:attribute>
    </xsl:attribute-set>
  
<xsl:attribute-set name='table.table3'>
    <xsl:attribute name='border'>none</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.table3'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.table3'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
    </xsl:attribute-set>
  
<xsl:attribute-set name='table.table4'>
    <xsl:attribute name='border'>1pt solid gray</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.table4'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='color'>white</xsl:attribute>
        <xsl:attribute name='background-color'>#6f6fff</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.table4'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
    </xsl:attribute-set>
  
<xsl:attribute-set name='table.table5'>
    <xsl:attribute name='border'>none</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.table5'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
        <xsl:attribute name='background-color'>#bbbbff</xsl:attribute>
        <xsl:attribute name='border-top'>1.5pt solid black</xsl:attribute>
        <xsl:attribute name='border-bottom'>1.5pt solid black</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.table5'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
        <xsl:attribute name='line-height'>150%</xsl:attribute>
    </xsl:attribute-set>
  
<xsl:attribute-set name='table.grid'>
    <xsl:attribute name='border'>none</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.grid'>
        <xsl:attribute name='border'>1pt solid black</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.grid'>
        <xsl:attribute name='border'>1pt solid black</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
    </xsl:attribute-set>
  
<xsl:attribute-set name='table.invisible'>
    <xsl:attribute name='border'>none</xsl:attribute>
</xsl:attribute-set>
    <xsl:attribute-set name='th.invisible'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.invisible'>
        <xsl:attribute name='border'>none</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
    </xsl:attribute-set>
    
<xsl:attribute-set name='table.numeric'>
</xsl:attribute-set>
    <xsl:attribute-set name='th.numeric'>
        <xsl:attribute name='text-align'>right</xsl:attribute>
        <xsl:attribute name='border'>1pt solid gray</xsl:attribute>
        <xsl:attribute name='text-align'>left</xsl:attribute>
        <xsl:attribute name='background-color'>#e0e0e0</xsl:attribute>
        <xsl:attribute name='font-weight'>normal</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name='td.numeric'>
        <xsl:attribute name='font-weight'>bold</xsl:attribute>
        <xsl:attribute name='border'>1pt solid gray</xsl:attribute>
        <xsl:attribute name='text-align'>right</xsl:attribute>
    </xsl:attribute-set>

定義済みスタイルを使用するかどうかにかかわらず、<class> 要素を使用してカスタム・スタイル・クラスを定義し、class 属性を使用して Zen レポートの要素に適用できます。

FeedbackOpens in a new tab