Ignore:
Timestamp:
May 25, 2010, 12:17:20 AM (14 years ago)
Author:
gav
Message:

Update report templates, add downloadTemplate action and general tidy up of reports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/reports/templatePortrait.jrxml

    r533 r545  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="name" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20">
     2<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="reportName" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true">
    33        <property name="ireport.scriptlethandling" value="0"/>
    44        <property name="ireport.encoding" value="UTF-8"/>
     
    66        <property name="ireport.x" value="0"/>
    77        <property name="ireport.y" value="0"/>
     8        <import value="net.sf.jasperreports.engine.*"/>
    89        <import value="java.util.*"/>
    9         <import value="net.sf.jasperreports.engine.*"/>
    1010        <import value="net.sf.jasperreports.engine.data.*"/>
    11         <style name="table" isDefault="false">
    12                 <box>
     11        <style name="Crosstab Data Text" isDefault="false" hAlign="Center"/>
     12        <style name="table" isDefault="false" fill="Solid" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
     13                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
     14                        <pen lineWidth="0.0" lineColor="#000000"/>
     15                        <topPen lineWidth="0.0"/>
     16                        <leftPen lineWidth="0.0"/>
     17                        <bottomPen lineWidth="0.0"/>
     18                        <rightPen lineWidth="0.0"/>
     19                </box>
     20        </style>
     21        <style name="table_TH" isDefault="false" mode="Opaque" backcolor="#C7C7C7" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
     22                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
    1323                        <pen lineWidth="1.0" lineColor="#000000"/>
    14                 </box>
    15         </style>
    16         <style name="table_TH" isDefault="false" mode="Opaque" backcolor="#F0F8FF">
    17                 <box>
    18                         <pen lineWidth="0.5" lineColor="#000000"/>
    19                 </box>
    20         </style>
    21         <style name="table_CH" isDefault="false" mode="Opaque" backcolor="#BFE1FF">
    22                 <box>
    23                         <pen lineWidth="0.5" lineColor="#000000"/>
    24                 </box>
    25         </style>
    26         <style name="table_TD" isDefault="false" mode="Opaque" backcolor="#FFFFFF">
    27                 <box>
    28                         <pen lineWidth="0.5" lineColor="#000000"/>
    29                 </box>
    30         </style>
    31         <subDataset name="dataset1"/>
    32         <subDataset name="Table Dataset 1"/>
     24                        <topPen lineWidth="1.0"/>
     25                        <leftPen lineWidth="0.0"/>
     26                        <bottomPen lineWidth="1.0"/>
     27                        <rightPen lineWidth="0.0"/>
     28                </box>
     29        </style>
     30        <style name="table_CH" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
     31                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
     32                        <pen lineWidth="1.0" lineColor="#000000"/>
     33                        <topPen lineWidth="0.0"/>
     34                        <leftPen lineWidth="0.0"/>
     35                        <bottomPen lineWidth="1.0"/>
     36                        <rightPen lineWidth="0.0"/>
     37                </box>
     38        </style>
     39        <style name="table_TD" isDefault="false" mode="Opaque" backcolor="#FFFFFF" fontSize="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
     40                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
     41                        <pen lineWidth="1.0" lineColor="#000000"/>
     42                        <topPen lineWidth="1.0"/>
     43                        <leftPen lineWidth="0.0"/>
     44                        <bottomPen lineWidth="1.0"/>
     45                        <rightPen lineWidth="0.0"/>
     46                </box>
     47                <conditionalStyle>
     48                        <conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
     49                        <style isDefault="false" style="table_TD" backcolor="#F7F7F7"/>
     50                </conditionalStyle>
     51        </style>
     52        <style name="table_CF" isDefault="false" mode="Opaque" backcolor="#EDEDED" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
     53                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
     54                        <pen lineWidth="1.0"/>
     55                        <topPen lineWidth="1.0"/>
     56                        <leftPen lineWidth="0.0"/>
     57                        <bottomPen lineWidth="1.0"/>
     58                        <rightPen lineWidth="0.0"/>
     59                </box>
     60        </style>
     61        <subDataset name="dataset1">
     62                <field name="description" class="java.lang.String"/>
     63        </subDataset>
    3364        <parameter name="reportTitle" class="java.lang.String"/>
    3465        <parameter name="currentUser" class="java.lang.String"/>
    35         <field name="description" class="java.lang.String"/>
     66        <parameter name="logoUrl" class="java.lang.String"/>
     67        <parameter name="startDateString" class="java.lang.String"/>
     68        <parameter name="endDateString" class="java.lang.String"/>
     69        <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
     70                <defaultValueExpression><![CDATA["C:\\Documents and Settings\\kromhoutg\\My Documents\\reports\\"]]></defaultValueExpression>
     71        </parameter>
     72        <queryString language="SQL">
     73                <![CDATA[]]>
     74        </queryString>
     75        <field name="summaryOfCalculationMethod" class="java.lang.String"/>
     76        <field name="dataList" class="java.util.List"/>
    3677        <background>
    3778                <band splitType="Stretch"/>
    3879        </background>
    3980        <pageHeader>
    40                 <band height="35" splitType="Stretch">
    41                         <textField>
    42                                 <reportElement key="staticText-1" x="0" y="0" width="782" height="35"/>
    43                                 <textElement textAlignment="Center" markup="none">
     81                <band height="121" splitType="Stretch">
     82                        <textField>
     83                                <reportElement key="staticText-1" x="0" y="57" width="340" height="30"/>
     84                                <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
    4485                                        <font size="20"/>
    4586                                </textElement>
    4687                                <textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression>
     88                        </textField>
     89                        <image>
     90                                <reportElement x="0" y="0" width="340" height="57"/>
     91                                <imageExpression class="java.net.URL"><![CDATA[new URL($P{logoUrl})]]></imageExpression>
     92                        </image>
     93                        <textField pattern="dd-MMM-yyyy" isBlankWhenNull="true">
     94                                <reportElement x="0" y="87" width="340" height="20"/>
     95                                <textElement textAlignment="Center" verticalAlignment="Middle" markup="none"/>
     96                                <textFieldExpression class="java.lang.String"><![CDATA[$P{startDateString}+" to "+$P{endDateString}]]></textFieldExpression>
    4797                        </textField>
    4898                </band>
    4999        </pageHeader>
    50100        <columnHeader>
    51                 <band height="28" splitType="Stretch">
    52                         <textField>
    53                                 <reportElement x="341" y="0" width="100" height="20"/>
    54                                 <textElement textAlignment="Center"/>
    55                                 <textFieldExpression class="java.lang.String"><![CDATA["Column Header"]]></textFieldExpression>
    56                         </textField>
    57                 </band>
     101                <band splitType="Stretch"/>
    58102        </columnHeader>
    59103        <detail>
    60                 <band height="113" splitType="Stretch">
    61                         <textField>
    62                                 <reportElement x="100" y="0" width="182" height="20"/>
    63                                 <textElement/>
    64                                 <textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression>
    65                         </textField>
    66                         <textField>
    67                                 <reportElement x="0" y="0" width="100" height="20"/>
    68                                 <textElement markup="none"/>
    69                                 <textFieldExpression class="java.lang.String"><![CDATA["Description: "]]></textFieldExpression>
    70                         </textField>
     104                <band height="268" splitType="Stretch">
     105                        <componentElement>
     106                                <reportElement x="0" y="0" width="535" height="26"/>
     107                                <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
     108                                        <datasetRun subDataset="dataset1">
     109                                                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{dataList})]]></dataSourceExpression>
     110                                        </datasetRun>
     111                                        <jr:listContents height="26" width="535">
     112                                                <textField>
     113                                                        <reportElement x="0" y="0" width="400" height="20"/>
     114                                                        <textElement/>
     115                                                        <textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression>
     116                                                </textField>
     117                                        </jr:listContents>
     118                                </jr:list>
     119                        </componentElement>
    71120                </band>
    72121        </detail>
    73122        <columnFooter>
    74                 <band height="27" splitType="Stretch">
    75                         <textField>
    76                                 <reportElement x="341" y="7" width="100" height="20"/>
    77                                 <textElement textAlignment="Center"/>
    78                                 <textFieldExpression class="java.lang.String"><![CDATA["Column Footer"]]></textFieldExpression>
    79                         </textField>
    80                 </band>
     123                <band splitType="Stretch"/>
    81124        </columnFooter>
    82125        <pageFooter>
     
    88131                        </textField>
    89132                        <textField>
    90                                 <reportElement x="662" y="0" width="80" height="20"/>
     133                                <reportElement x="415" y="20" width="80" height="20"/>
    91134                                <textElement textAlignment="Right"/>
    92135                                <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
    93136                        </textField>
    94137                        <textField evaluationTime="Report">
    95                                 <reportElement x="742" y="0" width="40" height="20"/>
     138                                <reportElement x="495" y="20" width="40" height="20"/>
    96139                                <textElement/>
    97140                                <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
     
    114157                </band>
    115158        </pageFooter>
     159        <lastPageFooter>
     160                <band height="40">
     161                        <textField evaluationTime="Report">
     162                                <reportElement x="495" y="20" width="40" height="20"/>
     163                                <textElement/>
     164                                <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
     165                        </textField>
     166                        <textField pattern="dd-MMM-yyyy">
     167                                <reportElement x="82" y="0" width="200" height="20"/>
     168                                <textElement/>
     169                                <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
     170                        </textField>
     171                        <textField>
     172                                <reportElement x="0" y="0" width="82" height="20"/>
     173                                <textElement markup="none"/>
     174                                <textFieldExpression class="java.lang.String"><![CDATA["Generated: "]]></textFieldExpression>
     175                        </textField>
     176                        <textField>
     177                                <reportElement x="0" y="20" width="82" height="20"/>
     178                                <textElement markup="none"/>
     179                                <textFieldExpression class="java.lang.String"><![CDATA["By: "]]></textFieldExpression>
     180                        </textField>
     181                        <textField>
     182                                <reportElement x="82" y="20" width="200" height="20"/>
     183                                <textElement markup="none"/>
     184                                <textFieldExpression class="java.lang.String"><![CDATA[$P{currentUser}]]></textFieldExpression>
     185                        </textField>
     186                        <textField>
     187                                <reportElement x="415" y="20" width="80" height="20"/>
     188                                <textElement textAlignment="Right"/>
     189                                <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
     190                        </textField>
     191                </band>
     192        </lastPageFooter>
     193        <summary>
     194                <band height="369">
     195                        <textField>
     196                                <reportElement key="staticText-1" x="97" y="11" width="340" height="30"/>
     197                                <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
     198                                        <font size="20"/>
     199                                </textElement>
     200                                <textFieldExpression class="java.lang.String"><![CDATA["Summary of Calculation Method"]]></textFieldExpression>
     201                        </textField>
     202                        <textField>
     203                                <reportElement x="0" y="50" width="535" height="311"/>
     204                                <textElement/>
     205                                <textFieldExpression class="java.lang.String"><![CDATA[$F{summaryOfCalculationMethod}]]></textFieldExpression>
     206                        </textField>
     207                </band>
     208        </summary>
    116209        <noData>
    117210                <band height="85" splitType="Stretch">
    118211                        <textField>
    119                                 <reportElement x="0" y="35" width="782" height="50"/>
     212                                <reportElement x="0" y="35" width="535" height="50"/>
    120213                                <textElement textAlignment="Center" markup="none">
    121214                                        <font size="14" isBold="true"/>
     
    125218                        </textField>
    126219                        <textField>
    127                                 <reportElement key="staticText-1" x="0" y="0" width="782" height="35"/>
     220                                <reportElement key="staticText-1" x="0" y="0" width="535" height="35"/>
    128221                                <textElement textAlignment="Center" markup="none">
    129222                                        <font size="20"/>
Note: See TracChangeset for help on using the changeset viewer.