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

crazyzai0123

Members
  • Posts

    5
  • Joined

  • Last visited

crazyzai0123's Achievements

  1. I've figured out the problem. to compare the string , use ' instead if "
  2. OK, basically is ,my database have an ID, and Code. So in my report I select ID:1 , and the id's code comes with value "COD", so when I preview the report, I insert the ID parameter as 1, result will return me code with value "COD". Now i want when the code value is "COD", one of the detail band is hide. but i tried many printWhen expression and all the output not met my requirement <band height="60"> <printWhenExpression><![CDATA[$F{Code}.equals("COD")]]></printWhenExpression> <staticText> <reportElement x="370" y="20" width="100" height="30" uuid="dd9cb634-244f-4dd4-b329-4c90e406afba"/> <text><![CDATA[One Detail]]></text> </staticText> </band> <band height="56"> <staticText> <reportElement x="370" y="20" width="100" height="30" uuid="d4259182-215b-4b3e-9673-bcd6cb5ac355"/> <text><![CDATA[Another detail]]></text> </staticText> </band>[/code]
  3. I want to print my detail band with expression based on field value but seems not working. I've tried: new.java.lang.Boolean($F{Code}.equals("COD")) new Boolean($F{Code}.equals("COD")) $F{Code}.equals("COD") $F{Code} == "COD" Any idea to make it works?
  4. <textField evaluationTime="Group" evaluationGroup="myGroup"> I've set the evaluation Time and group but seems not working ? Did i miss something? ??
  5. Hi , im new to jasper report , i wish to know is it possible that : Group 1 having 3 page group 1 having 1 page I want to display: Group 1 : Page 1 of 3, Page 2 of 3, Page 3 of 3 Group 2 : Page 1of 1. Possible to do this with jasper report ? Source: <queryString language="SQL"> <![CDATA[select * from Persons where ID = $P{ID}]]></queryString><field name="ID" class="java.lang.Object"/><group name="myGroup" isStartNewPage="true" isResetPageNumber="true"> <groupHeader> <band height="224"> <subreport> <reportElement x="300" y="135" width="270" height="60" uuid="1f20858d-c055-41e2-9a60-bbc040ae6485"/> <subreportParameter name="ID_PERSON"> <subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["subreport_1.jasper"]]></subreportExpression> </subreport> <staticText> <reportElement x="280" y="10" width="100" height="30" uuid="dacdfcd9-150b-419d-ba3b-b56949cd518d"/> <text><![CDATA[Group 1]]></text> </staticText> <break> <reportElement x="0" y="210" width="99" height="1" uuid="a77bf8e0-98ea-4167-b852-f2cb5f6e1cf6"/> </break> <staticText> <reportElement x="280" y="58" width="300" height="30" uuid="df9536c9-6584-43b3-b8b9-45fd0c0b95a6"/> <text><![CDATA[This report is to testing the grouping.]]></text> </staticText> <break> <reportElement x="0" y="111" width="100" height="1" uuid="6cda26ee-6e49-4e94-8d58-5d5dd42745e6"/> </break> </band> </groupHeader> <groupFooter> <band height="50"/> </groupFooter></group><group name="myGroup2" isStartNewPage="true" isResetPageNumber="true"> <groupHeader> <band height="130"> <subreport> <reportElement x="270" y="60" width="300" height="60" uuid="5663a0dc-9b14-485b-84a9-21b5e0c3b98d"/> <subreportParameter name="ID_PERSON"> <subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["subreport_2.jasper"]]></subreportExpression> </subreport> <staticText> <reportElement x="280" y="20" width="100" height="30" uuid="eaa5ee0f-c0e5-4555-b321-a4db52b4efde"/> <text><![CDATA[Group 2]]></text> </staticText> </band> </groupHeader> <groupFooter> <band height="58"/> </groupFooter></group><pageFooter> <band height="57" splitType="Stretch"> <textField evaluationTime="Group" evaluationGroup="myGroup"> <reportElement x="400" y="10" width="100" height="30" uuid="215676d9-e972-45bd-adad-b79c1fa27112"/> <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> <reportElement x="310" y="10" width="110" height="30" uuid="75a82ec2-a8ed-46dd-b5a1-147c450e32f8"/> <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> </band></pageFooter>
×
×
  • Create New...