Use json convert data source problem
Posted: Wed Jul 20, 2016 4:40 am
I use the designer to use the API JSON data web as the data source. almost all reports show data from json data ...
for example:
In the designer, I open the [New Data Source] - [JSON], import the data.
display import result is:
open [View Data...]
In the designer, I want to display "2016-7-1", set data and filter Name == title....
It's very bad... I sugguest like this:
the data format is JSON or other.
if it is an object: one row and a lot of column in DataTable.
if it is an collection: remain unchanged.
it will become:
display import result is:
open [View Data...]
If so, I use the Report Designer will become very simple, including people who do not understand the program.
for example:
Code: Select all
{
"code": 200,
"message": "success",
"data": {
"title": "this is my report title",
"create_time": "2016-7-1",
"descrption": "something",
"orders": [
{
"order_type": "hall",
"count": 150,
"amount": 180000,
"order_details": [
{
"time": "2016-6-30 18:00",
"amount": 1300
}
]
},
{
"order_type": "takeaway",
"count": 13,
"amount": 15600,
"order_details": [
{
"time": "2016-6-30 18:00",
"amount": 1300
}
]
}
]
}
}
display import result is:
Code: Select all
- data
---- Name
---- Value
Code: Select all
Name Value
title this is my report title
create_time 2016-7-1
descrption something
It's very bad... I sugguest like this:
the data format is JSON or other.
if it is an object: one row and a lot of column in DataTable.
if it is an collection: remain unchanged.
it will become:
display import result is:
Code: Select all
- data
---- title
---- create_time
---- descrption
Code: Select all
title create_time descrption other property
this is my report title 2016-7-1 something ........