showing results for - "passing json as datasource to jasper report library"
Bay
19 Jan 2017
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1  -->
3<!-- 2015-10-22T13:45:32 -->
4<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="Blank_A4_2" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9e494ebe-c1fb-4448-bcee-38994e9720f7">
5    <!--property name="net.sf.jasperreports.json.source" value="emp.json"/-->
6    <queryString language="json">
7        <![CDATA[employees]]>
8    </queryString>  
9    <field name="firstName" class="java.lang.String">
10        <fieldDescription><![CDATA[firstName]]></fieldDescription>
11    </field>
12    <field name="lastName" class="java.lang.String">
13        <fieldDescription><![CDATA[lastName]]></fieldDescription>
14    </field>
15    <background>
16        <band splitType="Stretch"/>
17    </background>
18    <detail>
19        <band height="125" splitType="Stretch">
20            <textField>
21                <reportElement x="100" y="0" width="100" height="30" uuid="02b279da-3795-4655-8571-5a36a3ef378c"/>
22                <textFieldExpression><![CDATA[$F{firstName}]]></textFieldExpression>
23            </textField>
24            <staticText>
25                <reportElement x="0" y="0" width="100" height="30" uuid="671e61ad-8d8f-48cb-969f-78c05a516398"/>
26                <text><![CDATA[firstName]]></text>
27            </staticText>
28            <textField>
29                <reportElement x="100" y="30" width="100" height="30" uuid="9d53f46f-a252-48b3-9213-8c3092c29f49"/>
30                <textFieldExpression><![CDATA[$F{lastName}]]></textFieldExpression>
31            </textField>
32            <staticText>
33                <reportElement x="0" y="30" width="100" height="30" uuid="3b49affb-685a-4df2-a872-c0e6fdcab94b"/>
34                <text><![CDATA[lastName]]></text>
35            </staticText>
36        </band>
37    </detail>
38</jasperReport>