Generate multiple tables whose number of columns may vary

Stimulsoft Reports.JS discussion
Post Reply
fcf9lh
Posts: 2
Joined: Tue Feb 25, 2020 4:59 pm

Generate multiple tables whose number of columns may vary

Post by fcf9lh »

In process of developing a report that emulates an existing report. The 'Stimulsoft1' attachment is a photo of the 'Test Results' section for which I would like to emulate in the report designer.
.
The attachment Stimulsoft1.PNG is no longer available
For this report example, the 'Test Results' section happens to have 4 tests in total and a 'table' for each test. Each test (e.g. Test No: 5791) can contain one or more row(s) and each test type( e.g. Test: 'Quench & Temper Line Info') has a variety of columns that vary between different test types.

Outside of the context of the report designer, the data for the 'Test Results' section is being pulled from a database and each entry in the result set has the following information, (testNo, rowIndex, columnIndex, columnLabel, value). This data has the ability to be transformed (e.g. create multiple tables from the cell data) before being loaded into the data dictionary of the report.

I'd like some guidance on how to consecutively render 'tables' whose number of columns may vary.

What components would I need to accomplish this?

I have the ability to transform the data before it is loaded into the data dictionary of the report; how should the data be structured?

Anything else to consider?

--- Update 2/27/2020 ---

The 'Stimulsoft_tesetAndColumn.mrt' attachment is an empty report whose data dictionary has a datasource named 'EvaluatedTransform' that contains 2 tables; the first table 'EvaluatedTransform' contains information regarding (testNo, columnIndex, columnLabel) and the second table 'EvaluatedTransform_rows' contain information regarding (value, rowIndex). The 'data_testAndColumn.json' attachment represents the denormalized data before it is normalized and loaded into Stimulsoft.

The 'Stimulsoft_testAndRow.mrt' attachment is an empty report whose data dictionary has a datasource named 'EvaluatedTransform' that contains 2 tables; the first table 'EvaluatedTransform' contains information regarding (testNo, rowindex) and the second table 'EvaluatedTransform_columns' contain information regarding (value, columnIndex, columnLabel). The 'data_testAndRow.json' attachment represents the denormalized data before it is normalized and loaded into Stimulsoft.
Attachments
Stimulsoft_testAndRow.mrt
(21.38 KiB) Downloaded 114 times
data_testAndRow.json
(81.02 KiB) Downloaded 115 times
Stimulsoft_tesetAndColumn.mrt
(21.18 KiB) Downloaded 103 times
data_testAndColumn.json
(74.06 KiB) Downloaded 129 times
Stimulsoft1.PNG
Stimulsoft1.PNG (76.89 KiB) Viewed 1387 times
Lech Kulikowski
Posts: 6265
Joined: Tue Mar 20, 2018 5:34 am

Re: Generate multiple tables whose number of columns may vary

Post by Lech Kulikowski »

Hello,

In that case, you can use DataBand components to show data by lines and Cross-Data components to show columns.
Also, in that case, you need to use master-details construction.

Thank you.
fcf9lh
Posts: 2
Joined: Tue Feb 25, 2020 4:59 pm

Re: Generate multiple tables whose number of columns may vary

Post by fcf9lh »

Hello Lech, thank you for your response.

.
The 'Stimulsoft_testColumnRow.mrt' attachment is a report that has the following 'Report Tree',
Stimulsoft__2.PNG
Stimulsoft__2.PNG (7.2 KiB) Viewed 1346 times
,
the following data 'Dictionary',
Stimulsoft__3.PNG
Stimulsoft__3.PNG (9.87 KiB) Viewed 1346 times
.
The JSON in the 'Stimulsoft_data_testColumnRow.json' attachment represents the denormalized data; the data is grouped by test then grouped by column then grouped by row. It is normalized when loaded into the data dictionary.

The preview of the report is shown below,
Stimulsoft__4.PNG
Stimulsoft__4.PNG (14.51 KiB) Viewed 1346 times
.

It's ok for an initial version but not close enough to the photo specified in the original post. It was also very challenging to layout the components to render properly, hence all the use of panels. Is there a better way to compose this report?
Attachments
Stimulsoft_testColumnRow.mrt
(13.57 KiB) Downloaded 113 times
Stimulsoft_data_testColumnRow.json
(10.13 KiB) Downloaded 118 times
Lech Kulikowski
Posts: 6265
Joined: Tue Mar 20, 2018 5:34 am

Re: Generate multiple tables whose number of columns may vary

Post by Lech Kulikowski »

Hello,

Please check the modified report in the attachment.

Thank you.
Attachments
Stimulsoft_testColumnRow_modified.mrt
(14.47 KiB) Downloaded 118 times
Post Reply