we got a problem with the position of the entries of a databand on pages with different page margins.
Given is a report with one page with a data band and header on it. Furthermore in the Page Rendering-Event the setting of the page margins is defined by C#-Code (RenderSide(object? sender, EventArgs e)):
Code: Select all
var side = sender as StiPage;
if (!(side is null))
{
var isFirstSide = side.Report.PageNumber == 1;
side.Margins = new StiMargins(
isFirstSide ? 2.5 : 2.5,
isFirstSide ? 2 : 0,
1,
0);
}
What i expect is that the page margin is set correctly for all pages.
What happens is that the page margins are set correctly for all pages.
Only the first entry of the databand on the suceeding pages is formatted incorrectly (it still uses the same page margin as the first side, so it is placed 2,5 on the left).
Example picture of suceeding page: This is the databand on a suceeding page. As you see the second entry (34) is placed correctly with no right margin. The first entry (33) is placed wrong with the margin of the first page, although it is on the suceeding page.
So my question is:
Why is the first entry on the suceeding pages rendered differently from the others and is there any fix for this?
Thank you for your time and your help.