Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

bbalmer's Achievements


Rookie (2/14)

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

Recent Badges



  1. At first I didn't think this would be too bad but maybe I'm just doing it wrong. We are creating invoices (2 pages per customer). The 2nd page is a subreport in the first. I need to get different text at the bottom of the report footer for each page (Customer Copy vs. Company Copy). I created a variable in the main report 'copy' and I though that I could just use a scriptlet to set the value. The problem is that the main report scriptlet shows the variable being set but the report does not show it. I've tried in beforePageInit, afterPageInit and many more: Code:this.setVariableValue("copy", "Customer Copy"«»); The report always just shows null. Also, this variable is set in the outside 'main' report but the subreport doesn't have access to the copy variable. Basically what I am looking for is for when the first page of the report runs the 'copy' variable says 'Company Copy' and when the subreport runs it changes the footer to say 'Customer Copy'. Both pages can be multiple pages long so I cannot use the page count. ANY help would be greatly appreciated. Thanks.
  2. So, I'm guessing that there is not a way to indent the text when it gets wrapped to subsequent lines?
  3. Is there a way to force the second line (after a text wrap) to be indented? So, instead of: Here is some basic text that I would like to have indented after a wrap. to: Code: Here is some basic text that I would like to have indented after a wrap. Thanks. Post edited by: bbalmer, at: 2006/09/18 20:04
  4. I've checked the forum and this seems pretty easy but for some reason I keep getting a null returned from the sum of my subreport. I have a 'totalDue' java.lang.Double variable in my subreport doing a sum. If I print this out in the subreport it shows the total being calculated correctly as the rows are printed. I have this mapped to a totalDueGroceryTotal variable in the master report (java.lang.Double). This ALWAYS comes back as null. Any ideas? Here is the master report: Code: <jasperReport name="OrderDetail" pageWidth="594" pageHeight="791" whenNoDataType="AllSectionsNoDetail" columnWidth="590" leftMargin="2" rightMargin="2" topMargin="5" bottomMargin="5"> <property name="com.jasperassistant.designer.DataSource" value="OrderDetailsDataSource"/> <parameter name="GroceryTotals_Subreport" class="net.sf.jasperreports.engine.JasperReport"/> <variable name="totalDueGroceryTotal" class="java.lang.Double" calculation="System"/> <detail> <band height="279"> <frame> <reportElement x="2" y="60" width="583" height="97"/> <box border="1Point" padding="0"/> <frame> </frame> <frame> </frame> <frame> <reportElement stretchType="RelativeToBandHeight" x="370" y="0" width="211" height="95"/> <box border="None" padding="0"/> <subreport> <reportElement x="2" y="2" width="207" height="63"/> <dataSourceExpression> <![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{citOrdDtls})]]> </dataSourceExpression> <returnValue subreportVariable="totalDue" toVariable="totalDueGroceryTotal"/> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{GroceryTotals_Subreport}]]> </subreportExpression> </subreport> <rectangle> <reportElement positionType="FixRelativeToBottom" x="0" y="78" width="211" height="17" backcolor="#DFDFDF"/> <graphicElement/> </rectangle> <staticText> <reportElement positionType="FixRelativeToBottom" x="2" y="80" width="80" height="13"/> <textElement verticalAlignment="Middle"> <font fontName="Courier New" size="11" isBold="true" pdfFontName="Courier-Bold" isPdfEmbedded="true"/> </textElement> <text><![CDATA[Total Due:]]></text> </staticText> <textField pattern="¤#,##0.00;(¤#,##0.00)" isBlankWhenNull="true"> <reportElement positionType="FixRelativeToBottom" x="92" y="80" width="118" height="13"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Courier New" size="11" isBold="true" pdfFontName="Courier-Bold" isPdfEmbedded="true"/> </textElement> <textFieldExpression class="java.lang.Double"><![CDATA[$V{totalDueGroceryTotal}]]></textFieldExpression> </textField> </frame> </frame> </band> </detail> </jasperReport>
  • Create New...