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

alan.tham_1

Members
  • Posts

    3
  • Joined

  • Last visited

alan.tham_1's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Thanks! I changed my field to : <field name="street" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="tpExt.organizationAddr[0].street"/> <fieldDescription><![CDATA[tpExt.organizationAddr.street]]></fieldDescription></field>[/code]And it displayed as expected.
  2. Hi! I have a JSON datasource which is like this { "tpExt": [ { "organizationAddr": [ { "street": "8 High Street 08-01", "postcode": "648123" } ] } ]}[/code]I have a field which is like this: <field name="street" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="tpExt.organizationAddr.street"/> <fieldDescription><![CDATA[tpExt.organizationAddr.street]]></fieldDescription></field>[/code]And my textfield is <textField isBlankWhenNull="true"> <reportElement x="110" y="114" width="430" height="17"/> <textElement lineSpacing="Single"/> <textFieldExpression><![CDATA[$F{street}]]></textFieldExpression></textField>[/code] But I am getting the display with square brackets and quotes ["8 High Street 08-01"] How to remove the square brackets and quotes? Thanks
  3. I am trying to create Jasper Report with crosstab by writing JRXML with DTOs. I am trying to create rows dynamic number of chargeCodes and their total. It looks something like this: jobNochargeCodeAchargeCodeBTotaljobNoABC100.10300.30400.40jobNoDEF200.20400.40600.60In my Java backend, I have DTO which looks like this class MyDTO {private String jobNo;private List <String> chargeCode = new ArrayList <> ();private List <BigDecimal> chargeCodeTotal = new ArrayList <> ();}[/code]where the list codeCode contains chargeCodeA, chargeCodeB for jobNoABC and chargeCodeTotal contains 100.10, 300.30 for jobNoABC also. In my JRXML, I have included in sample.jrxml But I am getting error: I am not sure how to create infinite number of chargeCodes using JRXML. And I cannot use Dynamic Jasper. I can only think of crosstab. Please help. Thanks.
×
×
  • Create New...