Jump to content
We've recently updated our Privacy Statement, available here ×

relixus

Members
  • Posts

    2
  • Joined

  • Last visited

relixus's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. here is my jrxml code sir. thank you. Code:<?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="report name" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[sELECT employee_catalog.`emp_code` AS employee_catalog_emp_code, employee_catalog.`emp_fname` AS employee_catalog_emp_fname, employee_catalog.`emp_mname` AS employee_catalog_emp_mname, employee_catalog.`emp_lname` AS employee_catalog_emp_lname, employee_catalog.`def_ot_rate` AS employee_catalog_def_ot_rate, ot_catalog.`ot_date` AS ot_catalog_ot_date, ot_catalog.`emp_num` AS ot_catalog_emp_num, ot_catalog.`ot_in_pm` AS ot_catalog_ot_in_pm, ot_catalog.`ot_out_pm` AS ot_catalog_ot_out_pm, ot_catalog.`ot_out_am` AS ot_catalog_ot_out_am, ot_catalog.`ot_in_am` AS ot_catalog_ot_in_am, ot_catalog.`ot_rate` AS ot_catalog_ot_rateFROM `employee_catalog` employee_catalog INNER JOIN `ot_catalog` ot_catalog ON employee_catalog.`emp_code` = ot_catalog.`emp_num`]]> </queryString> <field name="employee_catalog_emp_code" class="java.lang.String"/> <field name="employee_catalog_emp_fname" class="java.lang.String"/> <field name="employee_catalog_emp_mname" class="java.lang.String"/> <field name="employee_catalog_emp_lname" class="java.lang.String"/> <field name="employee_catalog_def_ot_rate" class="java.lang.Double"/> <field name="ot_catalog_ot_date" class="java.sql.Date"/> <field name="ot_catalog_emp_num" class="java.lang.String"/> <field name="ot_catalog_ot_in_pm" class="java.sql.Time"/> <field name="ot_catalog_ot_out_pm" class="java.sql.Time"/> <field name="ot_catalog_ot_out_am" class="java.sql.Time"/> <field name="ot_catalog_ot_in_am" class="java.sql.Time"/> <field name="ot_catalog_ot_rate" class="java.lang.Double"/> <variable name="totalTime" class="java.lang.Float"/> <variable name="totalPay" class="java.lang.Double"/> <variable name="grandTotal" class="java.lang.Double" resetType="None" incrementType="Group" incrementGroup="employee" calculation="Sum"/> <group name="employee"> <groupExpression><![CDATA[$F{employee_catalog_emp_code}]]></groupExpression> <groupHeader> <band height="43"> <rectangle> <reportElement x="0" y="0" width="555" height="20" forecolor="#FFFFFF" backcolor="#333333"/> </rectangle> <textField> <reportElement x="0" y="0" width="108" height="20" forecolor="#FFFFFF"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{employee_catalog_emp_code}]]></textFieldExpression> </textField> <textField> <reportElement x="108" y="0" width="100" height="20" forecolor="#FFFFFF"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{employee_catalog_emp_lname}]]></textFieldExpression> </textField> <textField> <reportElement x="208" y="0" width="100" height="20" forecolor="#FFFFFF"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{employee_catalog_emp_fname}]]></textFieldExpression> </textField> <textField> <reportElement x="308" y="0" width="100" height="20" forecolor="#FFFFFF"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{employee_catalog_emp_mname}]]></textFieldExpression> </textField> <rectangle> <reportElement x="0" y="20" width="555" height="20" backcolor="#999999"/> <graphicElement> <pen lineStyle="Dotted"/> </graphicElement> </rectangle> <staticText> <reportElement x="0" y="20" width="108" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[OT Date]]></text> </staticText> <staticText> <reportElement x="108" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[AM In]]></text> </staticText> <staticText> <reportElement x="169" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[AM Out]]></text> </staticText> <staticText> <reportElement x="230" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[PM In]]></text> </staticText> <staticText> <reportElement x="291" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[PM Out]]></text> </staticText> <staticText> <reportElement x="352" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[OT Rate]]></text> </staticText> <staticText> <reportElement x="474" y="23" width="81" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[Total OT Pay]]></text> </staticText> <staticText> <reportElement x="413" y="23" width="61" height="20"/> <textElement textAlignment="Center"/> <text><![CDATA[Time Total]]></text> </staticText> </band> </groupHeader> <groupFooter> <band height="37"> <textField evaluationTime="Auto"> <reportElement x="474" y="0" width="80" height="20"/> <textElement/> <textFieldExpression class="java.lang.Double"><![CDATA[$V{totalPay}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="27" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="24" splitType="Stretch"/> </columnHeader> <detail> <band height="21" splitType="Stretch"> <textField pattern="MM/dd/yyyy"> <reportElement x="0" y="0" width="107" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.util.Date"><![CDATA[$F{ot_catalog_ot_date}]]></textFieldExpression> </textField> <line> <reportElement x="107" y="0" width="1" height="20"/> </line> <textField pattern="HH:mm" isBlankWhenNull="true"> <reportElement x="108" y="0" width="61" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.sql.Time"><![CDATA[$F{ot_catalog_ot_in_am}]]></textFieldExpression> </textField> <line> <reportElement x="169" y="0" width="1" height="20"/> </line> <textField pattern="HH:mm" isBlankWhenNull="true"> <reportElement x="170" y="0" width="60" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.sql.Time"><![CDATA[$F{ot_catalog_ot_out_am}]]></textFieldExpression> </textField> <line> <reportElement x="230" y="0" width="1" height="20"/> </line> <textField pattern="HH:mm" isBlankWhenNull="true"> <reportElement x="231" y="0" width="60" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.sql.Time"><![CDATA[$F{ot_catalog_ot_in_pm}]]></textFieldExpression> </textField> <line> <reportElement x="291" y="0" width="1" height="20"/> </line> <textField pattern="HH:mm" isBlankWhenNull="true"> <reportElement x="292" y="0" width="60" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.sql.Time"><![CDATA[$F{ot_catalog_ot_out_pm}]]></textFieldExpression> </textField> <line> <reportElement x="352" y="0" width="1" height="20"/> </line> <textField pattern="###0.00" isBlankWhenNull="true"> <reportElement x="353" y="0" width="60" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.lang.Double"><![CDATA[$F{ot_catalog_ot_rate}]]></textFieldExpression> </textField> <line> <reportElement x="413" y="0" width="1" height="20"/> </line> <line> <reportElement x="0" y="20" width="555" height="1"/> </line> <line> <reportElement x="0" y="-1" width="1" height="20"/> </line> <line> <reportElement x="555" y="0" width="1" height="20"/> </line> <textField pattern="###0.00;-###0.00" isBlankWhenNull="true"> <reportElement x="414" y="1" width="60" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.lang.Float"><![CDATA[(($F{ot_catalog_ot_out_am}!=null&&$F{ot_catalog_ot_in_am}!=null)?(float)((float)((float)((($F{ot_catalog_ot_out_am}.getTime())-($F{ot_catalog_ot_in_am}.getTime()))/1000)/60)/60):(float)0.00)+(($F{ot_catalog_ot_in_pm}!=null&&$F{ot_catalog_ot_out_pm}!=null)?((float)((float)((float)($F{ot_catalog_ot_out_pm}.getTime()-$F{ot_catalog_ot_in_pm}.getTime())/1000)/60)/60):(float)0.00)]]></textFieldExpression> </textField> <line> <reportElement x="474" y="1" width="1" height="20"/> </line> <textField evaluationTime="Auto"> <reportElement x="475" y="1" width="80" height="20"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.lang.Double"><![CDATA[(double)((($F{ot_catalog_ot_out_am}!=null&&$F{ot_catalog_ot_in_am}!=null)?(float)((float)((float)((($F{ot_catalog_ot_out_am}.getTime())-($F{ot_catalog_ot_in_am}.getTime()))/1000)/60)/60):(float)0.00)+(($F{ot_catalog_ot_in_pm}!=null&&$F{ot_catalog_ot_out_pm}!=null)?((float)((float)((float)($F{ot_catalog_ot_out_pm}.getTime()-$F{ot_catalog_ot_in_pm}.getTime())/1000)/60)/60):(float)0.00))*$F{ot_catalog_ot_rate}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="49" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="34" splitType="Stretch"/> </pageFooter></jasperReport>
  2. ****please delete if repost and kindly send me the link to previous post. tnx. hi, im new to ireport and im having trouble getting the sum of all variable, i have 4 date fields, i have suceeded computing the time difference between them and put them i a variable, those dates where displayed by group, the question is what if i had 3 rows with total time values, 1.5 hour, 1hour, 0.5 hours the total of these hours is displayed on a varialble field. i want to compute the total of that variable field as grandtotal. i tried to make a new variable as sum and put that variable on the expression but i get only null on output. anyone can help me? thanks.
×
×
  • Create New...