Sub Report won't display string fields

I am fairly new to Jasper Reports and am struggling with a few items in order to get a fairly complex report to function properly.

I do not know if it is a simple mistake (parameter missing/set wrong/...) or if I am hitting a limitation of Jasper Reports.

I understand that the resulting JSON data source provided by a web rest service is a consumable and that the “base” object (object that is the “driving” the population of the report) needs to be presort/grouped or data you expect to appear will be missing (rather, in my opinion, a better explanation would be that the data is “skipped” because it cannot handle sorting by accessing the rest service JSON data object the way it is currently programmed).

Currently handling VERY COMPLEX JSON result sets where there are multiple objects and the multiple objects themselves count arrays of objects.  Is causing me fits and the only thing I can guarantee is that the JSON data object will only get more complicated and not less with the current project I am working on.

I have followed the example “Multiple datasets, Exactly the same json (only one webservice call) - Extension and Another Example” (located here) and had success, unfortunately by setting the report language to “groovy” the report performed at an unacceptable level of performance (unfortunately my reports are that complex).

 

The only way around this that I have found thus far is that for every field that will exist in the sub report there must be a corresponding field of the same name in the main object (the presorted object as mentioned above).

 

I have designed the main report and have it display data correctly. 

 

I created a sub report and by itself will display the data as expected (except for one, I don’t know if this is a limitation or I made a mistake in the JSON data design), some fields are date fields and others are complex data objects which contain arrays of objects. The complex objects that appear do so as simple strings (eventually these objects will be passed to sub, sub reports for further processing/formatting).

 

But, when I embed the sub report into the main report, only the dates currently display the other complex data objects will not display as they did when the sub report is used as a standalone.

 

Due to the complexity of this report and what it will be able to do when completed, I would gladly share a version of this report to be used as an example by everyone.  And as time permits me, annotate a tutorial explaining (what I can explain, since I am still fairly new at this) what is going on in the various parts of the report.

 

Here is the JSON that is setup to be supplied as a web service (name = vtrRg_multi_lvl.json):

..{
    "dbLocation": "jdbc/abcd_123",
    "totalAttempts": 1,
    "accessedTableDetails": {
 
    },
    "resultObject": {
        "sortObject": [{
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "Z4",
            "lcnNm": "Associate Div Mid Earth",
            "ctgryCd": "ELC",
            "ctgryNm": "ELECTION LAW CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "Z4",
            "lcnNm": "Associate Div Mid Earth",
            "ctgryCd": "FEL",
            "ctgryNm": "FELONY CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "Z4",
            "lcnNm": "Associate Div Mid Earth",
            "ctgryCd": "INC",
            "ctgryNm": "INCAPACITATED ADULTS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "DQ",
            "lcnNm": "OZ",
            "ctgryCd": "ELC",
            "ctgryNm": "ELECTION LAW CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "DQ",
            "lcnNm": "OZ",
            "ctgryCd": "FEL",
            "ctgryNm": "FELONY CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "DQ",
            "lcnNm": "OZ",
            "ctgryCd": "INC",
            "ctgryNm": "INCAPACITATED ADULTS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "IT",
            "lcnNm": "Lidsville",
            "ctgryCd": "ELC",
            "ctgryNm": "ELECTION LAW CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "IT",
            "lcnNm": "Lidsville",
            "ctgryCd": "FEL",
            "ctgryNm": "FELONY CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "IT",
            "lcnNm": "Lidsville",
            "ctgryCd": "INC",
            "ctgryNm": "INCAPACITATED ADULTS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "PD",
            "lcnNm": "Superior Court for Push'n Up Daisies",
            "ctgryCd": "ELC",
            "ctgryNm": "ELECTION LAW CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "PD",
            "lcnNm": "Superior Court for Push'n Up Daisies",
            "ctgryCd": "FEL",
            "ctgryNm": "FELONY CONVICTIONS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        },
        {
            "crtCd": "77",
            "crtNm": "77th Peanut Gallery",
            "lcnCd": "PD",
            "lcnNm": "Superior Court for Push'n Up Daisies",
            "ctgryCd": "INC",
            "ctgryNm": "INCAPACITATED ADULTS",
            "stDtRng": "2011-01-01 00:00:00.000",
            "edDtRng": "2017-12-12 23:59:59.999",
            "caseId": null,
            "lstNm": null,
            "mdlNm": null,
            "fstNm": null,
            "dob": null,
            "dod": null,
            "lst4SSN": null,
            "cntctLst": null,
            "lstKnwnAddr": null
        }],
        "individuals": [{
            "ctgryCd": "INC",
            "caseLst": [{
                "caseInf": {
                    "type": "mstr",
                    "seq": "1",
                    "crtCd": "77",
                    "lcnCd": "PD",
                    "caseId": "18UP-BD90210",
                    "cType": "MN",
                    "secr": "1",
                    "caseDscr": "Mental State of Hearing Colors and Seeing Sounds",
                    "mstrCs": null,
                    "subCs": null,
                    "initDt": "2017-03-02 08:52:43.126",
                    "dispDate": null,
                    "caseAgeMod": "0"
                }
            },
            {
                "caseInf": {
                    "type": "mstr",
                    "seq": "2",
                    "crtCd": "77",
                    "lcnCd": "PD",
                    "caseId": "18UP-BD9371",
                    "cType": "MN",
                    "secr": "1",
                    "caseDscr": "Incoherent Ranting About End-times",
                    "mstrCs": null,
                    "subCs": null,
                    "initDt": "2017-12-21 16:22:19.137",
                    "dispDate": null,
                    "caseAgeMod": "0"
                }
            }],
            "lcnCd": "PD",
            "crtCd": "77",
            "nmLst": [{
                "name": {
                    "type": "lgl",
                    "seq": "1",
                    "prfx": null,
                    "fstNm": "Ava",
                    "mdlNm": "Eusin",
                    "lstNm": "Mia",
                    "sffx": null,
                    "active": "Y"
                }
            },
            {
                "name": {
                    "type": "lgl",
                    "seq": "2",
                    "prfx": null,
                    "fstNm": "Ava",
                    "mdlNm": "Eusin",
                    "lstNm": "Her",
                    "sffx": null,
                    "active": "N"
                }
            },
            {
                "name": {
                    "type": "aka",
                    "seq": "3",
                    "prfx": null,
                    "fstNm": "Tripn",
                    "mdlNm": null,
                    "lstNm": "Ava",
                    "sffx": null,
                    "active": "Y"
                }
            },
            {
                "name": {
                    "type": "aka",
                    "seq": "4",
                    "prfx": null,
                    "fstNm": "Vape",
                    "mdlNm": "Brain",
                    "lstNm": "Ava",
                    "sffx": null,
                    "active": "Y"
                }
            },
            {
                "name": {
                    "type": "aka",
                    "seq": "5",
                    "prfx": null,
                    "fstNm": "Space",
                    "mdlNm": null,
                    "lstNm": "Cadet",
                    "sffx": null,
                    "active": "Y"
                }
            }],
            "dob": null,
            "dod": null,
            "ssn": "0351",
            "cntctLst": {
                "adrsLst": [{
                    "address": {
                        "aType": "MA",
                        "seq": "1",
                        "line1": "123 Aysid Trippen Ln",
                        "line2": null,
                        "line3": null,
                        "city": "MOCKINGBIRD HEIGHTS",
                        "st": "MO",
                        "zipCd": "65999",
                        "startDt": "2000-10-31 23:59:59.999",
                        "endDt": null
                    }
                },
                {
                    "address": {
                        "aType": "BA",
                        "seq": "1",
                        "line1": "456 Columbian Gold Dr",
                        "line2": null,
                        "line3": null,
                        "city": "MOCKINGBIRD HEIGHTS",
                        "st": "MO",
                        "zipCd": "65999",
                        "startDt": "2010-07-17 07:05:30.123",
                        "endDt": null
                    }
                },
                {
                    "address": {
                        "aType": "BA",
                        "seq": "2",
                        "line1": "In care of Cookie Monster",
                        "line2": "Apt 42",
                        "line3": "789 Smucken Crick Blvd",
                        "city": "MOCKINGBIRD HEIGHTS",
                        "st": "MO",
                        "zipCd": "65999",
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": "2010-07-17 07:05:30.122"
                    }
                }],
                "emLst": [{
                    "email": {
                        "aType": "MA",
                        "seq": "1",
                        "email": "ibflynhi991@fiveleafclover.org",
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": null
                    }
                },
                {
                    "email": {
                        "aType": "BA",
                        "seq": "1",
                        "email": "creativelifestyles@fiveleafclover.org",
                        "startDt": "2010-07-17 07:05:30.123",
                        "endDt": null
                    }
                },
                {
                    "email": {
                        "aType": "BA",
                        "seq": "2",
                        "email": "isellcrack@fiveleafclover.org",
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": "2010-07-17 07:05:30.122"
                    }
                }],
                "phnLst": [{
                    "phone": {
                        "aType": "RE",
                        "seq": "1",
                        "pre": "666",
                        "phone": "3572357",
                        "ext": null,
                        "int": null,
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": null
                    }
                },
                {
                    "phone": {
                        "aType": "BU",
                        "seq": "1",
                        "pre": "666",
                        "phone": "3575962",
                        "ext": null,
                        "int": null,
                        "startDt": "2010-07-17 07:05:30.123",
                        "endDt": null
                    }
                },
                {
                    "phone": {
                        "aType": "BU",
                        "seq": "2",
                        "pre": "666",
                        "phone": "3573673",
                        "ext": null,
                        "int": null,
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": "2010-07-17 07:05:30.122"
                    }
                }]
            }
        },
        {
            "ctgryCd": "ELC",
            "caseLst": [{
                "caseInf": {
                    "type": "mstr",
                    "seq": "1",
                    "crtCd": "77",
                    "lcnCd": "PD",
                    "caseId": "18UP-CR00201",
                    "cType": "E1",
                    "secr": "1",
                    "caseDscr": "Not Registering Death Certificate",
                    "mstrCs": null,
                    "subCs": null,
                    "initDt": "2017-03-02 08:52:43.126",
                    "dispDate": null,
                    "caseAgeMod": "0"
                }
            },
            {
                "caseInf": {
                    "type": "mstr",
                    "seq": "2",
                    "crtCd": "77",
                    "lcnCd": "PD",
                    "caseId": "18UP-BD9371",
                    "cType": "MN",
                    "secr": "1",
                    "caseDscr": "Incoherent Ranting About End-times",
                    "mstrCs": null,
                    "subCs": null,
                    "initDt": "2017-12-21 16:22:19.137",
                    "dispDate": null,
                    "caseAgeMod": "0"
                }
            }],
            "lcnCd": "PD",
            "crtCd": "77",
            "nmLst": [{
                "name": {
                    "type": "lgl",
                    "seq": "1",
                    "prfx": null,
                    "fstNm": "Dede",
                    "mdlNm": "Azah",
                    "lstNm": "Nale",
                    "sffx": null,
                    "active": "Y"
                }
            },
            {
                "name": {
                    "type": "aka",
                    "seq": "2",
                    "prfx": null,
                    "fstNm": "Dede",
                    "mdlNm": null,
                    "lstNm": "Stiff",
                    "sffx": null,
                    "active": "N"
                }
            },
            {
                "name": {
                    "type": "aka",
                    "seq": "3",
                    "prfx": null,
                    "fstNm": "Dede",
                    "mdlNm": "Man",
                    "lstNm": "Walking",
                    "sffx": null,
                    "active": "Y"
                }
            }],
            "dob": "1801-08-21 00:00:00.000",
            "dod": "1874-06-21 00:00:00.000",
            "ssn": "0666",
            "cntctLst": {
                "adrsLst": [{
                    "address": {
                        "aType": "MA",
                        "seq": "1",
                        "line1": "23RD TOMBSTONE ROW",
                        "line2": null,
                        "line3": null,
                        "city": "MOCKINGBIRD HEIGHTS",
                        "st": "MO",
                        "zipCd": "65999",
                        "startDt": "2000-10-31 23:59:59.999",
                        "endDt": null
                    }
                },
                {
                    "address": {
                        "aType": "BA",
                        "seq": "1",
                        "line1": "1ST TOMBSTONE ROW",
                        "line2": null,
                        "line3": null,
                        "city": "MOCKINGBIRD HEIGHTS",
                        "st": "MO",
                        "zipCd": "65999",
                        "startDt": "1874-06-21 12:43:00.000",
                        "endDt": "1942-10-31 23:56:00.000"
                    }
                }],
                "emLst": [{
                    "email": {
                        "aType": "MA",
                        "seq": "1",
                        "email": "cryptkeeper453@netherworld.net",
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": null
                    }
                }],
                "phnLst": [{
                    "phone": {
                        "aType": "RE",
                        "seq": "1",
                        "pre": "666",
                        "phone": "3573323",
                        "ext": null,
                        "int": null,
                        "startDt": "2001-03-21 23:45:16.000",
                        "endDt": null
                    }
                }]
            }
        }]
    },
    "dataElementErrors": null,
    "statusCode": "OK"
}..

Here is the code for the main report (name = cmplxVtrRg_multi_lvl_01.jrxml):

..<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1  -->
<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="cmplxVtrRg_multi_lvl" pageWidth="612" pageHeight="792" columnWidth="576" leftMargin="18" rightMargin="18" topMargin="36" bottomMargin="36" uuid="64d40135-4099-44f2-b13a-6bec9da7b4ab">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataAdapter.xml"/>
    <property name="com.jaspersoft.studio.unit." value="inch"/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="inch"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="inch"/>
    <property name="com.jaspersoft.studio.unit.topMargin" value="inch"/>
    <property name="com.jaspersoft.studio.unit.bottomMargin" value="inch"/>
    <property name="com.jaspersoft.studio.unit.leftMargin" value="inch"/>
    <property name="com.jaspersoft.studio.unit.rightMargin" value="inch"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="inch"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="inch"/>
    <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="402"/>
    <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value="587"/>
    <queryString language="WebServiceQuery">
        <![CDATA[{
  "getparameters" : { },
  "fields" : [ {
    "name" : "crtCd",
    "expression" : "crtCd"
  }, {
    "name" : "crtNm",
    "expression" : "crtNm"
  }, {
    "name" : "lcnCd",
    "expression" : "lcnCd"
  }, {
    "name" : "lcnNm",
    "expression" : "lcnNm"
  }, {
    "name" : "ctgryCd",
    "expression" : "ctgryCd"
  }, {
    "name" : "ctgryNm",
    "expression" : "ctgryNm"
  }, {
    "name" : "stDtRng",
    "expression" : "stDtRng"
  }, {
    "name" : "edDtRng",
    "expression" : "edDtRng"
  }, {
    "name" : "caseId",
    "expression" : "caseId"
  }, {
    "name" : "lstNm",
    "expression" : "lstNm"
  }, {
    "name" : "mdlNm",
    "expression" : "mdlNm"
  }, {
    "name" : "fstNm",
    "expression" : "fstNm"
  }, {
    "name" : "dob",
    "expression" : "dob"
  }, {
    "name" : "lst4SSN",
    "expression" : "lst4SSN"
  }, {
    "name" : "lstKnwnAddr",
    "expression" : "lstKnwnAddr"
  }, {
    "name" : "dod",
    "expression" : "dod"
  }, {
    "name" : "cntctLst",
    "expression" : "cntctLst"
  } ],
  "options" : {
    "contentType" : "application/json",
    "rootPath" : "resultObject.sortObject",
    "baseUrl" : "vtrRg_multi_lvl.json"
  },
  "headersMap" : { },
  "queryData" : "",
  "GETParameters" : { }
}]]>
    </queryString>
    <field name="crtCd" class="java.lang.Integer"/>
    <field name="crtNm" class="java.lang.String"/>
    <field name="lcnCd" class="java.lang.String"/>
    <field name="lcnNm" class="java.lang.String"/>
    <field name="ctgryCd" class="java.lang.String"/>
    <field name="ctgryNm" class="java.lang.String"/>
    <field name="stDtRng" class="java.sql.Timestamp"/>
    <field name="edDtRng" class="java.sql.Timestamp"/>
    <field name="caseId" class="java.lang.String"/>
    <field name="lstNm" class="java.lang.String"/>
    <field name="mdlNm" class="java.lang.String"/>
    <field name="fstNm" class="java.lang.String"/>
    <field name="dob" class="java.sql.Timestamp"/>
    <field name="lst4SSN" class="java.lang.String"/>
    <field name="lstKnwnAddr" class="java.lang.String"/>
    <field name="dod" class="java.sql.Timestamp"/>
    <field name="cntctLst" class="java.lang.String"/>
    <group name="Court">
        <groupExpression><![CDATA[$F{crtNm}]]></groupExpression>
    </group>
    <group name="Location" isStartNewPage="true" isReprintHeaderOnEachPage="true">
        <groupExpression><![CDATA[$F{lcnNm}]]></groupExpression>
        <groupHeader>
            <band height="68">
                <textField>
                    <reportElement x="102" y="14" width="360" height="12" uuid="25d7db9b-c0e8-4c9a-8ea1-1c134b6ca4e4"/>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{lcnNm}.toUpperCase()]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="102" y="38" width="360" height="12" uuid="94224bfd-8a4f-4031-8637-21640399823f"/>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA["FROM:  " +  (new java.text.SimpleDateFormat("dd-MMM-yyyy").format($F{stDtRng})) + " TO:  " + (new java.text.SimpleDateFormat("dd-MMM-yyyy").format($F{edDtRng}))]]></textFieldExpression>
                </textField>
                <staticText>
                    <reportElement x="102" y="26" width="360" height="12" uuid="3de51bbc-b338-4d64-9cb8-ced9d965cdc0"/>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <text><![CDATA[CIRCUIT COURT VOTERS REGISTRATION]]></text>
                </staticText>
                <staticText>
                    <reportElement x="474" y="14" width="48" height="12" uuid="a9bae720-7ada-43bd-a256-ef643588e652"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Time:  ]]></text>
                </staticText>
                <staticText>
                    <reportElement x="474" y="26" width="48" height="12" uuid="e162a16c-66b7-4669-92d3-ad8ef1c28297"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Page:  ]]></text>
                </staticText>
                <textField pattern="h:mm:ss a">
                    <reportElement x="522" y="14" width="54" height="12" uuid="25dbb29b-92c2-4421-8102-832c94c2dd3e"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="false"/>
                    </textElement>
                    <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="522" y="26" width="54" height="12" uuid="03fa3391-629f-4832-8cb9-92d95c97a275"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="false"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="1" y="17" width="100" height="30" uuid="62434077-d7bc-4f6d-964e-02068f773e5f"/>
                    <textFieldExpression><![CDATA[$F{lcnCd}]]></textFieldExpression>
                </textField>
                <staticText>
                    <reportElement x="0" y="2" width="102" height="12" uuid="6c5c6ea4-1e66-4390-8630-806d9037fc34"/>
                    <textElement>
                        <font fontName="oscaRptArial" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Report:  CZR0072 v 0.0.2]]></text>
                </staticText>
                <textField>
                    <reportElement x="102" y="2" width="360" height="12" uuid="7345ece8-fe9c-4722-90e0-df6f5e2e9c7f"/>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{crtNm}.toUpperCase()]]></textFieldExpression>
                </textField>
                <staticText>
                    <reportElement x="474" y="2" width="48" height="12" uuid="6d2afde5-ce54-4c3e-bb23-e4f831459c82"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="true"/>
                    </textElement>
                    <text><![CDATA[Date:  ]]></text>
                </staticText>
                <textField pattern="dd-MMM-YYYY">
                    <reportElement x="522" y="2" width="54" height="12" uuid="9c31fa3c-c67a-4b3e-b4e4-3576a4ff72ca"/>
                    <textElement textAlignment="Right" verticalAlignment="Bottom">
                        <font fontName="oscaRptArial" size="8" isBold="false"/>
                    </textElement>
                    <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="0" y="50" width="576" height="12" uuid="36343a5b-2d5f-4c00-b617-06e136edd660"/>
                    <box>
                        <bottomPen lineWidth="1.0"/>
                    </box>
                    <textElement>
                        <font fontName="oscaRptArial"/>
                    </textElement>
                    <textFieldExpression><![CDATA[""]]></textFieldExpression>
                </textField>
            </band>
            <band height="24">
                <staticText>
                    <reportElement x="1" y="0" width="120" height="24" uuid="d6ef874a-579c-469e-902a-8da5d772e998"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                    </box>
                    <textElement>
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <text><![CDATA[  NAME]]></text>
                </staticText>
                <staticText>
                    <reportElement x="121" y="0" width="100" height="24" uuid="68cb62bf-ea53-4aa5-ad31-6c817208232f"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                    </box>
                    <textElement>
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <text><![CDATA[  CASE NO]]></text>
                </staticText>
                <textField>
                    <reportElement x="221" y="0" width="140" height="24" uuid="c87ddf80-7b54-460f-a404-f4ed09e6b15f"/>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                    </box>
                    <textElement>
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA["  DOB" + CHAR(13) + "  SSN (Last 4 Digits)"]]></textFieldExpression>
                </textField>
                <staticText>
                    <reportElement x="361" y="0" width="216" height="24" uuid="2434001f-afba-47c6-8582-c21f6c27a7a1"/>
                    <box>
                        <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
                        <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
                        <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
                        <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
                    </box>
                    <textElement>
                        <font fontName="oscaRptArial" isBold="true"/>
                    </textElement>
                    <text><![CDATA[  LAST KNOWN ADDRESS]]></text>
                </staticText>
            </band>
        </groupHeader>
    </group>
    <group name="Category" isReprintHeaderOnEachPage="true">
        <groupExpression><![CDATA[$F{ctgryNm}]]></groupExpression>
        <groupHeader>
            <band height="20">
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement x="0" y="4" width="220" height="12" uuid="bce4b2fb-3ce6-4f2a-8fa2-cb9d4effa511"/>
                    <textElement>
                        <font fontName="oscaRptArial" isBold="true" isUnderline="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{ctgryNm}]]></textFieldExpression>
                </textField>
            </band>
        </groupHeader>
    </group>
    <background>
        <band splitType="Stretch"/>
    </background>
    <detail>
        <band height="208" splitType="Stretch">
            <subreport>
                <reportElement x="31" y="8" width="200" height="200" uuid="72376148-0195-4ca8-adfc-b22502ea3a08"/>
                <dataSourceExpression><![CDATA[((com.jaspersoft.webservice.data.query.IWSDataSource)$P{REPORT_DATA_SOURCE}).clone("resultObject.individuals")]]></dataSourceExpression>
                <subreportExpression><![CDATA["MUlti_lvl_lvl01.jasper"]]></subreportExpression>
            </subreport>
        </band>
    </detail>
</jasperReport>..

Here is the code for the sub report (name= MUlti_lvl_lvl01.jrxml):

..<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 6.5.1  -->
<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="MUlti_lvl_lvl01" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="828cfcf8-d0ed-4f89-a743-bbe5d23e4187">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataAdapter.xml"/>
    <queryString language="WebServiceQuery">
        <![CDATA[{
  "getparameters" : { },
  "fields" : [ {
    "name" : "ctgryCd",
    "expression" : "ctgryCd"
  }, {
    "name" : "caseLst",
    "expression" : "caseLst"
  }, {
    "name" : "lcnCd",
    "expression" : "lcnCd"
  }, {
    "name" : "crtCd",
    "expression" : "crtCd"
  }, {
    "name" : "nmLst",
    "expression" : "nmLst"
  }, {
    "name" : "dob",
    "expression" : "dob"
  }, {
    "name" : "dod",
    "expression" : "dod"
  }, {
    "name" : "ssn",
    "expression" : "ssn"
  }, {
    "name" : "cntctLst",
    "expression" : "cntctLst"
  } ],
  "options" : {
    "contentType" : "application/json",
    "rootPath" : "resultObject.individuals",
    "baseUrl" : "vtrRg_multi_lvl.json"
  },
  "headersMap" : { },
  "queryData" : "",
  "GETParameters" : { }
}]]>
    </queryString>
    <field name="ctgryCd" class="java.lang.String"/>
    <field name="caseLst" class="java.lang.String"/>
    <field name="lcnCd" class="java.lang.String"/>
    <field name="crtCd" class="java.lang.Integer"/>
    <field name="nmLst" class="java.lang.String"/>
    <field name="dob" class="java.sql.Timestamp"/>
    <field name="dod" class="java.sql.Timestamp"/>
    <field name="ssn" class="java.lang.String"/>
    <field name="cntctLst" class="java.lang.String"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <columnHeader>
        <band height="60" splitType="Stretch">
            <staticText>
                <reportElement x="430" y="0" width="130" height="30" uuid="4149ecd0-22ab-4d71-8617-10e5d51b873c">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d5938009-06f4-49e8-a73a-06237c0717b9"/>
                </reportElement>
                <text><![CDATA[cntctLst]]></text>
            </staticText>
            <staticText>
                <reportElement x="0" y="0" width="180" height="30" uuid="bd622a21-ac26-44b1-af73-e243f36286e6">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="3c417caf-899b-4fc3-b7c6-9b4979217a36"/>
                </reportElement>
                <text><![CDATA[nmLst]]></text>
            </staticText>
            <staticText>
                <reportElement x="180" y="0" width="100" height="30" uuid="cd5f9190-7b23-432e-8d3c-8b68df264d6a">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="482c2428-3c1a-45ec-8c48-45f6288a1941"/>
                </reportElement>
                <text><![CDATA[dob]]></text>
            </staticText>
            <staticText>
                <reportElement x="280" y="0" width="100" height="30" uuid="d1cfebc6-2002-4e76-9266-f3f95d63b508">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="4bcea8ad-3a97-4e8f-80c4-a5c627d26182"/>
                </reportElement>
                <text><![CDATA[dod]]></text>
            </staticText>
            <staticText>
                <reportElement x="380" y="0" width="50" height="30" uuid="5c6cfc5f-733a-4df6-877d-2d84f8279309">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="37bb4d74-8821-406c-aa5c-b69d22ec308d"/>
                </reportElement>
                <text><![CDATA[ssn]]></text>
            </staticText>
            <staticText>
                <reportElement x="80" y="30" width="200" height="30" uuid="02563e5d-5194-4675-82a7-917c6a3d6368">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d1ca5bcd-7ceb-4f70-a901-76fb9302e91d"/>
                </reportElement>
                <text><![CDATA[caseLst]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="79" splitType="Stretch">
            <textField isStretchWithOverflow="true">
                <reportElement mode="Opaque" x="430" y="10" width="130" height="30" isPrintWhenDetailOverflows="true" uuid="f75385d6-6edd-4a8c-99a6-39314ef95395">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d5938009-06f4-49e8-a73a-06237c0717b9"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{cntctLst}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement x="0" y="10" width="180" height="30" isPrintWhenDetailOverflows="true" uuid="f7321d8e-5f89-434c-8416-51a8603af037">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="3c417caf-899b-4fc3-b7c6-9b4979217a36"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nmLst}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="180" y="10" width="100" height="30" uuid="1612ea9c-1925-44c9-bde8-b0f2bf4563f7">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="482c2428-3c1a-45ec-8c48-45f6288a1941"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{dob}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="280" y="10" width="100" height="30" uuid="b937671f-ac64-434b-a2aa-d73bfe406406">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="4bcea8ad-3a97-4e8f-80c4-a5c627d26182"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{dod}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="380" y="10" width="50" height="30" uuid="8e5f1055-2ef0-4c65-8e30-a3d324f30866">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="37bb4d74-8821-406c-aa5c-b69d22ec308d"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{ssn}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true">
                <reportElement positionType="Float" x="80" y="40" width="200" height="30" isPrintWhenDetailOverflows="true" uuid="4d9509d3-d823-447e-9957-8eac49ae9596">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d1ca5bcd-7ceb-4f70-a901-76fb9302e91d"/>
                </reportElement>
                <textElement verticalAlignment="Top"/>
                <textFieldExpression><![CDATA[$F{caseLst}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
</jasperReport>
 
..

I have noticed that there are times that when doing many edits to a file the report will fail to populate correctly and have had to start from scratch (I don't know if simply recompiling the sub report would fix the issue or what). If by chance someone makes eveything work simply by copy and pasting the code as presented above, let me know.

Joe.Holzschuh's picture
Joined: Nov 27 2017 - 11:21am
Last seen: 4 years 7 months ago

0 Answers:

No answers yet
Feedback
randomness