Changeset 545
- Timestamp:
- May 25, 2010, 12:17:20 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/ReportController.groovy
r544 r545 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 import org.codehaus.groovy.grails.commons.ConfigurationHolder 2 3 import org.springframework.web.servlet.support.RequestContextUtils as RCU 3 4 … … 14 15 15 16 def templatePortrait = { 16 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 17 18 params.startDate = new Date() 19 params.endDate = new Date() 17 20 18 21 params.reportTitle = "Template Report (Portrait)" 22 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 19 23 params.currentUser = authService.currentUser 24 params.startDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.startDate) 25 params.endDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.endDate) 26 20 27 def dataModel = createTemplateData() 21 28 22 chain(controller:'jasper', action:'index', model:[data: dataModel], params:params) 23 } 29 // Jasper plugin controller expects data to be a Collection. 30 chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params) 31 32 } // templatePortrait 24 33 25 34 def templateLandscape = { 26 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 35 36 params.startDate = new Date() 37 params.endDate = new Date() 27 38 28 39 params.reportTitle = "Template Report (Landscape)" 40 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 29 41 params.currentUser = authService.currentUser 42 params.startDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.startDate) 43 params.endDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.endDate) 44 30 45 def dataModel = createTemplateData() 31 46 32 chain(controller:'jasper', action:'index', model:[data: dataModel], params:params) 33 } 47 // Jasper plugin controller expects data to be a Collection. 48 chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params) 49 50 } // templateLandscape 34 51 35 52 private createTemplateData() { 36 def dataModel = [] 53 54 def result = [:] 55 result.summaryOfCalculationMethod = "Summary string of the calculations performed." 56 result.dataList = [] 37 57 for(i in 1..5) { 38 def data = [:]39 data .description = "Data description " + i.toString()40 dataModel.add(data)58 def dataDetails = [:] 59 dataDetails.description = "Data description " + i.toString() 60 result.dataList << dataDetails 41 61 } 42 return dataModel 43 } 62 63 // Success. 64 return result 65 66 } // createTemplateData 67 68 def downloadTemplate = { 69 70 // params.fileName is not used directly to negate any security issues.. 71 def fileName = (params.fileName == 'templateLandscape.jrxml') ? 'templateLandscape.jrxml' : 'templatePortrait.jrxml' 72 def f = grailsApplication.mainContext.getResource("reports/${fileName}").getFile() 73 if(f.isFile()) { 74 response.contentType = ConfigurationHolder.config.grails.mime.types["text"] 75 response.setHeader("Content-disposition", "attachment; filename=${fileName}") 76 render f.text 77 } 78 else 79 render(status:404, text: "File Not Found: ${f}") 80 81 } // downLoadTemplate 44 82 45 83 def reactiveRatio = { … … 51 89 params.endDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.endDate) 52 90 53 def dataModel = [taskReportService.getReactiveRatio(params, RCU.getLocale(request))]91 def dataModel = taskReportService.getReactiveRatio(params, RCU.getLocale(request)) 54 92 55 chain(controller:'jasper', action:'index', model:[data: dataModel], params:params) 56 } 93 // Jasper plugin controller expects data to be a Collection. 94 chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params) 95 96 } // reactiveRatio 57 97 58 98 def immediateCallouts = { … … 64 104 params.endDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: params.endDate) 65 105 66 def dataModel = [taskReportService.getImmediateCallouts(params, RCU.getLocale(request))]106 def dataModel = taskReportService.getImmediateCallouts(params, RCU.getLocale(request)) 67 107 68 // render dataModel 69 chain(controller:'jasper', action:'index', model:[data: dataModel], params:params)108 // Jasper plugin controller expects data to be a Collection. 109 chain(controller:'jasper', action:'index', model:[data: [dataModel]], params:params) 70 110 71 } 111 } // immediateCallouts 72 112 73 113 } // end of class. -
trunk/grails-app/services/TaskReportService.groovy
r544 r545 1 import grails.orm.PagedResultList2 1 3 2 /** … … 10 9 def authService 11 10 def dateUtilService 12 def sessionFactory13 11 // def messageSource 14 12 -
trunk/grails-app/views/appCore/start.gsp
r544 r545 127 127 name="Template (Portrait)" 128 128 format="PDF, XLS"/> 129 <g:link controller="report" action="downloadTemplate" params="[fileName: 'templatePortrait.jrxml']"> 130 Download 131 </g:link> 129 132 <br /> 130 133 <g:jasperReport controller="report" … … 133 136 name="Template (Landscape)" 134 137 format="PDF, XLS"/> 138 <g:link controller="report" action="downloadTemplate" params="[fileName: 'templateLandscape.jrxml']"> 139 Download 140 </g:link> 135 141 <br /> 136 142 </td> -
trunk/web-app/reports/immediateCallouts.jrxml
r544 r545 80 80 <parameter name="startDateString" class="java.lang.String"/> 81 81 <parameter name="endDateString" class="java.lang.String"/> 82 <queryString language=" hql">82 <queryString language="SQL"> 83 83 <![CDATA[]]> 84 84 </queryString> -
trunk/web-app/reports/templateLandscape.jrxml
r533 r545 1 1 <?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="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true"> 3 3 <property name="ireport.scriptlethandling" value="0"/> 4 4 <property name="ireport.encoding" value="UTF-8"/> … … 6 6 <property name="ireport.x" value="0"/> 7 7 <property name="ireport.y" value="0"/> 8 <import value="net.sf.jasperreports.engine.*"/> 8 9 <import value="java.util.*"/> 9 <import value="net.sf.jasperreports.engine.*"/>10 10 <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"> 13 23 <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> 33 64 <parameter name="reportTitle" class="java.lang.String"/> 34 65 <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"/> 36 77 <background> 37 78 <band splitType="Stretch"/> 38 79 </background> 39 80 <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"> 44 85 <font size="20"/> 45 86 </textElement> 46 87 <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> 47 97 </textField> 48 98 </band> 49 99 </pageHeader> 50 100 <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"/> 58 102 </columnHeader> 59 103 <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="662" 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="662"> 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> 71 120 </band> 72 121 </detail> 73 122 <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"/> 81 124 </columnFooter> 82 125 <pageFooter> … … 88 131 </textField> 89 132 <textField> 90 <reportElement x="662" y=" 0" width="80" height="20"/>133 <reportElement x="662" y="20" width="80" height="20"/> 91 134 <textElement textAlignment="Right"/> 92 135 <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> 93 136 </textField> 94 137 <textField evaluationTime="Report"> 95 <reportElement x="742" y=" 0" width="40" height="20"/>138 <reportElement x="742" y="20" width="40" height="20"/> 96 139 <textElement/> 97 140 <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> … … 114 157 </band> 115 158 </pageFooter> 159 <lastPageFooter> 160 <band height="40"> 161 <textField evaluationTime="Report"> 162 <reportElement x="742" 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="662" 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="221" y="12" 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="782" height="311"/> 204 <textElement/> 205 <textFieldExpression class="java.lang.String"><![CDATA[$F{summaryOfCalculationMethod}]]></textFieldExpression> 206 </textField> 207 </band> 208 </summary> 116 209 <noData> 117 210 <band height="85" splitType="Stretch"> -
trunk/web-app/reports/templatePortrait.jrxml
r533 r545 1 1 <?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"> 3 3 <property name="ireport.scriptlethandling" value="0"/> 4 4 <property name="ireport.encoding" value="UTF-8"/> … … 6 6 <property name="ireport.x" value="0"/> 7 7 <property name="ireport.y" value="0"/> 8 <import value="net.sf.jasperreports.engine.*"/> 8 9 <import value="java.util.*"/> 9 <import value="net.sf.jasperreports.engine.*"/>10 10 <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"> 13 23 <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> 33 64 <parameter name="reportTitle" class="java.lang.String"/> 34 65 <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"/> 36 77 <background> 37 78 <band splitType="Stretch"/> 38 79 </background> 39 80 <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"> 44 85 <font size="20"/> 45 86 </textElement> 46 87 <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> 47 97 </textField> 48 98 </band> 49 99 </pageHeader> 50 100 <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"/> 58 102 </columnHeader> 59 103 <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> 71 120 </band> 72 121 </detail> 73 122 <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"/> 81 124 </columnFooter> 82 125 <pageFooter> … … 88 131 </textField> 89 132 <textField> 90 <reportElement x=" 662" y="0" width="80" height="20"/>133 <reportElement x="415" y="20" width="80" height="20"/> 91 134 <textElement textAlignment="Right"/> 92 135 <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> 93 136 </textField> 94 137 <textField evaluationTime="Report"> 95 <reportElement x=" 742" y="0" width="40" height="20"/>138 <reportElement x="495" y="20" width="40" height="20"/> 96 139 <textElement/> 97 140 <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> … … 114 157 </band> 115 158 </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> 116 209 <noData> 117 210 <band height="85" splitType="Stretch"> 118 211 <textField> 119 <reportElement x="0" y="35" width=" 782" height="50"/>212 <reportElement x="0" y="35" width="535" height="50"/> 120 213 <textElement textAlignment="Center" markup="none"> 121 214 <font size="14" isBold="true"/> … … 125 218 </textField> 126 219 <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"/> 128 221 <textElement textAlignment="Center" markup="none"> 129 222 <font size="20"/>
Note: See TracChangeset
for help on using the changeset viewer.