MultiDimensional Dataset - ActiveReportsJS Designer

Posted by: hfeldman on 11 February 2020, 12:27 pm EST

    • Post Options:
    • Link

    Posted 11 February 2020, 12:27 pm EST - Updated 30 September 2022, 6:39 am EST

    Hi,

    I am having some trouble adding an object that contains an array to a dataset, then using that dataset in a table.

    My JSON data looks like this:

    
    {
      "Plants": [
    
        {
          "PlantCode": "abc123",
          "Responses": [
            {
              "CL_Code": "aaaaa",
              "CL_Description": "Test Checklist",
              "ResponseId": 123,
              "ResponseDate": "01/01/2020",
              "Response": "no",
              "StartTime": "5:15",
              "WorkOrderNo": 456,
              "Category": "Day Shift"
            }
          ]
        },
        {
          "PlantCode": "def456",
          "Responses": [
            {
              "CL_Code": "bbbbb",
              "CL_Description": "Test Checklist",
              "ResponseId": 123,
              "ResponseDate": "01/01/2020",
              "Response": "no",
              "StartTime": "5:15",
              "WorkOrderNo": 456,
              "Category": "Day Shift"
            }
          ]
        }
      ]
    }
    
    

    As you can see I have multiple plants, each with multiple responses. I am aiming to have a table that shows each plant code, then a table of that plants responses.

    However, I’m unable to add the responses field in the dataset as an array of fields, and adding just the response fields (category, responseId, e.t.c) removes my ability to use the parent plantCode.

  • Posted 11 February 2020, 8:21 pm EST

    Hello,

    You need to use the subreport for this. Pass the “PlantCode” value from the main report to the subreport. Please refer to the attached reports for more information.

    Thanks,

    Mohit

    MainREport.zip

  • Posted 11 February 2020, 8:21 pm EST

    Hello,

    You need to use the subreport for this. Pass the “PlantCode” value from the main report to the subreport. Please refer to the attached reports for more information.

    Thanks,

    Mohit

    MainREport.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels