- Timestamp:
- Oct 5, 2010, 2:24:33 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/ReportController.groovy
r679 r681 161 161 params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL() 162 162 params.currentUser = authService.currentUser 163 if(params.section.id == 'all')164 params.section = "All"165 else166 params.section = Section.get(params.section.id.toLong())167 163 168 164 def dataModel = assetReportService.getAssetRegister(params, RCU.getLocale(request)) -
trunk/grails-app/services/AssetReportService.groovy
r679 r681 24 24 def result = [:] 25 25 26 result.section = Section.get(params.section.id.toLong()) 27 result.site = result.section.site 28 26 29 // Inner join used to return only attribTypes that are used by AssetExtendedAttributes. 27 30 // So the result is only asset extendedAttributeTypes. … … 44 47 'left join asset.assetExtendedAttributes as attrib', 45 48 'left join attrib.extendedAttributeType as attribT' 46 if(params.section instanceof Section) { 47 namedParams.section = params.section 48 where 'asset.section = :section' 49 } 49 where 'asset.section = :section' 50 namedParams.section = result.section 50 51 order 'by asset.name asc, attribT.name asc' 51 52 } -
trunk/grails-app/views/appCore/start.gsp
r679 r681 156 156 <g:select optionKey="id" 157 157 from="${Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}" 158 name="section.id" 159 noSelection="['all':/${g.message(code:'default.all.select.text')}/]"> 158 name="section.id"> 160 159 </g:select> 161 160 </g:jasperReport> -
trunk/web-app/reports/assetRegister.jrxml
r678 r681 5 5 <property name="ireport.zoom" value="1.5"/> 6 6 <property name="ireport.x" value="15"/> 7 <property name="ireport.y" value=" 0"/>7 <property name="ireport.y" value="729"/> 8 8 <import value="net.sf.jasperreports.engine.*"/> 9 9 <import value="java.util.*"/> … … 57 57 <parameter name="currentUser" class="java.lang.String"/> 58 58 <parameter name="logoUrl" class="java.lang.String"/> 59 <parameter name="section" class="java.lang.String"/>60 59 <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> 61 60 <defaultValueExpression><![CDATA["C:\\Documents and Settings\\kromhoutg\\My Documents\\reports\\"]]></defaultValueExpression> … … 66 65 <field name="dataList" class="java.util.List"/> 67 66 <field name="attribTypes" class="java.util.List"/> 67 <field name="site" class="java.lang.Object"/> 68 <field name="section" class="java.lang.Object"/> 68 69 <background> 69 70 <band splitType="Stretch"/> … … 83 84 </image> 84 85 <textField> 85 <reportElement x="398" y="34" width="340" height="1 2"/>86 <reportElement x="398" y="34" width="340" height="15" isPrintWhenDetailOverflows="true"/> 86 87 <textElement textAlignment="Center"> 87 <font fontName="Serif" size=" 8"/>88 </textElement> 89 <textFieldExpression class="java.lang.String"><![CDATA["S ection: "+$P{section}]]></textFieldExpression>88 <font fontName="Serif" size="10"/> 89 </textElement> 90 <textFieldExpression class="java.lang.String"><![CDATA["Site: "+$F{site}.name+", "+"Section: "+$F{section}.name]]></textFieldExpression> 90 91 </textField> 91 92 </band>
Note: See TracChangeset
for help on using the changeset viewer.