elhilali4 Posted June 3, 2015 Posted June 3, 2015 <?xml version="1.0" encoding="UTF-8"?> <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="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7ba42f2b-b1ac-425b-ad62-fee53ae12f5f"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="ireport.jasperserver.reportUnit" value="/Explore/FontColorBasedOnCondition"/> <property name="ireport.jasperserver.url" value="http://localhost:8080/jasperserver-pro/services/repository"/> <style name="style1"> <conditionalStyle> <conditionExpression><![CDATA[$F{storesales}>=30]]></conditionExpression> <style forecolor="#16B433"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$F{storesales}<30]]></conditionExpression> <style forecolor="#F22962"/> </conditionalStyle> </style> <queryString> <![CDATA[select customer_id,sum(store_sales) StoreSales,sum(store_cost) StoreCost from sales_fact_1997 group by customer_id limit 10]]> </queryString> <field name="customer_id" class="java.lang.Integer"/> <field name="storesales" class="java.math.BigDecimal"/> <field name="storecost" class="java.math.BigDecimal"/> <background> <band splitType="Stretch"/> </background> <title> <band height="34" splitType="Stretch"/> </title> <columnHeader> <band height="20" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="185" height="20" uuid="703099b6-af82-41f1-b065-434edf2894f8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <text><![CDATA[customer_id]]></text> </staticText> <staticText> <reportElement x="185" y="0" width="282" height="20" uuid="fbfb55e3-e381-4a3b-9ea9-e47bb38f9631"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <text><![CDATA[storesales]]></text> </staticText> <staticText> <reportElement x="467" y="0" width="88" height="20" uuid="9e3d28ef-1d5c-4a25-a0a9-54bb008bc605"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <text><![CDATA[storecost]]></text> </staticText> </band> </columnHeader> <detail> <band height="20" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="185" height="20" uuid="085668e3-b5c2-4b7e-ad69-c9cadefb6e3d"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{customer_id}]]></textFieldExpression> </textField> <textField> <reportElement style="style1" x="185" y="0" width="282" height="20" uuid="e79bec6e-9289-4f62-99f8-66e457cff742"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{storesales}]]></textFieldExpression> </textField> <textField> <reportElement x="467" y="0" width="88" height="20" uuid="9ecd6c67-3b8e-43e5-b873-f2376fd694e4"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$F{storecost}]]></textFieldExpression> </textField> </band> </detail> </jasperReport>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now