Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

json array on jasper

<?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="Report" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="81afe112-ee1b-4443-8d1c-cb6d9ab95dd8">
  <property name="com.jaspersoft.studio.data.defaultdataadapter" value="JsonArrayDataAdapter.xml"/>
  <subDataset name="details1" uuid="4563e834-a9e5-43b5-9f0a-824948c73c73">
    <field name="A1" class="java.lang.String">
      <fieldDescription><![CDATA[a1]]></fieldDescription>
    </field>
  </subDataset>
  <subDataset name="details2" uuid="f703cb76-2a4a-44f1-9a42-227e180038d2">
    <field name="A2" class="java.lang.String">
      <fieldDescription><![CDATA[a2]]></fieldDescription>
    </field>
  </subDataset>
  <queryString language="json">
    <![CDATA[]]>
  </queryString>
  <field name="A1" class="java.lang.String">
    <fieldDescription><![CDATA[a1]]></fieldDescription>
  </field>
  <field name="A2" class="java.lang.String">
    <fieldDescription><![CDATA[a2]]></fieldDescription>
  </field>
  <detail>
    <band height="99" splitType="Stretch">
      <textField>
        <reportElement x="72" y="16" width="100" height="24" uuid="698866c8-7d26-4bc7-8727-b4a56d239a53"/>
        <textFieldExpression><![CDATA[$F{A1}]]></textFieldExpression>
      </textField>
      <textField>
        <reportElement x="190" y="16" width="100" height="24" uuid="e775c6c0-4058-4bc4-8c7a-d4d381fd6e66"/>
        <textFieldExpression><![CDATA[$F{A2}]]></textFieldExpression>
      </textField>
      <componentElement>
        <reportElement x="90" y="40" width="333" height="20" uuid="c3237c70-6b2e-43e3-aa21-5092d8b91afc"/>
        <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
          <datasetRun subDataset="details1" uuid="f5fdc6a3-736f-43ce-b549-cd7332d19eb8">
            <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("details1")]]></dataSourceExpression>
          </datasetRun>
          <jr:listContents height="20" width="333">
            <textField>
              <reportElement x="10" y="0" width="130" height="20" uuid="07e3ff2a-3832-4b06-9275-cb1ee8e51cfe"/>
              <textFieldExpression><![CDATA[$F{A1}]]></textFieldExpression>
            </textField>
          </jr:listContents>
        </jr:list>
      </componentElement>
      <componentElement>
        <reportElement x="90" y="60" width="333" height="20" uuid="38f3ac11-ad3e-464c-813a-46132f23783f"/>
        <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
          <datasetRun subDataset="details2" uuid="833a13c3-e9b8-4f56-9f8f-279d32d403e8">
            <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("details2")]]></dataSourceExpression>
          </datasetRun>
          <jr:listContents height="20" width="333">
            <textField>
              <reportElement x="10" y="0" width="130" height="20" uuid="3d9fb513-bfc9-4d95-a3da-16b95cf15e7c"/>
              <textFieldExpression><![CDATA[$F{A2}]]></textFieldExpression>
            </textField>
          </jr:listContents>
        </jr:list>
      </componentElement>
    </band>
  </detail>
</jasperReport>
Comment

PREVIOUS NEXT
Code Example
Javascript :: callback in response node.js 
Javascript :: javascript canvas 1px line 
Javascript :: Angular watching for changes in $http.pendingRequests from directive 
Javascript :: how to calculate each row with on change table <td<input jquery 
Javascript :: show ... in 2nd line javascript 
Javascript :: javascript path folder above 
Javascript :: _40 0 _55 null _65 0 _72 null react native fetch 
Javascript :: implement cai webchat in react native 
Javascript :: cortar elemento y pegar en otro lugar jquery 
Javascript :: dom-to-image bad quality 
Javascript :: how to create monorapo project in angular 8 
Javascript :: coffeescript float to two decimal places 
Javascript :: use state vs use ref 
Javascript :: input search picture jquery 
Javascript :: angular add debounce time before putting valu in subject next 
Javascript :: receiving big response node js 
Javascript :: select coordinates of image 
Javascript :: change abclground onload jquery 
Javascript :: react conditional if localhost 
Javascript :: monk remove 
Javascript :: variable is not null if used optstring json object 
Javascript :: how to check if a kendo drop down is enabled js 
Javascript :: pass object in onclick javascript 
Javascript :: configuration file must specify a supported nodejs10 version that is compatible with the runtime specified in the deployment. 
Javascript :: href dentro de javascript 
Javascript :: greater than x but less than y es6 
Javascript :: angular url not valid send you to a component 
Javascript :: undo npm run eject react 
Javascript :: get image center pixels nodejs 
Javascript :: react deployment pipeline 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =