makushatnik Posted September 20, 2019 Share Posted September 20, 2019 Hi,I write simple reports in Jaspersoft Studio for Eclipse.I need to do a big hard report for now. In my report I have some static texts and 3 jasper tables with separate Dataset. DataSource - Json.I was added a Group (Group is the name) section in my Info Dataset. I also was added a GroupHeader band in my table.Json - 1-level array (not grouped) of data like this: [ { operation: "Group 1 Name", group: null, ..}, { operation: "Element 1 Name", group: "Group 1 Name",..} ..]. I want to print GroupHeader then group field = null.Like you can see on my screen, groups are printed twice. In my DataSource I have 13 elements with 5 groups. In my result pdf I get 18 elements (because groups printed twice).What I must change to avoid this behavior?5 Link to comment Share on other sites More sharing options...
trvpseudo Posted September 20, 2019 Share Posted September 20, 2019 Hi Mr. Makushatnik,do you mean like rendering 1 row consist of grouping data only then render its group data detail below it till next group and repeat?if so, ive done similiar case with table element.i use column header band (column name), group header band (grouping), and detail band (other column data).i merge all cell in group header band and put the grouping query data render there while the other column data in detail band.example i query person group by city, preview will be :NAME AGE GENDERnewyorkA 45 maleB 30 malelos angelesC 25 femaleD 55 malehope that helps. cheer!regards,TV Link to comment Share on other sites More sharing options...
makushatnik Posted September 20, 2019 Author Share Posted September 20, 2019 Hi,Thanks for your answer.I started to do like you said. It removes duplicates in element's section, but I still have duplicate string in groupHeader band and in this section I can't see my added in Json structure and in jasper table fields - groupName.That's my report for now (I used him like a subreport for a bigger report):powers.jrxmlCan somebody tell me, what is wrong? Link to comment Share on other sites More sharing options...
makushatnik Posted September 23, 2019 Author Share Posted September 23, 2019 I have a Json like this:{ "info": [ { "group": "Все события", "groupName": "Все события", "operation": "Все события", "sms": null, "email": null, "dbo": null, "phone": "", "condition": null }, { "group": "Системные события", "groupName": "Системные события", "operation": "Системные события", "sms": true, "email": false, "dbo": true, "phone": "", "condition": null }, { "group": "Системные события", "groupName": null, "operation": "Вход в систему", "sms": true, "email": false, "dbo": true, "phone": "+79635214478", "condition": null }, { "group": "Системные события", "groupName": null, "operation": "Cмена пароля", "sms": true, "email": false, "dbo": false, "phone": "+79635214478", "condition": null }, { "group": "Договор ДБО", "groupName": "Договор ДБО", "operation": "Договор ДБО", "sms": true, "email": false, "dbo": true, "phone": "", "condition": null }, { "group": "Договор ДБО", "groupName": null, "operation": "Выпуск сертификата", "sms": true, "email": false, "dbo": true, "phone": "+79635214321", "condition": null }, { "group": "Договор ДБО", "groupName": null, "operation": "Предупреждение об истечении срока сертификата", "sms": true, "email": false, "dbo": true, "phone": "+79635214321", "condition": null } ], ...} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now