Jump to content
Changes to the Jaspersoft community edition download ×

kolaitis

Members
  • Posts

    35
  • Joined

  • Last visited

kolaitis's Achievements

  1. Something like that in iReport query : (SELECT dbo.yourProcedure_Function (dataBaseFile.field, $P{iReport_Param1})) as Name1 (select dbo.yourProcedure_Function ($P{iReport_Param1}, $P{iReport_Param2}, $P{iReport_Param3}, $P{iReport_Param4})) as Name2 AND (SELECT dbo.yourProcedure_Function(dataBaseFile.field, $P{iReport_Param1}, $P{iReport_Param2})) = $P{iReport_Param3} AND dbo.yourProcedure_Function(dataBaseFile.field) = $P{iReport_Param4} Good Luck....
  2. Design is subject of how do you want to see the result. Simplest design is with page break. Good day.
  3. My suggestion is to use subreport IN subreport. 1) Main report , on detail Band the first subreport 2) In first subreport , place your second subreport Don not forget to pass parameter SUBREPORT_DIR for the second subreport I hope that my solution is suitable for you. Good Luck.
  4. Create a variable with Expression : new Integer($V{PAGE_NUMBER}.intValue() - 1) Place on pageFooter , lastPageFooter. PrintWhenExpression : new Boolean($V{yourVariable}.intValue()!=0)
  5. Be more specific. Show what do you want to do. What do you mean : Passing to Another Group ?
  6. Expression new Double(Double.parseDouble(yourField or variable)) Exp.class java.lang.Double
  7. Suggestion : 1) Create only one Group. Place on, your first subreport. Total, in your subreport. 2) Expand summary Band. Edit / Report Properties / More / Summary on a new Page (true) Place on, your second subreport. Total, in your subreport. - If you wish a grandTotal, assign Subreport Return values parameters adding them in a variable on your main report. Regards......
  8. Dear Dick, Give specific design of what you want to do. i.e. subReports are on Detail Band or what else... George.
  9. Designing and testing a similar report with 2.0.5, it worked perfectly. Please check again your main report : Report properties \More \ Print Order : Vertical.
  10. If the subreport and a textField or variable (that accepts a return value from subreport) are placed on the same band, then you need to set evaluationTime = Band for textField or variable. I hope it will works.
  11. Dear Dick .................. <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="TEST" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString><![CDATA[select distinct top 10 PositionTime from myFile where myFileCode = '75' ]]></queryString> <field name="PositionTime" class="java.lang.String"/> <variable name="INITIAL" class="java.math.BigDecimal" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[$V{SECONDS}]]></variableExpression> <initialValueExpression><![CDATA[new BigDecimal(0)]]></initialValueExpression> </variable> <variable name="MINUTES" class="java.math.BigDecimal" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[new BigDecimal($F{PositionTime}.substring( 0, 2 ))]]></variableExpression> </variable> <variable name="SECONDS" class="java.math.BigDecimal" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[new BigDecimal($F{PositionTime}.substring( 3, 5 ))]]></variableExpression> </variable> <variable name="DIFFERENCE_MINUTES" class="java.math.BigDecimal" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[$V{MINUTES}.doubleValue()>0 ? $V{SECONDS}.add(new BigDecimal(60).subtract($V{INITIAL})):null]]></variableExpression> </variable> <variable name="DIFFERENCE_SECONDS" class="java.math.BigDecimal" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[($V{SECONDS}.subtract( $V{INITIAL} )).abs()]]></variableExpression> </variable> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="36" isSplitAllowed="false" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="11" y="10" width="61" height="18" key="textField-1"> <printWhenExpression><![CDATA[new Boolean($V{MINUTES}.doubleValue()==0)]]></printWhenExpression> </reportElement> <box></box> <textElement isStyledText="true"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{DIFFERENCE_SECONDS}!=null && $V{DIFFERENCE_SECONDS}.doubleValue()>5 ? "<style forecolor=red'>" + $F{PositionTime} + "</style>" : "<style forecolor='black'>" + $F{PositionTime} + "</style&gt]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="11" y="10" width="61" height="18" key="textField-2"> <printWhenExpression><![CDATA[new Boolean($V{MINUTES}.doubleValue()!=0)]]></printWhenExpression> </reportElement> <box></box> <textElement isStyledText="true"> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{DIFFERENCE_MINUTES}!=null && $V{DIFFERENCE_MINUTES}.doubleValue()>5 ? "<style forecolor=red'>" + $F{PositionTime} + "</style> " : "<style forecolor='black'>" + $F{PositionTime} + "</style&gt]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport> Good Luck.
  12. Suggestion : Prepare your parameter from your calling java form : reportParameters.put("OrderBy", "ORDER BY your_condition"); In iReport query just below Where clause , write : $P!{ORDER_BY} Good Luck.
  13. Correction section 2 a)$V{DIFFERENCE_SECONDS}!=null && $V{DIFFERENCE_SECONDS}.doubleValue()>5 ? "<style forecolor='red'>" + $F{PositionTime} + "</style>" " : "<style forecolor='black'>" + $F{PositionTime} + "</style> " b)$V{DIFFERENCE_MINUTES}!=null && $V{DIFFERENCE_MINUTES}.doubleValue()>5 ? "<style forecolor='red'>" + $F{PositionTime} + "</style> " : "<style forecolor='black'>" + $F{PositionTime} + "</style> " Post Edited by kolaitis at 05/04/2011 13:20
  14. Suggestion : 1) Create Variables ClassType Expression INITIAL BigDecimal $V{SECONDS} InitValue : new BigDecimal(0) MINUTES -"- new BigDecimal(minutesOfYourFieldName(2pos)) SECONDS -"- new BigDecimal(secondsOfYourFieldName(2pos)) DIFFERENCE_SECONDS -"- ($V{SECONDS}.subtract( $V{INITIAL} )).abs() DIFFERENCE_MINUTES -"- $V{MINUTES}.doubleValue()>0 ? $V{SECONDS}.add( new BigDecimal(60).subtract($V{INITIAL})):null 2) Create two text fields in Detail Band on top of each other : a) Expression $V{DIFFERENCE_SECONDS}!=null && $V{DIFFERENCE_SECONDS}.doubleValue()>5 ? " " : " " PrintWhenExpression new Boolean($V{MINUTES}.doubleValue()==0) b) $V{DIFFERENCE_MINUTES}!=null && $V{DIFFERENCE_MINUTES}.doubleValue()>5 ? " " : " " PrintWhenExpression new Boolean($V{MINUTES}.doubleValue()!=0) Good Luck.
×
×
  • Create New...