Initial empty data bug
Posted: Thu Jul 13, 2017 8:07 am
I use a JSON API data source with some parameters set by the user.
If the initial JSON request returns an empty array, the report is not able to populate the table after the user has changed the variables and done a submit that returns actual data.
Example that fails:
1. User loads the report, with a date set by default to today, the json returns an empty array.
2. no data to render (and get some warnings from the designer).
2. User changes the date to yesterday and does the submit, the json returns data.
3. the data is not rendered.
Example that works:
1. User loads the report, with a date set by default to yesterday, the json returns a populated array.
2. the data is rendered.
3. User changes the date to yesterday and does the submit, the json return an empty array.
4. no data to render.
So bottom line is that report only works if the initial render has data, if the initial data is empty, future data won't be rendered.
If the initial JSON request returns an empty array, the report is not able to populate the table after the user has changed the variables and done a submit that returns actual data.
Example that fails:
1. User loads the report, with a date set by default to today, the json returns an empty array.
2. no data to render (and get some warnings from the designer).
2. User changes the date to yesterday and does the submit, the json returns data.
3. the data is not rendered.
Example that works:
1. User loads the report, with a date set by default to yesterday, the json returns a populated array.
2. the data is rendered.
3. User changes the date to yesterday and does the submit, the json return an empty array.
4. no data to render.
So bottom line is that report only works if the initial render has data, if the initial data is empty, future data won't be rendered.