@ -11,6 +11,7 @@ xmlns="http://jasperreports.sourceforge.net/jasperreports">
<xsl:param name= "seitenbreite" select= "842" />
<xsl:param name= "seitenbreite" select= "842" />
<xsl:param name= "seitenhoehe" select= "595" />
<xsl:param name= "seitenhoehe" select= "595" />
<xsl:param name= "seitenrand" select= "12" />
<xsl:param name= "seitenrand" select= "12" />
<xsl:param name= "topMargin" select= "12" />
<xsl:param name= "bottomMargin" select= "12" />
<xsl:param name= "bottomMargin" select= "12" />
<xsl:param name= "isIgnorePagination" select= "'true'" />
<xsl:param name= "isIgnorePagination" select= "'true'" />
<xsl:param name= "orientation" select= "'Landscape'" />
<xsl:param name= "orientation" select= "'Landscape'" />
@ -32,7 +33,7 @@ orientation="{$orientation}"
columnWidth="{$druckbreite}"
columnWidth="{$druckbreite}"
leftMargin="{$seitenrand}"
leftMargin="{$seitenrand}"
rightMargin="{$seitenrand}"
rightMargin="{$seitenrand}"
topMargin="{$seitenrand }"
topMargin="{$topMargin }"
bottomMargin="{$bottomMargin}"
bottomMargin="{$bottomMargin}"
isIgnorePagination="{$isIgnorePagination}" >
isIgnorePagination="{$isIgnorePagination}" >
<xsl:call-template name= "jr_properties" />
<xsl:call-template name= "jr_properties" />
@ -45,7 +46,10 @@ isIgnorePagination="{$isIgnorePagination}" >
<!-- <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="466"/>
<!-- <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="466"/>
<property name= "com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value= "522" /> -->
<property name= "com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value= "522" /> -->
<template > <xsl:value-of select= "concat('"',$stylesFile,'"')" /> </template>
<template > <xsl:value-of select= "concat('"',$stylesFile,'"')" /> </template>
<xsl:call-template name= "jr_styles" />
<xsl:call-template name= "jr_styles" >
<xsl:with-param name= "ergebniselementOrdnr" select= "$ergebniselementOrdnr" />
</xsl:call-template>
<xsl:call-template name= "querystring" >
<xsl:call-template name= "querystring" >
<xsl:with-param name= "ordnr" select= "$ergebniselementOrdnr" />
<xsl:with-param name= "ordnr" select= "$ergebniselementOrdnr" />
</xsl:call-template>
</xsl:call-template>
@ -425,6 +429,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:variable name= "ndefbreite" > <xsl:value-of select= "count(/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[ @width = '' and not(starts-with(f_name,'hidden')) and not(starts-with(f_name,'next'))])" /> </xsl:variable>
<xsl:variable name= "ndefbreite" > <xsl:value-of select= "count(/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[ @width = '' and not(starts-with(f_name,'hidden')) and not(starts-with(f_name,'next'))])" /> </xsl:variable>
<xsl:variable name= "gesamtbreite" > <xsl:value-of select= "$defbreite+($ndefbreite* $std_spaltenbreite)" /> </xsl:variable>
<xsl:variable name= "gesamtbreite" > <xsl:value-of select= "$defbreite+($ndefbreite* $std_spaltenbreite)" /> </xsl:variable>
<xsl:variable name= "width" > <xsl:value-of select= "/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[@id=$colId]/@width" /> </xsl:variable>
<xsl:variable name= "width" > <xsl:value-of select= "/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[@id=$colId]/@width" /> </xsl:variable>
<xsl:comment > <xsl:value-of select= "concat('defbreite=',$defbreite)" /> </xsl:comment>
<xsl:choose >
<xsl:choose >
<xsl:when test= "($colCount - 1) =$colId " >
<xsl:when test= "($colCount - 1) =$colId " >
<!-- letzte Spalte -->
<!-- letzte Spalte -->
@ -500,17 +505,13 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:variable>
</xsl:variable>
<xsl:if test= "normalize-space($jasperFieldname)!=''" > <!-- keine leeren Feldnamen -->
<xsl:if test= "normalize-space($jasperFieldname)!=''" > <!-- keine leeren Feldnamen -->
<textField isStretchWithOverflow= "true" isBlankWhenNull= "true" >
<textField isStretchWithOverflow= "true" isBlankWhenNull= "true" >
<xsl:attribute name= "pattern" >
<xsl:call-template name= "tableCellPattern" >
<xsl:with-param name= "fieldType" select= "$fieldType" />
</xsl:call-template>
</xsl:attribute>
<reportElement stretchType= "ContainerHeight" x= "{$x}" y= "0" width= "{$width}" height= "{$height}" >
<reportElement stretchType= "ContainerHeight" x= "{$x}" y= "0" width= "{$width}" height= "{$height}" >
<xsl:attribute name= "style" >
<xsl:attribute name= "style" >
<xsl:call-template name= "getTableRowStyle" >
<xsl:call-template name= "getTableRowStyle" >
<xsl:with-param name= "flavorTableRowStyle" select= "$flavorTableRowStyle" />
<xsl:with-param name= "flavorTableRowStyle" select= "$flavorTableRowStyle" />
<xsl:with-param name= "tableRowLevel" select= "$tableRowLevel" />
<xsl:with-param name= "tableRowLevel" select= "$tableRowLevel" />
<xsl:with-param name= "ergebnisElementOrdnr" select= "$ergebnisElementOrdnr" />
<xsl:with-param name= "ergebnisElementOrdnr" select= "$ergebnisElementOrdnr" />
<xsl:with-param name= "fieldType" select= "$fieldType" />
</xsl:call-template>
</xsl:call-template>
</xsl:attribute>
</xsl:attribute>
<xsl:if test= "$flavorTableRowStyle='treeTable'" >
<xsl:if test= "$flavorTableRowStyle='treeTable'" >
@ -526,6 +527,11 @@ isIgnorePagination="{$isIgnorePagination}" >
<textElement textAlignment= "Left" />
<textElement textAlignment= "Left" />
</xsl:if>
</xsl:if>
<textFieldExpression > <xsl:value-of select= "concat('$F{',$fldPrefix,$jasperFieldname,'}')" /> </textFieldExpression>
<textFieldExpression > <xsl:value-of select= "concat('$F{',$fldPrefix,$jasperFieldname,'}')" /> </textFieldExpression>
<xsl:call-template name= "tableCellPatternExpression" >
<xsl:with-param name= "fieldType" select= "$fieldType" />
<xsl:with-param name= "ergebnisElementOrdnr" select= "$ergebnisElementOrdnr" />
<xsl:with-param name= "fieldName" select= "$fieldName" />
</xsl:call-template>
</textField>
</textField>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:template>
@ -563,14 +569,27 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:param name= "zeilenhoehe" select= "30" />
<xsl:param name= "zeilenhoehe" select= "30" />
<xsl:param name= "ordnr" select= "0" />
<xsl:param name= "ordnr" select= "0" />
<xsl:param name= "y_offset" select= "0" />
<xsl:param name= "y_offset" select= "0" />
<xsl:for-each select= "/ergebnisse/ergebnis/ergebniselement[@ordnr=$ordnr]" > <!-- derzeit nur eine Tabelle erlaubt -->
<xsl:for-each select= "/ergebnisse/ergebnis/ergebniselement[@ordnr=$ordnr]" >
<xsl:choose >
<xsl:choose >
<xsl:when test= "sqlerg/headers/@hasAggregationHeaders='true'" >
<xsl:when test= "sqlerg/headers/@hasAggregationHeaders='true'" >
<!-- verschachtelter Header -->
<!-- verschachtelter Header -->
<xsl:variable name= "colCount" > <xsl:value-of select= "count(sqlerg/aggregationHeaders/tr)" /> </xsl:variable>
<xsl:variable name= "totalColCount" > <xsl:value-of select= "sqlerg/headers/@count" /> </xsl:variable>
<xsl:variable name= "rowCount" > <xsl:value-of select= "count(sqlerg/aggregationHeaders/tr)" /> </xsl:variable>
<xsl:for-each select= "sqlerg/aggregationHeaders/tr" >
<xsl:for-each select= "sqlerg/aggregationHeaders/tr" >
<xsl:variable name= "rowCounter" select= "position()-1" />
<xsl:variable name= "rowCounter" select= "position()-1" />
<xsl:variable name= "currentRowColCount" > <xsl:value-of select= "count(th[ @isHidden='false'])" /> </xsl:variable>
<xsl:variable name= "colCount" >
<xsl:choose >
<xsl:when test= "($rowCounter - 1)=$rowCount" >
<xsl:value-of select= "$totalColCount" />
</xsl:when>
<xsl:otherwise >
<xsl:value-of select= "$totalColCount" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select= "th" >
<xsl:for-each select= "th" >
<xsl:variable name= "colId" > <xsl:value-of select= "position()-1" /> </xsl:variable>
<xsl:variable name= "colId" > <xsl:value-of select= "position()-1" /> </xsl:variable>
<xsl:if test= "@isHidden='false'" >
<xsl:if test= "@isHidden='false'" >
@ -584,6 +603,9 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name= "colCount" select= "$colCount" />
<xsl:with-param name= "colCount" select= "$colCount" />
</xsl:call-template>
</xsl:call-template>
</xsl:variable>
</xsl:variable>
<xsl:comment > <xsl:text > columnX=</xsl:text> <xsl:value-of select= "$columnX" /> </xsl:comment>
<xsl:comment > <xsl:text > colCount=</xsl:text> <xsl:value-of select= "$colCount" /> </xsl:comment>
<xsl:comment > <xsl:text > druckbreite=</xsl:text> <xsl:value-of select= "$druckbreite" /> </xsl:comment>
<xsl:variable name= "columnWidth" >
<xsl:variable name= "columnWidth" >
<xsl:call-template name= "getColumnwidth" >
<xsl:call-template name= "getColumnwidth" >
<xsl:with-param name= "druckbreite" select= "$druckbreite" />
<xsl:with-param name= "druckbreite" select= "$druckbreite" />
@ -595,6 +617,7 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:call-template>
</xsl:call-template>
</xsl:variable>
</xsl:variable>
<xsl:comment > <xsl:text > columnWidth=</xsl:text> <xsl:value-of select= "$columnWidth" /> </xsl:comment>
<xsl:variable name= "rowspan" >
<xsl:variable name= "rowspan" >
<xsl:choose >
<xsl:choose >
@ -618,7 +641,7 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:variable>
</xsl:variable>
<textField isStretchWithOverflow= "true" >
<textField isStretchWithOverflow= "true" >
<reportElement positionType= "Float" style= "TableColumnHeader" mode= "Opaque" stretchType= "ContainerHeight"
<reportElement style= "TableColumnHeader" mode= "Opaque" stretchType= "ContainerHeight"
x="{$columnX}" y="{$y_offset+( $rowCounter * $zeilenhoehe )}" width="{$columnWidth * $colspan}" height="{$zeilenhoehe*$rowspan}" />
x="{$columnX}" y="{$y_offset+( $rowCounter * $zeilenhoehe )}" width="{$columnWidth * $colspan}" height="{$zeilenhoehe*$rowspan}" />
<textFieldExpression > <xsl:text > "</xsl:text>
<textFieldExpression > <xsl:text > "</xsl:text>
<xsl:call-template name= "newline_to_backslash_n" >
<xsl:call-template name= "newline_to_backslash_n" >
@ -727,29 +750,20 @@ isIgnorePagination="{$isIgnorePagination}" >
</textField>
</textField>
</xsl:if>
</xsl:if>
<!-- Legende -->
<!-- Legende -->
<textField >
<xsl:call-template name= "legendLabelAndContent" >
<reportElement style= "LegendLabel" x= "0" y= "{$subReportTitleHeight}" width= "{$druckbreite}" height= "{$legendLabelHeight}" />
<textElement verticalAlignment= "Bottom" >
<font isBold= "true" />
</textElement>
<textFieldExpression > <![CDATA["Filterkriterien: "]]> </textFieldExpression>
</textField>
<textField isStretchWithOverflow= "true" >
<reportElement style= "LegendContent" isPrintWhenDetailOverflows= "true" x= "0" y= "{$subReportTitleHeight + $legendLabelHeight}" width= "{$druckbreite}" height= "{$legendContentHeight}" />
<box padding= "5" />
<textFieldExpression >
<xsl:call-template name= "getLegendExpression" >
<xsl:with-param name= "ergebniselementOrdnr" select= "$ergebniselementOrdnr" />
<xsl:with-param name= "ergebniselementOrdnr" select= "$ergebniselementOrdnr" />
<xsl:with-param name= "subReportTitleHeight" select= "$subReportTitleHeight" />
<xsl:with-param name= "druckbreite" select= "$druckbreite" />
<xsl:with-param name= "legendLabelHeight" select= "$legendLabelHeight" />
<xsl:with-param name= "legendContentHeight" select= "$legendContentHeight" />
</xsl:call-template>
</xsl:call-template>
<xsl:text disable-output-escaping= "yes" > <![CDATA[ +"Datenstand: "+ $F{standdatum} + "; " + "Erstellt: "+ DATEFORMAT( TODAY(), "dd.MM.YYYY")]]> </xsl:text> </textFieldExpression>
</textField>
</band>
</band>
<band height= "{$hinweisContentHeight}" >
<band height= "{$hinweisContentHeight}" >
<printWhenExpression > <![CDATA[$F{Hinweis}.length() >0]]> </printWhenExpression>
<printWhenExpression > <![CDATA[$F{Hinweis}.length() >0]]> </printWhenExpression>
<!-- hinweis -->
<!-- hinweis -->
<textField isStretchWithOverflow= "true" >
<textField isStretchWithOverflow= "true" >
<reportElement style= "HinweisContent" positionType= "Float" isPrintWhenDetailOverflows= "true" x= "0" y= "0" width= "{$druckbreite}" height= "{$hinweisContentHeight}" />
<reportElement style= "HinweisContent" positionType= "Float" isPrintWhenDetailOverflows= "true" x= "0" y= "0" width= "{$druckbreite}" height= "{$hinweisContentHeight}" />
<box topPadding= "10" leftPadding= "2" bottomPadding= "10" rightPadding= "2" />
<textElement verticalAlignment= "Middle" />
<textElement verticalAlignment= "Middle" />
<textFieldExpression >
<textFieldExpression >
<xsl:text disable-output-escaping= "yes" > <![CDATA[$F{Hinweis}]]> </xsl:text> </textFieldExpression>
<xsl:text disable-output-escaping= "yes" > <![CDATA[$F{Hinweis}]]> </xsl:text> </textFieldExpression>
@ -834,6 +848,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:param name= "flavorTableRowStyle" />
<xsl:param name= "flavorTableRowStyle" />
<xsl:param name= "tableRowLevel" />
<xsl:param name= "tableRowLevel" />
<xsl:param name= "ergebnisElementOrdnr" select= "0" />
<xsl:param name= "ergebnisElementOrdnr" select= "0" />
<xsl:param name= "fieldType" />
<xsl:choose >
<xsl:choose >
<xsl:when test= "$flavorTableRowStyle='listAlternatingBg'" >
<xsl:when test= "$flavorTableRowStyle='listAlternatingBg'" >
<xsl:text > TableRowDetail</xsl:text>
<xsl:text > TableRowDetail</xsl:text>
@ -954,27 +969,31 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</xsl:template>
</xsl:template>
<xsl:template name= "tableCellPattern" >
<xsl:template name= "tableCellPatternExpression " >
<xsl:param name= "fieldType" />
<xsl:param name= "fieldType" />
<xsl:param name= "ergebnisElementOrdnr" />
<xsl:param name= "fieldName" />
<patternExpression >
<xsl:choose >
<xsl:choose >
<xsl:when test= "$fieldType='4'" > <!-- integer -->
<xsl:when test= "$fieldType='4'" > <!-- integer -->
<xsl:text > 0</xsl:text>
<xsl:text > "#,## 0" </xsl:text>
</xsl:when>
</xsl:when>
<xsl:when test= "$fieldType='3'" > <!-- decimal -->
<xsl:when test= "$fieldType='3'" > <!-- decimal -->
<xsl:text > #,##0.00;-#,##0.00</xsl:text>
<xsl:text > " #,##0.00;-#,##0.00" </xsl:text>
</xsl:when>
</xsl:when>
<xsl:when test= "$fieldType='6'" > <!-- date -->
<xsl:when test= "$fieldType='6'" > <!-- date -->
<xsl:text > dd.MM.yyyy</xsl:text>
<xsl:text > " dd.MM.yyyy" </xsl:text>
</xsl:when>
</xsl:when>
<xsl:when test= "$fieldType='8'" > <!-- timestamp -->
<xsl:when test= "$fieldType='8'" > <!-- timestamp -->
<xsl:text > dd.MM.yyyy hh:mm:ss</xsl:text>
<xsl:text > " dd.MM.yyyy hh:mm:ss" </xsl:text>
</xsl:when>
</xsl:when>
<xsl:when test= "$fieldType='9'" > <!-- time -->
<xsl:when test= "$fieldType='9'" > <!-- time -->
<xsl:text > hh:mm:ss</xsl:text>
<xsl:text > " hh:mm:ss" </xsl:text>
</xsl:when>
</xsl:when>
<xsl:otherwise >
<xsl:otherwise >
</xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</patternExpression>
</xsl:template>
</xsl:template>
<xsl:template name= "newline_to_backslash_n" >
<xsl:template name= "newline_to_backslash_n" >
<xsl:param name= "string" />
<xsl:param name= "string" />
@ -991,4 +1010,30 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</xsl:template>
</xsl:template>
<xsl:template name= "legendLabelAndContent" >
<xsl:param name= "ergebniselementOrdnr" select= "0" />
<xsl:param name= "subReportTitleHeight" select= "10" />
<xsl:param name= "druckbreite" select= "842" />
<xsl:param name= "legendLabelHeight" select= "10" />
<xsl:param name= "legendContentHeight" select= "50" />
<textField >
<reportElement style= "LegendLabel" x= "0" y= "{$subReportTitleHeight}" width= "{$druckbreite}" height= "{$legendLabelHeight}" />
<textElement verticalAlignment= "Bottom" >
<font isBold= "true" />
</textElement>
<textFieldExpression > <![CDATA["Filterkriterien: "]]> </textFieldExpression>
</textField>
<textField isStretchWithOverflow= "true" >
<reportElement style= "LegendContent" isPrintWhenDetailOverflows= "true" x= "0" y= "{$subReportTitleHeight + $legendLabelHeight}" width= "{$druckbreite}" height= "{$legendContentHeight}" />
<box topPadding= "10" leftPadding= "2" bottomPadding= "10" rightPadding= "2" />
<textFieldExpression >
<xsl:call-template name= "getLegendExpression" >
<xsl:with-param name= "ergebniselementOrdnr" select= "$ergebniselementOrdnr" />
</xsl:call-template>
<xsl:text disable-output-escaping= "yes" > <![CDATA[ +"Datenstand: "+ $F{standdatum} + "; " + "Erstellt: "+ DATEFORMAT( TODAY(), "dd.MM.YYYY")]]> </xsl:text> </textFieldExpression>
</textField>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>