Why I m getting empty report using a json file as datasource?











up vote
0
down vote

favorite












I m using tibco jaspersoft studio to generate a report



droping fields in the detail band is getting all data but when I try to use a table I m getting two empty pages.



the printing option is set to print all sections no details



here is my data json file



[ {
"clientName" : "SEMMOUD Abderrazak",
"clientPhone" : "043303854",
"codeExterne" : "CLI201801",
"email" : "talcorpdz@gmail.com",
"clientType" : 0,
"clientEtat" : 1,
"identifiant" : "TalcorpDZ",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed Housseyn",
"telephonePortable" : "04330256699",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants Mohammed Khemisti",
"ville" : "Maghnia"
} ]
}, {
"clientName" : "",
"clientPhone" : "",
"codeExterne" : "sdsqdqs",
"email" : "talcorpdz@gmail.com",
"clientType" : 1,
"clientEtat" : 1,
"identifiant" : "sqdsqd",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed",
"telephonePortable" : "+213778217469",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants ",
"ville" : "Maghnia"
} ]
} ]


and here is my report



<?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="refClient" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="758785c8-ae8f-49bd-9995-19c9827a7ebb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<queryString language="json">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
</subDataset>
<queryString language="JSON">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
<detail>
<band height="258" splitType="Stretch">
<componentElement>
<reportElement x="40" y="10" width="660" height="200" uuid="a43c33cc-e3f9-470c-8df4-1c36301c869e">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
<property name="com.jaspersoft.studio.components.autoresize.next" 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="jsonRefClient" uuid="b4a19c4b-0cb1-481a-a9ba-739ce437135a">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="660" uuid="eda57584-75da-466c-8182-d466356f3cc4">
<jr:tableHeader height="30" rowSpan="1"/>
<jr:tableFooter height="30" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="660" height="30" uuid="d349739f-3e3d-4012-8e52-3b5c7bd75eb9"/>
<text><![CDATA[clientName]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1"/>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="660" height="30" uuid="fb6bb53f-e520-48f4-81e0-189ae5058656"/>
<textFieldExpression><![CDATA[$F{clientName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>


What should I do to fix this issue?










share|improve this question
























  • @Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
    – Narcis
    Nov 15 at 20:32










  • It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
    – Narcis
    Nov 16 at 8:24















up vote
0
down vote

favorite












I m using tibco jaspersoft studio to generate a report



droping fields in the detail band is getting all data but when I try to use a table I m getting two empty pages.



the printing option is set to print all sections no details



here is my data json file



[ {
"clientName" : "SEMMOUD Abderrazak",
"clientPhone" : "043303854",
"codeExterne" : "CLI201801",
"email" : "talcorpdz@gmail.com",
"clientType" : 0,
"clientEtat" : 1,
"identifiant" : "TalcorpDZ",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed Housseyn",
"telephonePortable" : "04330256699",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants Mohammed Khemisti",
"ville" : "Maghnia"
} ]
}, {
"clientName" : "",
"clientPhone" : "",
"codeExterne" : "sdsqdqs",
"email" : "talcorpdz@gmail.com",
"clientType" : 1,
"clientEtat" : 1,
"identifiant" : "sqdsqd",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed",
"telephonePortable" : "+213778217469",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants ",
"ville" : "Maghnia"
} ]
} ]


and here is my report



<?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="refClient" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="758785c8-ae8f-49bd-9995-19c9827a7ebb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<queryString language="json">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
</subDataset>
<queryString language="JSON">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
<detail>
<band height="258" splitType="Stretch">
<componentElement>
<reportElement x="40" y="10" width="660" height="200" uuid="a43c33cc-e3f9-470c-8df4-1c36301c869e">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
<property name="com.jaspersoft.studio.components.autoresize.next" 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="jsonRefClient" uuid="b4a19c4b-0cb1-481a-a9ba-739ce437135a">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="660" uuid="eda57584-75da-466c-8182-d466356f3cc4">
<jr:tableHeader height="30" rowSpan="1"/>
<jr:tableFooter height="30" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="660" height="30" uuid="d349739f-3e3d-4012-8e52-3b5c7bd75eb9"/>
<text><![CDATA[clientName]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1"/>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="660" height="30" uuid="fb6bb53f-e520-48f4-81e0-189ae5058656"/>
<textFieldExpression><![CDATA[$F{clientName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>


What should I do to fix this issue?










share|improve this question
























  • @Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
    – Narcis
    Nov 15 at 20:32










  • It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
    – Narcis
    Nov 16 at 8:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I m using tibco jaspersoft studio to generate a report



droping fields in the detail band is getting all data but when I try to use a table I m getting two empty pages.



the printing option is set to print all sections no details



here is my data json file



[ {
"clientName" : "SEMMOUD Abderrazak",
"clientPhone" : "043303854",
"codeExterne" : "CLI201801",
"email" : "talcorpdz@gmail.com",
"clientType" : 0,
"clientEtat" : 1,
"identifiant" : "TalcorpDZ",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed Housseyn",
"telephonePortable" : "04330256699",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants Mohammed Khemisti",
"ville" : "Maghnia"
} ]
}, {
"clientName" : "",
"clientPhone" : "",
"codeExterne" : "sdsqdqs",
"email" : "talcorpdz@gmail.com",
"clientType" : 1,
"clientEtat" : 1,
"identifiant" : "sqdsqd",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed",
"telephonePortable" : "+213778217469",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants ",
"ville" : "Maghnia"
} ]
} ]


and here is my report



<?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="refClient" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="758785c8-ae8f-49bd-9995-19c9827a7ebb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<queryString language="json">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
</subDataset>
<queryString language="JSON">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
<detail>
<band height="258" splitType="Stretch">
<componentElement>
<reportElement x="40" y="10" width="660" height="200" uuid="a43c33cc-e3f9-470c-8df4-1c36301c869e">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
<property name="com.jaspersoft.studio.components.autoresize.next" 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="jsonRefClient" uuid="b4a19c4b-0cb1-481a-a9ba-739ce437135a">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="660" uuid="eda57584-75da-466c-8182-d466356f3cc4">
<jr:tableHeader height="30" rowSpan="1"/>
<jr:tableFooter height="30" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="660" height="30" uuid="d349739f-3e3d-4012-8e52-3b5c7bd75eb9"/>
<text><![CDATA[clientName]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1"/>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="660" height="30" uuid="fb6bb53f-e520-48f4-81e0-189ae5058656"/>
<textFieldExpression><![CDATA[$F{clientName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>


What should I do to fix this issue?










share|improve this question















I m using tibco jaspersoft studio to generate a report



droping fields in the detail band is getting all data but when I try to use a table I m getting two empty pages.



the printing option is set to print all sections no details



here is my data json file



[ {
"clientName" : "SEMMOUD Abderrazak",
"clientPhone" : "043303854",
"codeExterne" : "CLI201801",
"email" : "talcorpdz@gmail.com",
"clientType" : 0,
"clientEtat" : 1,
"identifiant" : "TalcorpDZ",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed Housseyn",
"telephonePortable" : "04330256699",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants Mohammed Khemisti",
"ville" : "Maghnia"
} ]
}, {
"clientName" : "",
"clientPhone" : "",
"codeExterne" : "sdsqdqs",
"email" : "talcorpdz@gmail.com",
"clientType" : 1,
"clientEtat" : 1,
"identifiant" : "sqdsqd",
"contacts" : [ {
"nom" : "Taleb",
"prenom" : "Mohammed",
"telephonePortable" : "+213778217469",
"email" : null
} ],
"adresses" : [ {
"adress" : "Batiments des enseignants ",
"ville" : "Maghnia"
} ]
} ]


and here is my report



<?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="refClient" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="758785c8-ae8f-49bd-9995-19c9827a7ebb">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="refcliJsonAdapter"/>
<queryString language="json">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
</subDataset>
<queryString language="JSON">
<![CDATA]>
</queryString>
<field name="clientName" class="java.lang.String">
<property name="net.sf.jasperreports.json.field.expression" value="clientName"/>
<fieldDescription><![CDATA[clientName]]></fieldDescription>
</field>
<detail>
<band height="258" splitType="Stretch">
<componentElement>
<reportElement x="40" y="10" width="660" height="200" uuid="a43c33cc-e3f9-470c-8df4-1c36301c869e">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.components.autoresize.proportional" value="true"/>
<property name="com.jaspersoft.studio.components.autoresize.next" 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="jsonRefClient" uuid="b4a19c4b-0cb1-481a-a9ba-739ce437135a">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="660" uuid="eda57584-75da-466c-8182-d466356f3cc4">
<jr:tableHeader height="30" rowSpan="1"/>
<jr:tableFooter height="30" rowSpan="1"/>
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="660" height="30" uuid="d349739f-3e3d-4012-8e52-3b5c7bd75eb9"/>
<text><![CDATA[clientName]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter height="30" rowSpan="1"/>
<jr:detailCell height="30">
<textField>
<reportElement x="0" y="0" width="660" height="30" uuid="fb6bb53f-e520-48f4-81e0-189ae5058656"/>
<textFieldExpression><![CDATA[$F{clientName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>


What should I do to fix this issue?







json jasper-reports






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 at 20:53









Alex K

18.3k1479150




18.3k1479150










asked Nov 15 at 13:49









Mohammed Housseyn Taleb

7031026




7031026












  • @Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
    – Narcis
    Nov 15 at 20:32










  • It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
    – Narcis
    Nov 16 at 8:24


















  • @Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
    – Narcis
    Nov 15 at 20:32










  • It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
    – Narcis
    Nov 16 at 8:24
















@Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
– Narcis
Nov 15 at 20:32




@Alex K, you have not properly edited the report JRXML and it is now in an uncompilable state.
– Narcis
Nov 15 at 20:32












It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
– Narcis
Nov 16 at 8:24




It is a problem, indeed, with huge templates and unnecessary code. Most people don't even bother reading the mcve. But I find it hard, sometimes, to cleanup a report from within JSS, so I do it manually instead. And I don't think that's easy for everyone.
– Narcis
Nov 16 at 8:24












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Your table dataSet is not actually linked to any data, at runtime. A quick fix is to:




  1. Export your JSON Data Adapter to a file on the same level as your report, let's say refcliJsonAdapter.xml


  2. Add the net.sf.jasperreports.data.adapter property to your table dataSet, something like:



    <subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
    ...
    <property name="net.sf.jasperreports.data.adapter" value="refcliJsonAdapter.xml"/>
    ...
    </subDataset>


  3. Preview the report against the One Empty Record built-in Data Adapter if you don't want repeating tables.







share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53320923%2fwhy-i-m-getting-empty-report-using-a-json-file-as-datasource%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    Your table dataSet is not actually linked to any data, at runtime. A quick fix is to:




    1. Export your JSON Data Adapter to a file on the same level as your report, let's say refcliJsonAdapter.xml


    2. Add the net.sf.jasperreports.data.adapter property to your table dataSet, something like:



      <subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
      ...
      <property name="net.sf.jasperreports.data.adapter" value="refcliJsonAdapter.xml"/>
      ...
      </subDataset>


    3. Preview the report against the One Empty Record built-in Data Adapter if you don't want repeating tables.







    share|improve this answer

























      up vote
      1
      down vote



      accepted










      Your table dataSet is not actually linked to any data, at runtime. A quick fix is to:




      1. Export your JSON Data Adapter to a file on the same level as your report, let's say refcliJsonAdapter.xml


      2. Add the net.sf.jasperreports.data.adapter property to your table dataSet, something like:



        <subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
        ...
        <property name="net.sf.jasperreports.data.adapter" value="refcliJsonAdapter.xml"/>
        ...
        </subDataset>


      3. Preview the report against the One Empty Record built-in Data Adapter if you don't want repeating tables.







      share|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Your table dataSet is not actually linked to any data, at runtime. A quick fix is to:




        1. Export your JSON Data Adapter to a file on the same level as your report, let's say refcliJsonAdapter.xml


        2. Add the net.sf.jasperreports.data.adapter property to your table dataSet, something like:



          <subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
          ...
          <property name="net.sf.jasperreports.data.adapter" value="refcliJsonAdapter.xml"/>
          ...
          </subDataset>


        3. Preview the report against the One Empty Record built-in Data Adapter if you don't want repeating tables.







        share|improve this answer












        Your table dataSet is not actually linked to any data, at runtime. A quick fix is to:




        1. Export your JSON Data Adapter to a file on the same level as your report, let's say refcliJsonAdapter.xml


        2. Add the net.sf.jasperreports.data.adapter property to your table dataSet, something like:



          <subDataset name="jsonRefClient" whenResourceMissingType="Empty" uuid="1dcb37f4-96e4-472a-aadb-309de9d05089">
          ...
          <property name="net.sf.jasperreports.data.adapter" value="refcliJsonAdapter.xml"/>
          ...
          </subDataset>


        3. Preview the report against the One Empty Record built-in Data Adapter if you don't want repeating tables.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 at 20:47









        Narcis

        1,5212616




        1,5212616






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53320923%2fwhy-i-m-getting-empty-report-using-a-json-file-as-datasource%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?