Jump to content

pennywise

Members
  • Posts

    10
  • Joined

  • Last visited

pennywise's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi everyone, I will like to know if is posible hide visual elements in a report like static labels, lines, etc, using a param, i need user can configure the report with options like tables, show or not the date, show or not the title, etc, Thanks.
  2. Ahhhhh, i see, well when i tryed use == null it show a exception, maybe is the form how i use it, how you make a condition using null, and how is the or sintaxys: for example: if varA==null and varA.lenght < 0 -> how is the equivalent in jasperreports thanks all for your reply
  3. You said using scriplets? Wel i think i can resolve this issue if i know how make if else in jasperreports, is not clear how to do this, I know if is = (<condition> expre1 ? expre 2 :) but else? how you do a normal if-else block on jasperreports, for example to do if(varA.lenght<0){ make something }else{ make this }
  4. I tryed this: ($V{variableA}.doubleValue() < 0 ? 0 : $V{variableA})+($V{variableB}.doubleValue() < 0 ? 0 : $V{variableB})+($V{variableC}.doubleValue() < 0 ? 0 : $V{variableC}) but there is an exeption: Incompatible conditional operands types int and double
  5. VARIABLE A is double, i can't use ==, i tryed using variableA.intvalue() < 0 but i doesn't works, :(
  6. Hi everyone, i have a variable wich sum a field, but when i don't have registers in the field the report show null in the variable, so i need to show 0 when i don't have register, that because i use that variable is in a subreport and i use it in a master report to make another num; subreport-> VARIABLE A = null Master report-> VARIABLEA+VARIABLEB+VARIABLEC if VARIABLEA = null master report show null, it doesn't matter if there are values in B or C :(, that's my problem
  7. I solve the problem, Right Click in the report->properties->ignore pagination :)
  8. Hi, i am using a line in the top of the footer to simulate a table, but when i display the inform there is a gap between the detail last record of the page and the footer line, How i solve it?, thanks for reply in advance. This is my 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="presupuesto" pageWidth="572" pageHeight="752" whenNoDataType="BlankPage" columnWidth="572" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="false"> <style name="Crosstab Data Text" isDefault="false" hAlign="Center"/> <parameter name="nombreEmpresa" class="java.lang.String"/> <parameter name="nombreObra" class="java.lang.String"/> <parameter name="nombreCliente" class="java.lang.String"/> <queryString> <![CDATA[sELECT PARTIDASPRESUPUESTOS.descripcionPartidas AS PARTIDASPRESUPUESTOS_descripcionPartidas, PARTIDASPRESUPUESTOS.codigoCoveninPartidas AS PARTIDASPRESUPUESTOS_codigoCoveninPartidas, PARTIDASPRESUPUESTOS.unidadPartidas AS PARTIDASPRESUPUESTOS_unidadPartidas, PARTIDASPRESUPUESTOS.idPartida AS idPartida, ROUND(PARTIDASPRESUPUESTOS.precioUnitario,2) AS PARTIDASPRESUPUESTOS_precioUnitario, ROUND(PARTIDASPRESUPUESTOS.cantidadPartidas,2) AS PARTIDASPRESUPUESTOS_cantidadPartidas, ROUND(PARTIDASPRESUPUESTOS.cantidadPartidas*PARTIDASPRESUPUESTOS.precioUnitario, 2) AS totalPartidas FROM PARTIDASPRESUPUESTOS PARTIDASPRESUPUESTOS]]> </queryString> <field name="PARTIDASPRESUPUESTOS_descripcionPartidas" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="PARTIDASPRESUPUESTOS_codigoCoveninPartidas" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="PARTIDASPRESUPUESTOS_unidadPartidas" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="idPartida" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="PARTIDASPRESUPUESTOS_precioUnitario" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="PARTIDASPRESUPUESTOS_cantidadPartidas" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="totalPartidas" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <variable name="sumatoriaHoja" class="java.lang.String"/> <variable name="totalesHoja" class="java.lang.Double" calculation="Sum"> <variableExpression><![CDATA[$F{totalPartidas}]]></variableExpression> </variable> <pageHeader> <band height="150" splitType="Stretch"> <textField> <reportElement x="12" y="12" width="149" height="20"/> <textElement> <font fontName="Arial" size="14" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{nombreEmpresa}]]></textFieldExpression> </textField> <textField> <reportElement x="48" y="51" width="356" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{nombreObra}]]></textFieldExpression> </textField> <textField> <reportElement x="71" y="71" width="333" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{nombreCliente}]]></textFieldExpression> </textField> <staticText> <reportElement x="12" y="51" width="36" height="20"/> <textElement/> <text><![CDATA[OBRA:]]></text> </staticText> <staticText> <reportElement x="12" y="71" width="59" height="15"/> <textElement/> <text><![CDATA[Contratante:]]></text> </staticText> <staticText> <reportElement x="197" y="103" width="195" height="20"/> <textElement> <font size="14" isBold="true"/> </textElement> <text><![CDATA[PRESUPUESTO DE OBRAS]]></text> </staticText> </band> </pageHeader> <columnHeader> <band height="29" splitType="Stretch"> <staticText> <reportElement x="12" y="15" width="59" height="13" forecolor="#FF0000"/> <textElement/> <text><![CDATA[PARTIDA No]]></text> </staticText> <staticText> <reportElement x="125" y="15" width="74" height="13" forecolor="#FF0033"/> <textElement/> <text><![CDATA[DESCRIPCION]]></text> </staticText> <staticText> <reportElement x="258" y="15" width="44" height="13" forecolor="#FF0033"/> <textElement/> <text><![CDATA[uNIDAD]]></text> </staticText> <staticText> <reportElement x="325" y="15" width="57" height="13" forecolor="#FF0033"/> <textElement/> <text><![CDATA[CANTIDAD]]></text> </staticText> <staticText> <reportElement x="404" y="15" width="89" height="13" forecolor="#FF0033"/> <textElement/> <text><![CDATA[PRECIO UNITARIO]]></text> </staticText> <staticText> <reportElement x="517" y="15" width="38" height="13" forecolor="#FF0033"/> <textElement/> <text><![CDATA[TOTAL]]></text> </staticText> <line> <reportElement x="12" y="28" width="558" height="1"/> </line> <line> <reportElement x="11" y="0" width="559" height="1"/> </line> <line> <reportElement x="11" y="1" width="1" height="28"/> </line> <line> <reportElement x="84" y="0" width="1" height="29"/> </line> <line> <reportElement x="247" y="0" width="1" height="28"/> </line> <line> <reportElement x="318" y="0" width="1" height="29"/> </line> <line> <reportElement x="391" y="1" width="1" height="27"/> </line> <line> <reportElement x="504" y="1" width="1" height="27"/> </line> <line> <reportElement x="569" y="0" width="1" height="29"/> </line> </band> </columnHeader> <detail> <band height="5" splitType="Stretch"> <line> <reportElement stretchType="RelativeToBandHeight" x="11" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="84" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="247" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="391" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="318" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="504" y="0" width="1" height="5"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="569" y="0" width="1" height="5"/> </line> </band> <band height="32"> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="86" y="16" width="161" height="16" isRemoveLineWhenBlank="true"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{PARTIDASPRESUPUESTOS_descripcionPartidas}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="86" y="1" width="161" height="15" isRemoveLineWhenBlank="true"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{PARTIDASPRESUPUESTOS_codigoCoveninPartidas}]]></textFieldExpression> </textField> <textField pattern="¤ #,##0.00"> <reportElement x="249" y="6" width="68" height="16" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.lang.String"><![CDATA[$F{PARTIDASPRESUPUESTOS_unidadPartidas}]]></textFieldExpression> </textField> <textField> <reportElement x="319" y="7" width="71" height="16" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.String"><![CDATA[""+$F{PARTIDASPRESUPUESTOS_cantidadPartidas}]]></textFieldExpression> </textField> <textField> <reportElement x="393" y="6" width="106" height="16" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.String"><![CDATA[""+$F{PARTIDASPRESUPUESTOS_precioUnitario}]]></textFieldExpression> </textField> <textField> <reportElement x="13" y="16" width="70" height="16" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Center"/> <textFieldExpression class="java.lang.String"><![CDATA[""+$F{idPartida}]]></textFieldExpression> </textField> <line> <reportElement stretchType="RelativeToBandHeight" x="11" y="0" width="1" height="32"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="247" y="0" width="1" height="31"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="391" y="0" width="1" height="31"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="318" y="0" width="1" height="31"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="84" y="0" width="1" height="31"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="504" y="0" width="1" height="32"/> </line> <line> <reportElement stretchType="RelativeToBandHeight" x="569" y="0" width="1" height="32"/> </line> <textField> <reportElement x="505" y="6" width="60" height="16" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.String"><![CDATA[""+$F{totalPartidas}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="49" splitType="Immediate"> <textField> <reportElement x="469" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.Double"><![CDATA[$V{totalesHoja}]]></textFieldExpression> </textField> <line> <reportElement x="13" y="0" width="556" height="1"/> </line> </band> </columnFooter> <pageFooter> <band height="44" splitType="Stretch"> <staticText> <reportElement x="461" y="0" width="38" height="14"/> <textElement/> <text><![CDATA[Pagina]]></text> </staticText> <textField> <reportElement x="504" y="0" width="22" height="14"/> <textElement/> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> <staticText> <reportElement x="527" y="0" width="16" height="14"/> <textElement/> <text><![CDATA[de]]></text> </staticText> <textField evaluationTime="Report"> <reportElement x="543" y="0" width="27" height="14"/> <textElement/> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField pattern="dd/MM/yyyy"> <reportElement x="499" y="14" width="71" height="20"/> <textElement/> <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> <staticText> <reportElement x="461" y="14" width="38" height="20"/> <textElement/> <text><![CDATA[Fecha:]]></text> </staticText> <staticText> <reportElement x="0" y="0" width="161" height="20"/> <textElement/> <text><![CDATA[Latinsoft Infocon Control de obras]]></text> </staticText> </band> </pageFooter> <lastPageFooter> <band height="50"/> </lastPageFooter> </jasperReport>
  9. OUCH, Thank you guillo, I tryed using lines in pageheader and pagefooter, i change the lines horientation to simulate a grid, how can i contribute to the developement of the grid component?.
  10. Hi comunity, i need to do a report like this, how can i do this in ireport, thanks so much, regards your friend pennyWise: idProduct productDescriprion productUnit priceByUnit totalPriceofProduct
×
×
  • Create New...