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

Table from JSON Data source


lrente

Recommended Posts

In my projet i want to have a simple table, where each row corresponds to an entry on my json.

Instead, i have a new table for each entry.

Here is my json:

{
    "title": "Viagens (2 viaturas)",
    "filters": {
      "viaturas": "LP1, LP2",
      "inicio": "2020-12-17T00:00:00",
      "fim": "2020-12-17T23:59:59"
    },
    "tables": [
      {
        "name": "Viagens (2 viaturas)",
        "rows": [
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD1",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T16:28:41",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T16:29:40",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 590000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 59,
                "totalDays": 0.0006828703703703704,
                "totalHours": 0.01638888888888889,
                "totalMilliseconds": 59000,
                "totalMinutes": 0.9833333333333333,
                "totalSeconds": 59
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 590000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 59,
                "totalDays": 0.0006828703703703704,
                "totalHours": 0.01638888888888889,
                "totalMilliseconds": 59000,
                "totalMinutes": 0.9833333333333333,
                "totalSeconds": 59
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 30000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 3,
                "totalDays": 0.00003472222222222222,
                "totalHours": 0.0008333333333333334,
                "totalMilliseconds": 3000,
                "totalMinutes": 0.05,
                "totalSeconds": 3
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD1",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T16:29:43",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T16:29:49",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 60000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 6,
                "totalDays": 0.00006944444444444444,
                "totalHours": 0.0016666666666666668,
                "totalMilliseconds": 6000,
                "totalMinutes": 0.1,
                "totalSeconds": 6
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 60000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 6,
                "totalDays": 0.00006944444444444444,
                "totalHours": 0.0016666666666666668,
                "totalMilliseconds": 6000,
                "totalMinutes": 0.1,
                "totalSeconds": 6
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 130000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 13,
                "totalDays": 0.00015046296296296297,
                "totalHours": 0.003611111111111111,
                "totalMilliseconds": 13000,
                "totalMinutes": 0.21666666666666667,
                "totalSeconds": 13
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD1",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T16:30:02",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T16:30:07",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 50000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 5,
                "totalDays": 0.00005787037037037037,
                "totalHours": 0.001388888888888889,
                "totalMilliseconds": 5000,
                "totalMinutes": 0.08333333333333333,
                "totalSeconds": 5
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 50000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 5,
                "totalDays": 0.00005787037037037037,
                "totalHours": 0.001388888888888889,
                "totalMilliseconds": 5000,
                "totalMinutes": 0.08333333333333333,
                "totalSeconds": 5
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 7020000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 11,
                "seconds": 42,
                "totalDays": 0.008125,
                "totalHours": 0.195,
                "totalMilliseconds": 702000,
                "totalMinutes": 11.7,
                "totalSeconds": 702
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD1",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T16:41:49",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T17:47:24",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 39350000000,
                "days": 0,
                "hours": 1,
                "milliseconds": 0,
                "minutes": 5,
                "seconds": 35,
                "totalDays": 0.045543981481481484,
                "totalHours": 1.0930555555555554,
                "totalMilliseconds": 3935000,
                "totalMinutes": 65.58333333333333,
                "totalSeconds": 3935
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 34010000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 56,
                "seconds": 41,
                "totalDays": 0.03936342592592593,
                "totalHours": 0.9447222222222222,
                "totalMilliseconds": 3401000,
                "totalMinutes": 56.68333333333333,
                "totalSeconds": 3401
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 9450000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 15,
                "seconds": 45,
                "totalDays": 0.0109375,
                "totalHours": 0.2625,
                "totalMilliseconds": 945000,
                "totalMinutes": 15.75,
                "totalSeconds": 945
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 1.5,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "Sem condutor",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T18:03:09",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T18:03:52",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 430000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 43,
                "totalDays": 0.0004976851851851852,
                "totalHours": 0.011944444444444445,
                "totalMilliseconds": 43000,
                "totalMinutes": 0.7166666666666667,
                "totalSeconds": 43
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 430000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 43,
                "totalDays": 0.0004976851851851852,
                "totalHours": 0.011944444444444445,
                "totalMilliseconds": 43000,
                "totalMinutes": 0.7166666666666667,
                "totalSeconds": 43
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 360000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 36,
                "totalDays": 0.0004166666666666667,
                "totalHours": 0.01,
                "totalMilliseconds": 36000,
                "totalMinutes": 0.6,
                "totalSeconds": 36
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "Sem condutor",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T18:04:28",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T18:04:30",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 20000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 2,
                "totalDays": 0.000023148148148148147,
                "totalHours": 0.0005555555555555556,
                "totalMilliseconds": 2000,
                "totalMinutes": 0.03333333333333333,
                "totalSeconds": 2
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 20000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 2,
                "totalDays": 0.000023148148148148147,
                "totalHours": 0.0005555555555555556,
                "totalMilliseconds": 2000,
                "totalMinutes": 0.03333333333333333,
                "totalSeconds": 2
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 610000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 1,
                "seconds": 1,
                "totalDays": 0.0007060185185185185,
                "totalHours": 0.016944444444444446,
                "totalMilliseconds": 61000,
                "totalMinutes": 1.0166666666666666,
                "totalSeconds": 61
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "Sem condutor",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T18:05:31",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T18:05:42",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 110000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 11,
                "totalDays": 0.0001273148148148148,
                "totalHours": 0.0030555555555555557,
                "totalMilliseconds": 11000,
                "totalMinutes": 0.18333333333333332,
                "totalSeconds": 11
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 110000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 11,
                "totalDays": 0.0001273148148148148,
                "totalHours": 0.0030555555555555557,
                "totalMilliseconds": 11000,
                "totalMinutes": 0.18333333333333332,
                "totalSeconds": 11
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 370000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 37,
                "totalDays": 0.00042824074074074075,
                "totalHours": 0.010277777777777778,
                "totalMilliseconds": 37000,
                "totalMinutes": 0.6166666666666667,
                "totalSeconds": 37
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP1",
            "vehicle": {
              "value": "LP1",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "Sem condutor",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T18:06:19",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T18:06:23",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 40000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 4,
                "totalDays": 0.000046296296296296294,
                "totalHours": 0.0011111111111111111,
                "totalMilliseconds": 4000,
                "totalMinutes": 0.06666666666666667,
                "totalSeconds": 4
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 40000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 4,
                "totalDays": 0.000046296296296296294,
                "totalHours": 0.0011111111111111111,
                "totalMilliseconds": 4000,
                "totalMinutes": 0.06666666666666667,
                "totalSeconds": 4
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 807030000000,
                "days": 0,
                "hours": 22,
                "milliseconds": 0,
                "minutes": 25,
                "seconds": 3,
                "totalDays": 0.9340625,
                "totalHours": 22.4175,
                "totalMilliseconds": 80703000,
                "totalMinutes": 1345.05,
                "totalSeconds": 80703
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP2",
            "vehicle": {
              "value": "LP2",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "Sem condutor",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T09:00:18",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T09:00:47",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 290000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 29,
                "totalDays": 0.0003356481481481481,
                "totalHours": 0.008055555555555555,
                "totalMilliseconds": 29000,
                "totalMinutes": 0.48333333333333334,
                "totalSeconds": 29
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 290000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 0,
                "seconds": 29,
                "totalDays": 0.0003356481481481481,
                "totalHours": 0.008055555555555555,
                "totalMilliseconds": 29000,
                "totalMinutes": 0.48333333333333334,
                "totalSeconds": 29
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 22490000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 37,
                "seconds": 29,
                "totalDays": 0.026030092592592594,
                "totalHours": 0.6247222222222222,
                "totalMilliseconds": 2249000,
                "totalMinutes": 37.483333333333334,
                "totalSeconds": 2249
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 0,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP2",
            "vehicle": {
              "value": "LP2",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD2",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T09:38:16",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T09:55:54",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 10580000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 17,
                "seconds": 38,
                "totalDays": 0.01224537037037037,
                "totalHours": 0.29388888888888887,
                "totalMilliseconds": 1058000,
                "totalMinutes": 17.633333333333333,
                "totalSeconds": 1058
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 1100000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 1,
                "seconds": 50,
                "totalDays": 0.0012731481481481483,
                "totalHours": 0.030555555555555555,
                "totalMilliseconds": 110000,
                "totalMinutes": 1.8333333333333333,
                "totalSeconds": 110
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 325740000000,
                "days": 0,
                "hours": 9,
                "milliseconds": 0,
                "minutes": 2,
                "seconds": 54,
                "totalDays": 0.37701388888888887,
                "totalHours": 9.048333333333334,
                "totalMilliseconds": 32574000,
                "totalMinutes": 542.9,
                "totalSeconds": 32574
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 12,
              "title": "Distância",
              "visible": true
            }
          },
          {
            "filter": "LP2",
            "vehicle": {
              "value": "LP2",
              "title": "Viatura",
              "visible": true
            },
            "driver": {
              "value": "CD1",
              "title": "Condutor",
              "visible": true
            },
            "startTime": {
              "value": "2020-12-17T18:58:48",
              "title": "Data Inicial",
              "visible": true
            },
            "endTime": {
              "value": "2020-12-17T19:43:16",
              "title": "Data Final",
              "visible": true
            },
            "tripDuration": {
              "value": {
                "ticks": 26680000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 44,
                "seconds": 28,
                "totalDays": 0.03087962962962963,
                "totalHours": 0.7411111111111112,
                "totalMilliseconds": 2668000,
                "totalMinutes": 44.46666666666667,
                "totalSeconds": 2668
              },
              "title": "Duração",
              "visible": true
            },
            "idleDuration": {
              "value": {
                "ticks": 1630000000,
                "days": 0,
                "hours": 0,
                "milliseconds": 0,
                "minutes": 2,
                "seconds": 43,
                "totalDays": 0.0018865740740740742,
                "totalHours": 0.04527777777777778,
                "totalMilliseconds": 163000,
                "totalMinutes": 2.716666666666667,
                "totalSeconds": 163
              },
              "title": "Ralenti",
              "visible": true
            },
            "stopDuration": {
              "value": {
                "ticks": 452160000000,
                "days": 0,
                "hours": 12,
                "milliseconds": 0,
                "minutes": 33,
                "seconds": 36,
                "totalDays": 0.5233333333333333,
                "totalHours": 12.56,
                "totalMilliseconds": 45216000,
                "totalMinutes": 753.6,
                "totalSeconds": 45216
              },
              "title": "Paragem",
              "visible": true
            },
            "startStreet": {
              "value": "street",
              "title": "Local Inicio",
              "visible": true
            },
            "endStreet": {
              "value": "street",
              "title": "Local Fim",
              "visible": true
            },
            "distance": {
              "value": 47.8,
              "title": "Distância",
              "visible": true
            }
          }
        ]
      }
    ]
  }

And here is my jrxml:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.0.final using JasperReports Library version 6.12.1-ac0eebdb29e4c0985457bab279a6db744d661530  -->
<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="ViagensTabelaResumo" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ed5814c0-ba5f-49bc-a588-376aa9e35edc">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="report"/>
    <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="Dataset1" uuid="19f98d05-f185-4928-aa82-232acfbc5036">
        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="report"/>
        <queryString language="json">
            <![CDATA[tables.rows]]>
        </queryString>
        <field name="filter" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="filter"/>
            <fieldDescription><![CDATA[filter]]></fieldDescription>
        </field>
        <field name="tripDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[tripDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="idleDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[idleDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="stopDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[stopDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="distance" class="java.lang.Double">
            <property name="net.sf.jasperreports.json.field.expression" value="distance.value"/>
            <fieldDescription><![CDATA[distance.value]]></fieldDescription>
        </field>
        <field name="vehicle" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="vehicle.value"/>
            <fieldDescription><![CDATA[vehicle.value]]></fieldDescription>
        </field>
        <field name="vehicleColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="vehicle.title"/>
            <fieldDescription><![CDATA[vehicle.title]]></fieldDescription>
        </field>
        <field name="startTimeColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startTime.title"/>
            <fieldDescription><![CDATA[startTime.title]]></fieldDescription>
        </field>
        <field name="endTimeColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endTime.title"/>
            <fieldDescription><![CDATA[endTime.title]]></fieldDescription>
        </field>
        <field name="tripDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.title"/>
            <fieldDescription><![CDATA[tripDuration.title]]></fieldDescription>
        </field>
        <field name="idleDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.title"/>
            <fieldDescription><![CDATA[idleDuration.title]]></fieldDescription>
        </field>
        <field name="stopDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.title"/>
            <fieldDescription><![CDATA[stopDuration.title]]></fieldDescription>
        </field>
        <field name="startStreetColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startStreet.title"/>
            <fieldDescription><![CDATA[startStreet.title]]></fieldDescription>
        </field>
        <field name="endStreetColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endStreet.title"/>
            <fieldDescription><![CDATA[endStreet.title]]></fieldDescription>
        </field>
        <field name="distanceColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="distance.title"/>
            <fieldDescription><![CDATA[distance.title]]></fieldDescription>
        </field>
        <field name="visible" class="java.lang.Boolean">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.visible"/>
            <fieldDescription><![CDATA[stopDuration.visible]]></fieldDescription>
        </field>
    </subDataset>
    <subDataset name="Dataset2" uuid="b7576a46-263e-4be3-94b7-b117c99692ee">
        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="report"/>
        <queryString language="json">
            <![CDATA[tables.rows]]>
        </queryString>
        <field name="filter" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="filter"/>
            <fieldDescription><![CDATA[filter]]></fieldDescription>
        </field>
        <field name="vehicle" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="vehicle"/>
            <fieldDescription><![CDATA[vehicle]]></fieldDescription>
        </field>
        <field name="driver" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="driver"/>
            <fieldDescription><![CDATA[driver]]></fieldDescription>
        </field>
        <field name="startTime" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startTime"/>
            <fieldDescription><![CDATA[startTime]]></fieldDescription>
        </field>
        <field name="endTime" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endTime"/>
            <fieldDescription><![CDATA[endTime]]></fieldDescription>
        </field>
        <field name="tripDuration" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="tripDuration"/>
            <fieldDescription><![CDATA[tripDuration]]></fieldDescription>
        </field>
        <field name="idleDuration" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="idleDuration"/>
            <fieldDescription><![CDATA[idleDuration]]></fieldDescription>
        </field>
        <field name="stopDuration" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration"/>
            <fieldDescription><![CDATA[stopDuration]]></fieldDescription>
        </field>
        <field name="startStreet" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startStreet"/>
            <fieldDescription><![CDATA[startStreet]]></fieldDescription>
        </field>
        <field name="endStreet" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endStreet"/>
            <fieldDescription><![CDATA[endStreet]]></fieldDescription>
        </field>
        <field name="distance" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="distance"/>
            <fieldDescription><![CDATA[distance]]></fieldDescription>
        </field>
    </subDataset>
    <subDataset name="tableds" uuid="42efdbfd-06aa-4544-b72e-580298cdea46">
        <property name="com.jaspersoft.studio.data.defaultdataadapter" value="report"/>
        <queryString language="json">
            <![CDATA[tables.rows]]>
        </queryString>
        <field name="filter" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="filter"/>
            <fieldDescription><![CDATA[filter]]></fieldDescription>
        </field>
        <field name="tripDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[tripDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="idleDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[idleDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="stopDuration" class="java.lang.Long">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.value.totalMilliseconds"/>
            <fieldDescription><![CDATA[stopDuration.value.totalMilliseconds]]></fieldDescription>
        </field>
        <field name="distance" class="java.lang.Double">
            <property name="net.sf.jasperreports.json.field.expression" value="distance.value"/>
            <fieldDescription><![CDATA[distance.value]]></fieldDescription>
        </field>
        <field name="vehicle" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="vehicle.value"/>
            <fieldDescription><![CDATA[vehicle.value]]></fieldDescription>
        </field>
        <field name="vehicleColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="vehicle.title"/>
            <fieldDescription><![CDATA[vehicle.title]]></fieldDescription>
        </field>
        <field name="startTimeColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startTime.title"/>
            <fieldDescription><![CDATA[startTime.title]]></fieldDescription>
        </field>
        <field name="endTimeColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endTime.title"/>
            <fieldDescription><![CDATA[endTime.title]]></fieldDescription>
        </field>
        <field name="tripDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.title"/>
            <fieldDescription><![CDATA[tripDuration.title]]></fieldDescription>
        </field>
        <field name="idleDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.title"/>
            <fieldDescription><![CDATA[idleDuration.title]]></fieldDescription>
        </field>
        <field name="stopDurationColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.title"/>
            <fieldDescription><![CDATA[stopDuration.title]]></fieldDescription>
        </field>
        <field name="startStreetColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="startStreet.title"/>
            <fieldDescription><![CDATA[startStreet.title]]></fieldDescription>
        </field>
        <field name="endStreetColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="endStreet.title"/>
            <fieldDescription><![CDATA[endStreet.title]]></fieldDescription>
        </field>
        <field name="distanceColumnName" class="java.lang.String">
            <property name="net.sf.jasperreports.json.field.expression" value="distance.title"/>
            <fieldDescription><![CDATA[distance.title]]></fieldDescription>
        </field>
    </subDataset>
    <queryString language="JSON">
        <![CDATA[tables.rows]]>
    </queryString>
    <field name="filter" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="filter"/>
        <fieldDescription><![CDATA[filter]]></fieldDescription>
    </field>
    <field name="tripDuration" class="java.lang.Long">
        <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.value.totalMilliseconds"/>
        <fieldDescription><![CDATA[tripDuration.value.totalMilliseconds]]></fieldDescription>
    </field>
    <field name="idleDuration" class="java.lang.Long">
        <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.value.totalMilliseconds"/>
        <fieldDescription><![CDATA[idleDuration.value.totalMilliseconds]]></fieldDescription>
    </field>
    <field name="stopDuration" class="java.lang.Long">
        <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.value.totalMilliseconds"/>
        <fieldDescription><![CDATA[stopDuration.value.totalMilliseconds]]></fieldDescription>
    </field>
    <field name="distance" class="java.lang.Double">
        <property name="net.sf.jasperreports.json.field.expression" value="distance.value"/>
        <fieldDescription><![CDATA[distance.value]]></fieldDescription>
    </field>
    <field name="vehicle" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="vehicle.value"/>
        <fieldDescription><![CDATA[vehicle.value]]></fieldDescription>
    </field>
    <field name="vehicleColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="vehicle.title"/>
        <fieldDescription><![CDATA[vehicle.title]]></fieldDescription>
    </field>
    <field name="startTimeColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="startTime.title"/>
        <fieldDescription><![CDATA[startTime.title]]></fieldDescription>
    </field>
    <field name="endTimeColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="endTime.title"/>
        <fieldDescription><![CDATA[endTime.title]]></fieldDescription>
    </field>
    <field name="tripDurationColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="tripDuration.title"/>
        <fieldDescription><![CDATA[tripDuration.title]]></fieldDescription>
    </field>
    <field name="idleDurationColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="idleDuration.title"/>
        <fieldDescription><![CDATA[idleDuration.title]]></fieldDescription>
    </field>
    <field name="stopDurationColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="stopDuration.title"/>
        <fieldDescription><![CDATA[stopDuration.title]]></fieldDescription>
    </field>
    <field name="startStreetColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="startStreet.title"/>
        <fieldDescription><![CDATA[startStreet.title]]></fieldDescription>
    </field>
    <field name="endStreetColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="endStreet.title"/>
        <fieldDescription><![CDATA[endStreet.title]]></fieldDescription>
    </field>
    <field name="distanceColumnName" class="java.lang.String">
        <property name="net.sf.jasperreports.json.field.expression" value="distance.title"/>
        <fieldDescription><![CDATA[distance.title]]></fieldDescription>
    </field>
    <field name="endStreetVisible" class="java.lang.Boolean">
        <property name="net.sf.jasperreports.json.field.expression" value="endStreet.visible"/>
        <fieldDescription><![CDATA[endStreet.visible]]></fieldDescription>
    </field>
    <background>
        <band splitType="Stretch"/>
    </background>
    <detail>
        <band height="208">
            <componentElement>
                <reportElement x="0" y="4" width="682" height="200" uuid="41caa914-1af3-4948-bbbe-2fffbc24e43e">
                    <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"/>
                    <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="tableds" uuid="1df01843-a392-415d-bda9-76f5bc9be84b">
                        <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource()]]></dataSourceExpression>
                    </datasetRun>
                    <jr:column width="116" uuid="b6243d9c-b43b-4af9-baae-fae21bec154a">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="116" height="30" uuid="f3378b86-9932-455b-a325-5c0b708ad3fc"/>
                                <text><![CDATA[filter]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="116" height="30" uuid="cf217758-a68c-44a9-bd76-f0dc227a6fb7"/>
                                <textFieldExpression><![CDATA[$F{filter}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="116" uuid="56d1b451-d71c-4250-ba38-7c429aef1379">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="116" height="30" uuid="03bb9401-22b5-4700-b337-5a857a7330e0"/>
                                <text><![CDATA[tripDuration]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="116" height="30" uuid="2bc8551a-069e-4810-8d76-842ec46f4224"/>
                                <textFieldExpression><![CDATA[$F{tripDuration}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="113" uuid="30a6233d-a153-4cd7-9fdd-8edaad7f7658">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="113" height="30" uuid="9b47b3b9-06ac-46bb-b98a-100ebd847ea5"/>
                                <text><![CDATA[idleDuration]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="113" height="30" uuid="eba5d157-3b23-4ca2-9d8a-42963fffff0b"/>
                                <textFieldExpression><![CDATA[$F{idleDuration}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="113" uuid="9af18ecb-17a7-4342-a89a-df1c505ea422">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="113" height="30" uuid="c0cad86c-8339-42fe-b224-47c61b26ebee"/>
                                <text><![CDATA[stopDuration]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="113" height="30" uuid="ec74cc91-00f7-4985-beb4-c03ac55c422a"/>
                                <textFieldExpression><![CDATA[$F{stopDuration}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="112" uuid="b834484b-1353-4334-b350-2b0b298e2407">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="112" height="30" uuid="5355dab9-13bc-48aa-9e34-fb8d1ed65fc1"/>
                                <text><![CDATA[distance]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="112" height="30" uuid="6a6d0b34-3a03-4348-82b9-88492c7bc5c5"/>
                                <textFieldExpression><![CDATA[$F{distance}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="112" uuid="01dff5bb-d29b-4bc9-8d8e-e8a3b77f538b">
                        <jr:tableHeader style="Table 1_TH" height="30"/>
                        <jr:columnHeader style="Table 1_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="112" height="30" uuid="a5417a76-d17e-443a-9bc9-1651823566e0"/>
                                <text><![CDATA[vehicle]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table 1_TD" height="30">
                            <textField>
                                <reportElement x="0" y="0" width="112" height="30" uuid="c85c1bd7-679d-4bb2-a910-1488f315e115"/>
                                <textFieldExpression><![CDATA[$F{vehicle}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </detail>
</jasperReport>
 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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