Page 1 of 1

Table cells split badly across 2 pages

Posted: Mon Apr 29, 2024 1:54 pm
by John
Dear Team,

I'm having an issue as you can see here in the attachment that cells right at the end of the page are trying to display themselves, although there is no room left.
In one row there are 9 columns - 4 or which contain icons.
Is it possible by some trick to get the cells to start on the next page when there is very little room left?
I am generating the table at runtime in code using c#, Stimulsoft.Base.dll and Stimulsoft.Report.dll and I am not using a MRF file template.

I've tried using CanBreak=true and BreakIflessThan: xx% on the table but this causes empty pages to be displayed in the middle of the table.

Is there some way of doing, for example, a second rendering where a row and its cells that are right at the bottom of the page are re-rendered and automatically moved down to the next page where they can begin and have enough room?
Could StiTableCell GetRealHeight() or GetRealTop() be helpful here? I've never used them before. What about JoinHeight and ChangeTopPosition?

That would be great if possible.
Many thanks.
John K.
Stimulsoft_Cell_Splitting.png
Stimulsoft_Cell_Splitting.png (103.17 KiB) Viewed 1956 times

Re: Table cells split badly across 2 pages

Posted: Tue Apr 30, 2024 11:57 am
by Lech Kulikowski
Hello,

Please send us your report with test data for analysis.

Thank you.

Re: Table cells split badly across 2 pages

Posted: Thu May 02, 2024 3:32 pm
by John
Unfortunately, this is not a normal sort of report. There is no MRT template and no Dataset.
The report is created at runtime using a new StiReport object and a StiTable. Each cell is added individually and the contents are added during rendering by assigning an event to each cell.
This sort of thing:

Code: Select all

public void Icon_GetImageData(object sender, StiGetImageDataEventArgs e)
This means I do not really have anything I can send you.

Perhaps there is another approach to solving my issue:

Is it possible to create a template with a table where the contents of a column are not the same type? I mean like this:
I2.png
I2.png (13.07 KiB) Viewed 1912 times
This would be a mixture of StiText and StiImage cells from a c# point of view.
If this is possible, I could write my code in a different way and probably use a template instead of having to create the table cell-by-cell.

Kind regards.

Re: Table cells split badly across 2 pages

Posted: Thu May 02, 2024 7:53 pm
by Lech Kulikowski
Hello,

In this case, you can try to use DataBand, Text and Image components, and on each row of the DataBand enable Text or Image as you need.

Thank you.