Jump to content
Changes to the Jaspersoft community edition download ×

JSON File String List Table


Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I finally resolved it.

<subDataset name="myList">

<field name="itemName" class="java.lang.String">

<property name="net.sf.jasperreports.jsonql.field.expression" value="."/>

<fieldDescription><![CDATA[.]]></fieldDescription>

</field>

</subDataset>

.

.

<componentElement>

<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="284" width="560" height="90" isRemoveLineWhenBlank="true" uuid="b8909323-e0d1-494b-a029-25352cbaf23e">

<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>

<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>

<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>

<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>

<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>

</reportElement>

<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">

<datasetRun subDataset="myList" uuid="d0f5042e-dda6-45ec-b033-2b6f4b9588b1">

<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("items")]]></dataSourceExpression>

</datasetRun>

<jr:column width="112" uuid="b5c22fe9-766e-468c-8ee3-b753f1a9a48b">

<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>

<jr:columnHeader style="Table_CH" height="30">

<staticText>

<reportElement x="0" y="0" width="112" height="30" uuid="bf82d72a-4f7d-4a0a-8d56-a6506de3f072"/>

<text><![CDATA[Name]]></text>

</staticText>

</jr:columnHeader>

<jr:columnFooter style="Table_CH" height="30"/>

<jr:detailCell style="Table_TD" height="30">

<textField>

<reportElement x="0" y="0" width="112" height="30" uuid="69977826-b68c-49f9-b73a-1d2d4e9faf67"/>

<textFieldExpression><![CDATA[$F{itemName}]]></textFieldExpression>

</textField>

</jr:detailCell>

</jr:column>

</jr:table>

</componentElement>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...