Jump to content
Changes to the Jaspersoft community edition download ×

kolaitis

Members
  • Posts

    35
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by kolaitis

  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.
  15. Try this , I hope it will work. In text field use the following Expression : $F{yourFieldName}.getSubString( 1l, ( new Long( $F{yourFieldName}.length() ) ).intValue() ) Good Luck.
  16. While your subreport is on Detail Band , on main report : View , Bands , detail set false : is Split allowed
  17. Suggestion : On tab View Groups, be carefull for Group priority. group1 group2 group3 Inspect your sum variables that has : Reset Type: Group , appropriate GroupName. Good Luck.
  18. Suggestion : Create variable i.e: D1 , VariableClassType : java.lang.String , VariableExpression : {yourDoubleValueField}.toString() Create text Field in your Detail Band with expression : $V{D1}.endsWith( ".0" ) ? $V{D1}.replace( ".0", " " ) : new DecimalFormat("#,##0.##;- #,##0.##").format( {yourDoubleValueField} ) Good Luck.
  19. In your calling form.. Map reportParameters = new HashMap(); reportParameters.put("DATE", super.getDate("selected_Date")); In iReport, assign parameter : DATE , class Type : java.util.Date In iReport Query : Where yourDataBaseFile.DateField = $P{DATE}
  20. Suggestions : A) Is your Opening Balance a return value from a subreport ? If so your receiving variable i.e $V{BALANCE} to prevent null must have expression : new BigDecimal(0).add($V{BALANCE}) B) In Detail Band , under column "Balance" are you using a variable i.e. $V{DETAIL_BALANCE} to calculate the progressive result ? If so variable expression : $V{BALANCE}.add( yourDebit.subtract( yourCredit ) ) Good Luck.
  21. Try this : Modify your group property : Min height to Start New Page | 50 | . By this number you assign the : Minimum amount of vertical space needed at the bottom of the column in order to place the group header on the current column. I hope it will works.
  22. Another approch. Create a Group on one of your database field. (Start OnNew Page = true) On group footer create Subreport . Aling to left most position. printWhenExpression: new Boolean(($V{REPORT_COUNT}.intValue() % 2) == 1) odd Copy the created subreport on desire right position, on top of the other subreport. printWhenExpression: new Boolean(($V{REPORT_COUNT}.intValue() % 2) == 0) even Good Luck.
  23. Have you insert default values for your parameters ?
  24. Please try this : Edit / Report Properties / More... / When no data: All sections, no detail I hope it will works
×
×
  • Create New...