Pivot table like this

Answered

I have a sample data given below and want to show simple report like attachment. please help:

[
{
"gender": 1,
"aIdNew": "C2018R000001",
"aIdOld": "1",
"birthDate": "2018-05-08T00:00:00",
"generation": 1,
"damParity": null,
"birthSession": "Summer",
"year": 2018,
"categoryName": "Cattle",
"genotypeName": "RCC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 63,
"animalId": "6e570d3c-12b4-47d3-bc75-08d74e542370",
"weightUnitId": 3,
"weightUnitName": "6 Month",
"categoryId": 0,
"id": "d6bd4a5c-6f3b-4391-802b-5e673d3fe3c8",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2018R000001",
"aIdOld": "1",
"birthDate": "2018-05-08T00:00:00",
"generation": 1,
"damParity": null,
"birthSession": "Summer",
"year": 2018,
"categoryName": "Cattle",
"genotypeName": "RCC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 14,
"animalId": "6e570d3c-12b4-47d3-bc75-08d74e542370",
"weightUnitId": 1,
"weightUnitName": "Birth",
"categoryId": 0,
"id": "e74338d3-05e3-478d-aa9f-f7c76016e104",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2018R000001",
"aIdOld": "1",
"birthDate": "2018-05-08T00:00:00",
"generation": 1,
"damParity": null,
"birthSession": "Summer",
"year": 2018,
"categoryName": "Cattle",
"genotypeName": "RCC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 48,
"animalId": "6e570d3c-12b4-47d3-bc75-08d74e542370",
"weightUnitId": 2,
"weightUnitName": "3 month",
"categoryId": 0,
"id": "221c3ee1-01f5-4808-878b-f842dacdf621",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 75,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 5,
"weightUnitName": "9 Month",
"categoryId": 0,
"id": "dc42dfeb-6876-41e8-9fd1-175a11eb93ad",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 50,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 2,
"weightUnitName": "3 month",
"categoryId": 0,
"id": "cd89f42d-4d6d-4db8-8061-1e2c8a943892",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 150,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 8,
"weightUnitName": "24 Month",
"categoryId": 0,
"id": "f09ff4d1-b06e-4cdf-a22a-221c62448346",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 85,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 6,
"weightUnitName": "Yearly",
"categoryId": 0,
"id": "32c15a8a-7232-4738-b4b8-5b1e4b2e88d5",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 110,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 7,
"weightUnitName": "18 Month",
"categoryId": 0,
"id": "c71860e7-3758-49c3-a7f7-7a458801ef67",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 220,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 11,
"weightUnitName": "36 Month",
"categoryId": 0,
"id": "4b7ce300-b457-452f-b759-87cfb3ce8915",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 60,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 3,
"weightUnitName": "6 Month",
"categoryId": 0,
"id": "94876286-4451-4846-9526-a78600913d1a",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 70,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 4,
"weightUnitName": "Wean",
"categoryId": 0,
"id": "9dc1596b-15f5-4dbc-b01c-c559453923a7",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 190,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 10,
"weightUnitName": "30 Month",
"categoryId": 0,
"id": "3c98319a-9ff9-4795-a9f0-db74af233f49",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 185,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 9,
"weightUnitName": "Puberty",
"categoryId": 0,
"id": "ef13374c-3e61-4f04-a813-e433956538da",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2017M000001",
"aIdOld": "2",
"birthDate": "2017-06-07T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Summer",
"year": 2017,
"categoryName": "Cattle",
"genotypeName": "MC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 15,
"animalId": "4f35741d-cdf2-42c4-bc76-08d74e542370",
"weightUnitId": 1,
"weightUnitName": "Birth",
"categoryId": 0,
"id": "2cc0912d-63f6-472e-9706-e8c8658e7744",
"updatedByUserId": null
},
{
"gender": 1,
"aIdNew": "C2018R000002",
"aIdOld": "3",
"birthDate": "2018-01-30T00:00:00",
"generation": null,
"damParity": null,
"birthSession": "Winter",
"year": 2018,
"categoryName": "Cattle",
"genotypeName": "RCC",
"genderName": "Male",
"damAIdNew": null,
"sireAIdNew": null,
"weightValue": 16,
"animalId": "b4fe904b-e2dd-4a63-bc77-08d74e542370",
"weightUnitId": 1,
"weightUnitName": "Birth",
"categoryId": 0,
"id": "dc1d2112-5bfb-43cc-8f80-0d32d132add1",
"updatedByUserId": null
}
]

Attachments:
Weight_Report.xlsx

2 answers

WebDataRocks Team WebDataRocks October 29, 2019

Hello Shadid,
Thank you for writing to us.
To achieve the desired view, you need to do the following things:

  • use classic form representation;
  • disable totals and grand totals;

The JSON report example attached.
Regards,
WebDataTocks Team
 

Shahid November 1, 2019

thank you. it is good for us if have proper documentation for typescript

Please login or Register to Submit Answer