Table cells split badly across 2 pages

Stimulsoft Reports.NET discussion
Post Reply
User avatar
John
Posts: 130
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Table cells split badly across 2 pages

Post 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 246 times
Lech Kulikowski
Posts: 6349
Joined: Tue Mar 20, 2018 5:34 am

Re: Table cells split badly across 2 pages

Post by Lech Kulikowski »

Hello,

Please send us your report with test data for analysis.

Thank you.
User avatar
John
Posts: 130
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Re: Table cells split badly across 2 pages

Post 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 202 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.
Lech Kulikowski
Posts: 6349
Joined: Tue Mar 20, 2018 5:34 am

Re: Table cells split badly across 2 pages

Post 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.
Post Reply