Jump to content
Changes to the Jaspersoft community edition download ×

why i can't list data details on jasper report by using text fields on details


sophealsc11

Recommended Posts

<?xml version="1.0" encoding="UTF-8"?>

<!-- Created with Jaspersoft Studio version 6.20.1.final using JasperReports Library version 6.20.1-7584acb244139816654f64e2fd57a00d3e31921e -->

<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="jaspergroup" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e31df9f6-8a8a-4126-9c39-5d6ac33b40e6">

<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter"/>

<queryString language="JSON">

<![CDATA[shifts]]>

</queryString>

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

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

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

</field>

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

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

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

</field>

<field name="employees.initialName" class="java.lang.String">

<property name="net.sf.jasperreports.json.field.expression" value="employees.initialName"/>

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

</field>

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

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

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

</field>

<field name="employees.poSup" class="java.lang.String">

<property name="net.sf.jasperreports.json.field.expression" value="employees.poSup"/>

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

</field>

<group name="Group1">

<groupExpression><![CDATA[$F{shift}]]></groupExpression>

<groupHeader>

<band height="30">

<textField>

<reportElement x="0" y="0" width="800" height="30" uuid="551f9a26-a4c6-471e-b107-bc9b09c7ce79"/>

<box leftPadding="6">

<topPen lineWidth="0.25"/>

<leftPen lineWidth="0.25"/>

<bottomPen lineWidth="0.25"/>

<rightPen lineWidth="0.25"/>

</box>

<textElement textAlignment="Left" verticalAlignment="Middle"/>

<textFieldExpression><![CDATA["Sifts"+" "+$F{shift}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

</group>

<background>

<band splitType="Stretch"/>

</background>

<detail>

<band height="30" splitType="Stretch">

<textField>

<reportElement x="0" y="0" width="100" height="30" uuid="083dcd9d-0150-42ee-b2d0-a21734ca85d3"/>

<box>

<topPen lineWidth="0.25"/>

<leftPen lineWidth="0.25"/>

<bottomPen lineWidth="0.25"/>

<rightPen lineWidth="0.25"/>

</box>

<textElement textAlignment="Center" verticalAlignment="Middle"/>

<textFieldExpression><![CDATA[$F{employees.initialName}]]></textFieldExpression>

</textField>

<textField>

<reportElement x="100" y="0" width="100" height="30" uuid="596f5629-de19-4bac-bef2-2195151d8efb"/>

<box>

<topPen lineWidth="0.25"/>

<leftPen lineWidth="0.25"/>

<bottomPen lineWidth="0.25"/>

<rightPen lineWidth="0.25"/>

</box>

<textElement textAlignment="Center" verticalAlignment="Middle"/>

<textFieldExpression><![CDATA[$F{employees.name}]]></textFieldExpression>

</textField>

<textField>

<reportElement x="200" y="0" width="100" height="30" uuid="d3cb4b67-3ac3-4b71-b1c9-f2d982474d99"/>

<box>

<topPen lineWidth="0.25"/>

<leftPen lineWidth="0.25"/>

<bottomPen lineWidth="0.25"/>

<rightPen lineWidth="0.25"/>

</box>

<textElement textAlignment="Center" verticalAlignment="Middle"/>

<textFieldExpression><![CDATA[$F{employees.poSup}]]></textFieldExpression>

</textField>

</band>

</detail>

</jasperReport>

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi , if its JSON datasource you can try  '/' instead of '.' as below:

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

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

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

</field>

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

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

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

</field>

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

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

<fieldDescription><![CDATA[employees/initialName]]></fieldDescription>

</field>

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

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

<fieldDescription><![CDATA[employees/name]]></fieldDescription>

</field>

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

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

<fieldDescription><![CDATA[employees/poSup]]></fieldDescription>

 

 

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...