Dynamic tables by code

Stimulsoft Reports.NET discussion
Post Reply
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Dynamic tables by code

Post by pkokkotis »

Hello guys, I am trying to create a really complicated report, using c# code. My report shall be separated in groups (e.g. categories). Each group may have a cover page. Inside each one of those groups may be some subgroups, which will be consisted of tables with various number of columns (e.g. Category 1 (Cover page) and 3 tables as subgroups (table1: Cols:3, rows:5 | table2: Cols:4, rows:3 | table3: Cols:3,, rows:3,table4:cols:5,rows:10,table5:cols:4,rows:8 --- Category 2 (Cover page) and 5 tables as subgroups etc... every table different from the previous one). Number of tables (subgroups), as well as number of columns in each table, is unspecified before reading data from db. So everything will be created dynamically in code. Furthermore, header cells of tables must exist in 2 rows (parent & children) - e.g. parent row having 3 cells, child row 12 cells, 4 per parent. I wonder about the kind of report to choose, how to achieve grouping in 2 levels and totaly different tables in second level, depending on data. Any help would be highly appreciated.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamic tables by code

Post by HighAley »

Hello.

Please, try to read the Getting Started section of the User Manual.
You could find step-by-step guides how to create typical reports with our product.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Dynamic tables by code

Post by pkokkotis »

I know how to create typical reports. But it is nowhere described how to create bands/tables with different columns per group. However, it is nowhere described how to create a cover page per group (not per report). Your documentation is totally inefficient and misleading. Maybe I have to go for another tool.
Thanks for your time.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamic tables by code

Post by HighAley »

Hello.

You could create a cover with the Group Header Band and Child footers with set New Page Before property
To create tables with different amount of columns you could use the Cross-Data band or Cross-tab.
You could find information about all components and properties in the User Manual.

If you need any additional help, please, send us your report template with sample sample data and we will suggest you a solution.

As well we will be glad to provide you the report creation service.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Dynamic tables by code

Post by pkokkotis »

I guess you mean something like in the image attached. I'd like page2 (cover) and page1 to be grouped and repeated while student changes (let me know if this case is covered in the user manual as it seems not to be a rare one). First of all, there is no New Page Before property (NOWHERE). However, I feel it will just repeat page2 as many times as students are and then page1 as well. Furthermore, GroupHeader doesn't display data if no databand in page.
Attachments
Report_prtScn.png
Report_prtScn.png (92.45 KiB) Viewed 5538 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Dynamic tables by code

Post by Alex K. »

Hello,

Can you please send us a test data and sample how it should look like. We will try to find a solution.
Most probably, in this case, you need to use the Cross-Data component.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Dynamic tables by code

Post by pkokkotis »

As long as my data is retrieved from database, which I cannot export, I attach an xml example of how I realize it. In the document (ms word) you can find a sample of how I'd like my report to be. I've already lost many working hours trying to find information on how to do it, so any help would be extremely important.
Attachments
RptStudentGrades2105.mrt
(35.37 KiB) Downloaded 263 times
test_data.xml
The data in xaml format
(10.64 KiB) Downloaded 254 times
Sample.docx
How it should look like
(17.55 KiB) Downloaded 250 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamic tables by code

Post by HighAley »

Hello.

At first we should say that the EngineV1 is used in your report.
This is our old report engine, we don't suggest you to use this engine. It's outdated. Please, use the EngineV2.
The Number Of Pass is set to Double Pass. You don't need it in this report. It slows down the rendering time.
Also we should notice that the additional page of the report template is not necessary too.

Please, look at the attached report template. It uses our Demo.xml and create the report that is similar to yours.
The master band is for a cover page. The Child band is for a Student name on the other page.
And the child data band to show data.
As we wrote before we use the New Page Before property of the bands.
ReportWithCover.mrt
(10.62 KiB) Downloaded 262 times
We will be glad to answer on all your questions if you have any.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Dynamic tables by code

Post by pkokkotis »

I finally managed to create my report, combining information from your previous answers. Updating to Engine v2 was critical in my case.
Thanks a lot.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Dynamic tables by code

Post by Alex K. »

Hello

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply