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

Why my table is always empty? what's the correct way to create more than two tables/graphs with json file data source?


44894824

Recommended Posts

I want to create two tables/charts in jasper report, one is histogram, another is top 10 list, I have been stucking on this for more than 3 days, really need your help, could you tell me what's wrong with my jrxml file? 

here are my json file and jrxml

{
    "success" : true,
    "message" : null,
    "data" : {
        "apStatsUplinkRssiHistogram" : [ {
            "value" : 42,
            "key" : "0-10"
        }, {
            "value" : 0,
            "key" : "10-20"
        }, {
            "value" : 0,
            "key" : "20-30"
        }, {
            "value" : 1,
            "key" : "30-40"
        }, {
            "value" : 2,
            "key" : "40-50"
        }, {
            "value" : 1,
            "key" : "50-60"
        }, {
            "value" : 0,
            "key" : "60-70"
        }, {
            "value" : 1,
            "key" : "70-80"
        }, {
            "value" : 0,
            "key" : "80-90"
        }, {
            "value" : 2,
            "key" : "90-100"
        } ],
        "apStatsTopMeshDepthAps" : [ {
            "uplinkRssi" : 126.05925925925926,
            "rxBytes" : 1.0263206978E10,
            "txBytes" : 1.3088766E7,
            "maxDownlinks" : 0.014814814814814815,
            "reboots" : 0.0,
            "meshDepth" : 1.9851851851851852,
            "key" : "2c:e6:cc:15:16:c0",
            "uptime" : 242396.0,
            "apCount" : 1
        }, {
            "uplinkRssi" : 115.18788627935723,
            "rxBytes" : 3.5492845105E10,
            "txBytes" : 2.5721182863E10,
            "maxDownlinks" : 0.20395550061804696,
            "reboots" : 0.0,
            "meshDepth" : 1.7935723114956736,
            "key" : "2c:c5:d3:00:04:40",
            "uptime" : 1435229.0,
            "apCount" : 1
        }, {
            "uplinkRssi" : 83.25571340333539,
            "rxBytes" : 3.7592265355E10,
            "txBytes" : 2.5554033797E10,
            "maxDownlinks" : 0.7955528103767758,
            "reboots" : 0.0,
            "meshDepth" : 1.1951822112415071,
            "key" : "d4:68:4d:25:95:70",
            "uptime" : 1435764.0,
            "apCount" : 1
        }, {
            "uplinkRssi" : 52.60377358490566,
            "rxBytes" : 1.149937977E9,
            "txBytes" : 2.17122881E8,
            "maxDownlinks" : 0.0,
            "reboots" : 0.0,
            "meshDepth" : 1.0,
            "key" : "2c:e6:cc:06:16:60",
            "uptime" : 47700.0,
            "apCount" : 1
        }, {
            "uplinkRssi" : 42.55,
            "rxBytes" : 5.49409844E8,
            "txBytes" : 3.557850187E9,
            "maxDownlinks" : 0.0,
            "reboots" : 0.0,
            "meshDepth" : 0.9966666666666667,
            "key" : "2c:5d:93:0e:7b:e0",
            "uptime" : 269131.0,
            "apCount" : 1
        } ]
    }
}

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final using JasperReports Library version 6.4.3  -->
<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" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3402f246-9418-4204-9bd7-2ca65a6532b6">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="JsonFileData"/>
    <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <subDataset name="dataset1" uuid="a154ce68-fb4f-4c24-aa1c-837e51b2fcb7">
        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="JsonFileData"/>
        <queryString language="json">
            <![CDATA[data.apStatsUplinkRssiHistogram]]>
        </queryString>
        <field name="key" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="key"/>
            <fieldDescription><![CDATA[key]]></fieldDescription>
        </field>
        <field name="value" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="value"/>
            <fieldDescription><![CDATA[value]]></fieldDescription>
        </field>
    </subDataset>
    <queryString language="json">
        <![CDATA[]]>
    </queryString>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch"/>
    </title>
    <summary>
        <band height="221" splitType="Stretch">
            <componentElement>
                <reportElement x="195" y="21" width="200" height="200" uuid="7651c717-9803-40df-b26e-cf5754c3be5c">
                    <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"/>
                </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="dataset1" uuid="26d219d0-9d76-4213-9253-f3377ae65811"/>
                    <jr:column width="100" uuid="8f95a7bf-ffa8-445c-b85c-caf66af61ef6">
                        <jr:columnHeader style="Table_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" uuid="00caf880-56cd-4544-b4fb-68e91bb27706"/>
                                <text><![CDATA[key]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="100" height="30" uuid="91dfc504-70ad-4662-bebf-3d8042462b78"/>
                                <textFieldExpression><![CDATA[$F{key}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="100" uuid="74cb2ddf-afb2-4185-9fbb-2cebd80ed4ac">
                        <jr:columnHeader style="Table_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" uuid="62f760a0-803c-4b46-a3d1-f16cbaec2c5e"/>
                                <text><![CDATA[value]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="100" height="30" uuid="ce97db01-8665-41c8-b79f-a5148e20aedf"/>
                                <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </summary>
</jasperReport>
 

thank you very much!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

below jrxml file work fine for me:
 

<?xml version="1.0" encoding="UTF-8"?><br><!-- Created with Jaspersoft Studio version 6.4.3.final using JasperReports Library version 6.4.3  --><br><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="ap_stats" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="283cd4f8-20ba-4c24-aac6-1eb1d2968165"><br>    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/><br>    <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <style name="Table_CH" mode="Opaque" backcolor="#BFE1FF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <style name="Table 1_CH" mode="Opaque" backcolor="#BFE1FF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <style name="Table 1_TD" mode="Opaque" backcolor="#FFFFFF"><br>        <box><br>            <pen lineWidth="0.5" lineColor="#000000"/><br>            <topPen lineWidth="0.5" lineColor="#000000"/><br>            <leftPen lineWidth="0.5" lineColor="#000000"/><br>            <bottomPen lineWidth="0.5" lineColor="#000000"/><br>            <rightPen lineWidth="0.5" lineColor="#000000"/><br>        </box><br>    </style><br>    <subDataset name="apStatsUplinkRssiHistogramDataset" uuid="d2a7b04c-9024-4ebb-bf10-8eac752c0652"><br>        <field name="key" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="key"/><br>            <fieldDescription><![CDATA[key]]></fieldDescription><br>        </field><br>        <field name="value" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="value"/><br>            <fieldDescription><![CDATA[value]]></fieldDescription><br>        </field><br>    </subDataset><br>    <subDataset name="apStatsTopMeshDepthApsDataset" uuid="aeac9371-9d47-4ddf-a81b-88a19167216f"><br>        <queryString language="json"><br>            <![CDATA[data.apStatsTopMeshDepthAps]]><br>        </queryString><br>        <field name="key" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="key"/><br>            <fieldDescription><![CDATA[key]]></fieldDescription><br>        </field><br>        <field name="uplinkRssi" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="uplinkRssi"/><br>            <fieldDescription><![CDATA[uplinkRssi]]></fieldDescription><br>        </field><br>        <field name="rxBytes" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="rxBytes"/><br>            <fieldDescription><![CDATA[rxBytes]]></fieldDescription><br>        </field><br>        <field name="txBytes" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="txBytes"/><br>            <fieldDescription><![CDATA[txBytes]]></fieldDescription><br>        </field><br>        <field name="maxDownlinks" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="maxDownlinks"/><br>            <fieldDescription><![CDATA[maxDownlinks]]></fieldDescription><br>        </field><br>        <field name="reboots" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="reboots"/><br>            <fieldDescription><![CDATA[reboots]]></fieldDescription><br>        </field><br>        <field name="meshDepth" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="meshDepth"/><br>            <fieldDescription><![CDATA[meshDepth]]></fieldDescription><br>        </field><br>        <field name="uptime" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="uptime"/><br>            <fieldDescription><![CDATA[uptime]]></fieldDescription><br>        </field><br>        <field name="apCount" class="java.lang.String"><br>            <property name="net.sf.jasperreports.json.field.expression" value="apCount"/><br>            <fieldDescription><![CDATA[apCount]]></fieldDescription><br>        </field><br>    </subDataset><br>    <background><br>        <band splitType="Stretch"/><br>    </background><br>    <title><br>        <band height="79" splitType="Stretch"><br>            <staticText><br>                <reportElement x="280" y="0" width="270" height="59" uuid="cf2f5150-b880-4e60-b477-62373b65b3e2"/><br>                <textElement textAlignment="Center" verticalAlignment="Middle"><br>                    <font size="26"/><br>                </textElement><br>                <text><![CDATA[AP stats Report Test]]></text><br>            </staticText><br>        </band><br>    </title><br>    <summary><br>        <band height="243" splitType="Stretch"><br>            <componentElement><br>                <reportElement x="0" y="20" width="200" height="200" uuid="6f63371d-ec7b-43c2-a3b5-ced21fc2a3f6"><br>                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/><br>                    <property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/><br>                    <property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/><br>                    <property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/><br>                </reportElement><br>                <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" whenNoDataType="AllSectionsNoDetail"><br>                    <datasetRun subDataset="apStatsUplinkRssiHistogramDataset" uuid="77ec1492-8b6c-4127-a386-f3314fd46857"><br>                        <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data.apStatsUplinkRssiHistogram")]]></dataSourceExpression><br>                    </datasetRun><br>                    <jr:column width="100" uuid="cc8b1753-9492-4f21-b351-c1ced570624a"><br>                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/><br>                        <jr:tableHeader style="Table_TH" height="30" rowSpan="1"/><br>                        <jr:columnHeader style="Table_CH" height="30" rowSpan="1"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="100" height="30" uuid="59fff9fb-5332-4a89-87c1-ce5adcf239fc"/><br>                                <text><![CDATA[key]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="100" height="30" uuid="e84bf9d6-2d46-425e-b509-65348e12ddcf"/><br>                                <textFieldExpression><![CDATA[$F{key}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="100" uuid="dbd4c1ec-dfe0-46c0-a4e0-95bc5b04f573"><br>                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/><br>                        <jr:tableHeader style="Table_TH" height="30" rowSpan="1"/><br>                        <jr:columnHeader style="Table_CH" height="30" rowSpan="1"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="100" height="30" uuid="964ac838-eb40-4c6c-b4ad-54ef6ec0b027"/><br>                                <text><![CDATA[value]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="100" height="30" uuid="a42c981e-d1e1-441f-b2f8-7f6e87f15c12"/><br>                                <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                </jr:table><br>            </componentElement><br>            <componentElement><br>                <reportElement x="280" y="20" width="520" height="200" uuid="de0eaa2d-c85e-4ca0-bdeb-3bb3fff7d1b9"><br>                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/><br>                    <property name="com.jaspersoft.studio.table.style.table_header" value="Table 1_TH"/><br>                    <property name="com.jaspersoft.studio.table.style.column_header" value="Table 1_CH"/><br>                    <property name="com.jaspersoft.studio.table.style.detail" value="Table 1_TD"/><br>                </reportElement><br>                <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" whenNoDataType="AllSectionsNoDetail"><br>                    <datasetRun subDataset="apStatsTopMeshDepthApsDataset" uuid="6a488a15-b3f8-409b-b989-560c868dd6ee"><br>                        <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data.apStatsTopMeshDepthAps")]]></dataSourceExpression><br>                    </datasetRun><br>                    <jr:column width="22" uuid="9f234dab-04f6-4138-a238-8f51a79d9ae7"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="08a71d83-e51f-4529-9270-90cc9b892255"/><br>                                <text><![CDATA[key]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="066b7d9c-3ac7-428d-841f-ed9ef9ece275"/><br>                                <textFieldExpression><![CDATA[$F{key}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="d673edac-00c9-4e03-9530-141f80ca299e"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="d0a77e85-9da3-480e-b918-3d9fc50a572c"/><br>                                <text><![CDATA[uplinkRssi]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="d72315b5-88af-41b7-99e2-62b287d3ac01"/><br>                                <textFieldExpression><![CDATA[$F{uplinkRssi}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="17ff12de-6fc6-4fea-9c41-dd079d522474"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="77a4d196-804d-4c12-8d6a-c14adb125a4a"/><br>                                <text><![CDATA[rxBytes]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="737eae48-3ae8-4fca-8d51-71822a164e29"/><br>                                <textFieldExpression><![CDATA[$F{rxBytes}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="99c128fa-a722-4db9-b942-3fb36602e3ad"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="3094f812-9819-41bf-9bde-cef9dd418c6e"/><br>                                <text><![CDATA[txBytes]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="8c71d4eb-6933-4b73-b931-0ccef546920c"/><br>                                <textFieldExpression><![CDATA[$F{txBytes}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="c1932a78-6a86-4be9-a3e5-14393c6bcaf2"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="fd19197f-669f-4c83-b752-4efb59ce0ec0"/><br>                                <text><![CDATA[maxDownlinks]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="e20b9d0e-67c1-44c0-87df-6dd4c2cfd1f1"/><br>                                <textFieldExpression><![CDATA[$F{maxDownlinks}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="19330cef-7697-44fb-bd59-d7661c1abf08"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="05c2ecbf-8afd-4911-a915-bbc07705fb41"/><br>                                <text><![CDATA[reboots]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="f5c018a2-ac38-4ce8-b87a-0d6b43976b67"/><br>                                <textFieldExpression><![CDATA[$F{reboots}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="50d0f899-7306-4fc3-a3d3-8d6fe53af0ce"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="09b36eb0-a4fd-4b2a-b562-17a57a900726"/><br>                                <text><![CDATA[meshDepth]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="c72d13f8-3047-425b-b75b-f5768e1fc7d4"/><br>                                <textFieldExpression><![CDATA[$F{meshDepth}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="e13fc07d-7de3-49e4-8097-f96dc2f49a60"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="9f1541ca-ea4e-49e6-b854-a5786a25e70c"/><br>                                <text><![CDATA[uptime]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="8377c628-d69d-416f-912f-2824adf67fd4"/><br>                                <textFieldExpression><![CDATA[$F{uptime}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                    <jr:column width="22" uuid="3dee17fa-5450-42a9-b509-d51be56c84fa"><br>                        <jr:tableHeader style="Table 1_TH" height="30"/><br>                        <jr:columnHeader style="Table 1_CH" height="30"><br>                            <staticText><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="7364acc2-d9a4-409d-bf5b-cd464941d713"/><br>                                <text><![CDATA[apCount]]></text><br>                            </staticText><br>                        </jr:columnHeader><br>                        <jr:detailCell style="Table 1_TD" height="30"><br>                            <textField><br>                                <reportElement x="0" y="0" width="22" height="30" uuid="667f9734-f0f2-4fd0-a34b-51760d8eb7a3"/><br>                                <textFieldExpression><![CDATA[$F{apCount}]]></textFieldExpression><br>                            </textField><br>                        </jr:detailCell><br>                    </jr:column><br>                </jr:table><br>            </componentElement><br>        </band><br>    </summary><br></jasperReport><br>[/code]

 

Link to comment
Share on other sites

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final using JasperReports Library version 6.4.3  -->
<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="ap_stats" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="283cd4f8-20ba-4c24-aac6-1eb1d2968165">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table 1_CH" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="Table 1_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
            <topPen lineWidth="0.5" lineColor="#000000"/>
            <leftPen lineWidth="0.5" lineColor="#000000"/>
            <bottomPen lineWidth="0.5" lineColor="#000000"/>
            <rightPen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <subDataset name="apStatsUplinkRssiHistogramDataset" uuid="d2a7b04c-9024-4ebb-bf10-8eac752c0652">
        <field name="key" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="key"/>
            <fieldDescription><![CDATA[key]]></fieldDescription>
        </field>
        <field name="value" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="value"/>
            <fieldDescription><![CDATA[value]]></fieldDescription>
        </field>
    </subDataset>
    <subDataset name="apStatsTopMeshDepthApsDataset" uuid="aeac9371-9d47-4ddf-a81b-88a19167216f">
        <queryString language="json">
            <![CDATA[data.apStatsTopMeshDepthAps]]>
        </queryString>
        <field name="key" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="key"/>
            <fieldDescription><![CDATA[key]]></fieldDescription>
        </field>
        <field name="uplinkRssi" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="uplinkRssi"/>
            <fieldDescription><![CDATA[uplinkRssi]]></fieldDescription>
        </field>
        <field name="rxBytes" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="rxBytes"/>
            <fieldDescription><![CDATA[rxBytes]]></fieldDescription>
        </field>
        <field name="txBytes" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="txBytes"/>
            <fieldDescription><![CDATA[txBytes]]></fieldDescription>
        </field>
        <field name="maxDownlinks" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="maxDownlinks"/>
            <fieldDescription><![CDATA[maxDownlinks]]></fieldDescription>
        </field>
        <field name="reboots" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="reboots"/>
            <fieldDescription><![CDATA[reboots]]></fieldDescription>
        </field>
        <field name="meshDepth" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="meshDepth"/>
            <fieldDescription><![CDATA[meshDepth]]></fieldDescription>
        </field>
        <field name="uptime" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="uptime"/>
            <fieldDescription><![CDATA[uptime]]></fieldDescription>
        </field>
        <field name="apCount" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="apCount"/>
            <fieldDescription><![CDATA[apCount]]></fieldDescription>
        </field>
    </subDataset>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="79" splitType="Stretch">
            <staticText>
                <reportElement x="280" y="0" width="270" height="59" uuid="cf2f5150-b880-4e60-b477-62373b65b3e2"/>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font size="26"/>
                </textElement>
                <text><![CDATA[AP stats Report Test]]></text>
            </staticText>
        </band>
    </title>
    <summary>
        <band height="243" splitType="Stretch">
            <componentElement>
                <reportElement x="0" y="20" width="200" height="200" uuid="6f63371d-ec7b-43c2-a3b5-ced21fc2a3f6">
                    <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"/>
                </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" whenNoDataType="AllSectionsNoDetail">
                    <datasetRun subDataset="apStatsUplinkRssiHistogramDataset" uuid="77ec1492-8b6c-4127-a386-f3314fd46857">
                        <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data.apStatsUplinkRssiHistogram")]]></dataSourceExpression>
                    </datasetRun>
                    <jr:column width="100" uuid="cc8b1753-9492-4f21-b351-c1ced570624a">
                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
                        <jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
                        <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" uuid="59fff9fb-5332-4a89-87c1-ce5adcf239fc"/>
                                <text><![CDATA[key]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="100" height="30" uuid="e84bf9d6-2d46-425e-b509-65348e12ddcf"/>
                                <textFieldExpression><![CDATA[$F{key}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="100" uuid="dbd4c1ec-dfe0-46c0-a4e0-95bc5b04f573">
                        <property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
                        <jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
                        <jr:columnHeader style="Table_CH" height="30" rowSpan="1">
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" uuid="964ac838-eb40-4c6c-b4ad-54ef6ec0b027"/>
                                <text><![CDATA[value]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="100" height="30" uuid="a42c981e-d1e1-441f-b2f8-7f6e87f15c12"/>
                                <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
            <componentElement>
                <reportElement x="280" y="20" width="520" height="200" uuid="de0eaa2d-c85e-4ca0-bdeb-3bb3fff7d1b9">
                    <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
                    <property name="com.jaspersoft.studio.table.style.table_header" value="Table 1_TH"/>
                    <property name="com.jaspersoft.studio.table.style.column_header" value="Table 1_CH"/>
                    <property name="com.jaspersoft.studio.table.style.detail" value="Table 1_TD"/>
                </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" whenNoDataType="AllSectionsNoDetail">
                    <datasetRun subDataset="apStatsTopMeshDepthApsDataset" uuid="6a488a15-b3f8-409b-b989-560c868dd6ee">
                        <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data.apStatsTopMeshDepthAps")]]></dataSourceExpression>
                    </datasetRun>
                    <jr:column width="22" uuid="9f234dab-04f6-4138-a238-8f51a79d9ae7">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="08a71d83-e51f-4529-9270-90cc9b892255"/>
                                <text><![CDATA[key]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="066b7d9c-3ac7-428d-841f-ed9ef9ece275"/>
                                <textFieldExpression><![CDATA[$F{key}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="d673edac-00c9-4e03-9530-141f80ca299e">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="d0a77e85-9da3-480e-b918-3d9fc50a572c"/>
                                <text><![CDATA[uplinkRssi]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="d72315b5-88af-41b7-99e2-62b287d3ac01"/>
                                <textFieldExpression><![CDATA[$F{uplinkRssi}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="17ff12de-6fc6-4fea-9c41-dd079d522474">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="77a4d196-804d-4c12-8d6a-c14adb125a4a"/>
                                <text><![CDATA[rxBytes]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="737eae48-3ae8-4fca-8d51-71822a164e29"/>
                                <textFieldExpression><![CDATA[$F{rxBytes}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="99c128fa-a722-4db9-b942-3fb36602e3ad">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="3094f812-9819-41bf-9bde-cef9dd418c6e"/>
                                <text><![CDATA[txBytes]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="8c71d4eb-6933-4b73-b931-0ccef546920c"/>
                                <textFieldExpression><![CDATA[$F{txBytes}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="c1932a78-6a86-4be9-a3e5-14393c6bcaf2">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="fd19197f-669f-4c83-b752-4efb59ce0ec0"/>
                                <text><![CDATA[maxDownlinks]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="e20b9d0e-67c1-44c0-87df-6dd4c2cfd1f1"/>
                                <textFieldExpression><![CDATA[$F{maxDownlinks}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="19330cef-7697-44fb-bd59-d7661c1abf08">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="05c2ecbf-8afd-4911-a915-bbc07705fb41"/>
                                <text><![CDATA[reboots]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="f5c018a2-ac38-4ce8-b87a-0d6b43976b67"/>
                                <textFieldExpression><![CDATA[$F{reboots}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="50d0f899-7306-4fc3-a3d3-8d6fe53af0ce">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="09b36eb0-a4fd-4b2a-b562-17a57a900726"/>
                                <text><![CDATA[meshDepth]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="c72d13f8-3047-425b-b75b-f5768e1fc7d4"/>
                                <textFieldExpression><![CDATA[$F{meshDepth}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="e13fc07d-7de3-49e4-8097-f96dc2f49a60">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="9f1541ca-ea4e-49e6-b854-a5786a25e70c"/>
                                <text><![CDATA[uptime]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="8377c628-d69d-416f-912f-2824adf67fd4"/>
                                <textFieldExpression><![CDATA[$F{uptime}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="22" uuid="3dee17fa-5450-42a9-b509-d51be56c84fa">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="22" height="30" uuid="7364acc2-d9a4-409d-bf5b-cd464941d713"/>
                                <text><![CDATA[apCount]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="22" height="30" uuid="667f9734-f0f2-4fd0-a34b-51760d8eb7a3"/>
                                <textFieldExpression><![CDATA[$F{apCount}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </summary>
</jasperReport>
 

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