Merge / Join StiTable Cells

Stimulsoft Reports.NET discussion
Post Reply
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Merge / Join StiTable Cells

Post by mmmmmm »

I have a dynamically created table like below:

Code: Select all

                            StiTable table = new StiTable();
                            table.Name = "Table1";
                            
                            table.ColumnCount = 6;
                            table.RowCount = 3;
                            table.HeaderRowsCount = 1;
                            table.FooterRowsCount = 1;
                            table.Width = page.Width;
                            table.Height = page.GridSize * 12;
                            table.DataSourceName = String.Format("{0}", tblDR.TableName);

                            page.Components.Add(table);

                            table.CreateCell();
                            table.TableStyle = StiTableStyle.Style11;
The table will look like this:
--- --- --- --- --- ---
|c1|c2|c3|c4|c5|c6| <---Header
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 2| 4 | 6| 8 |10|12| <---Footer
--- --- --- --- --- ---

Is it possible to programatically join/Merge the last 2 cells in the footer in order to display a Total.Sum of the last 2 columns of the data rows like below:
--- --- --- --- --- ---
|c1|c2|c3|c4|c5|c6| <---Header
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 2| 4 | 6| 8 |__22| <---Footer
--- --- --- --- --- ---
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Merge / Join StiTable Cells

Post by mmmmmm »

Can anyone please advice on how to achive the following layout (from code):
Image
table layout

I am building the table in code like in the previous post.
I am facing some problems in achieving the following:

1. Merge the 3 highlighted cell in the footer.
Now, I simply set the right & left border of the 2 cell to None, in order to emulate the appearance of a merged cell.
Is there a way to merge 2 neighbor cells?

2. I need to add more FooterRows, but once I exceed 4 FooterRows the report is not rendered correctly anymore.
Can someone advice on how to properly setup about 6 FooterRows?
Or maybe, is there another way to display some Totals from the dynamically created table? (a SummaryBand maybe?)
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Merge / Join StiTable Cells

Post by mmmmmm »

Hello,

can anyone please advice on the issues in the previous post, please?

Thank you!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Merge / Join StiTable Cells

Post by Alex K. »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
Post Reply