Question

Stimulsoft Reports.JS discussion
Post Reply
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Question

Post by guilhermetti »

Hello,
I have a question in Stimulsoft Reports.JS Designer, I have a data file in JSON format.
In the data there is an array, I want to put all the information in this array inside just one column.
It's possible?
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Question

Post by Lech Kulikowski »

Hello,

Please send us your JSON file for analysis.

Thank you.
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Re: Question

Post by guilhermetti »

{
"header": {
"title": "Relatório de Área",
"subtitle": "Filtrado pelo Nome (MARIA OLIVEIRA), pelo Documento (RG 12345678) e ordenado por Nome",
"periodo": "Periodo: 11/04/2021 08:00 - 11/04/2021 23:59",
"organizacao": "NEXCODE SYSTEMS",
"contador": "Total de registros: 1000",
"logoAplicacao": "",
"logoOrganizacao": ""
},
"data": {
"reparticaoArea": {
"nodes": [
{
"id": 1191,
"name": "AREA ALPHA",
"type": 1,
"sectorId": 108,
"sector": {
"id": 108,
"name": "ALPHA DELTA"
},
"blockages": [
{
"areaId": 1191,
"name": "BLOQUEIO ALPHA"
},
{
"areaId": 1191,
"name": "BLOQUEIO BRAVO"
},
{
"areaId": 1191,
"name": "BLOQUEIO CHARLIE"
},
{
"areaId": 1191,
"name": "BLOQUEIO DELTA"
}
]
}
]
}
}
}
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Question

Post by Lech Kulikowski »

Hello,

You can add your JSON as data source and then create report as you need.

Thank you.
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Re: Question

Post by guilhermetti »

If I knew how to create, I wouldn't be asking for support, right? haha.
My json is already added to the Data Source, I just need to know expression or some column type that supports JSON arrays and list.

Thank you.
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Question

Post by Lech Kulikowski »

Hello,

To show an array of records, you should use the DataBand component. To display nested objects, you can use the master-detail construction:
https://www.stimulsoft.com/en/documenta ... report.htm

Thank you.
guilhermetti
Posts: 14
Joined: Tue Oct 11, 2022 4:56 pm

Re: Question

Post by guilhermetti »

Hi it's me again hahahaha
I swear it's the last time! xD
I have a question about conditions, I read the documentation but didn't find the solution.
I'm trying to put the condition "is not null" in a column and assign expression but it doesn't work.
Example1.jpg
Example1.jpg (316.6 KiB) Viewed 923 times
Example2.jpg
Example2.jpg (193.46 KiB) Viewed 923 times
Thank you!
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Question

Post by Lech Kulikowski »

Hello,

For string columns please try to check by empty values not by null:
datasource.column == ""

Thank you.
Post Reply