Page Header with Cross Data and Business Objects

Stimulsoft Reports.NET discussion
Post Reply
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Page Header with Cross Data and Business Objects

Post by HerrHaeck »

Hello

Based on this post
Cross-Tab with Business Objects

I have 2 questions:
if the table is too wide for one page, the additional columns are displayed on an "extended" page as expected. But: is it possible to have page header and footer on these pages?
E.g. to have "Page 2 of 4"
And:
Is it possible to stretch the last column so it is placed on the right border of the page?

Best regards
Peter
Attachments
ClassLibrary1.zip
(28.17 KiB) Downloaded 154 times
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck »

this image as explanation for the right column, with lines on every row of course.
Attachments
columnRight.png
columnRight.png (443.44 KiB) Viewed 3216 times
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck »

Question 1 the answer, if anyone should have this problem too:
Set "Number of Pass" to "Double Pass"
Put a CrossDataBand into PageHeader and PageFooter each.
Set Count Data = 1 on both.
Add new int Variable with name PagesCount with value 0.
Add After Print Event on Page:

Code: Select all

PagesCount = RenderedPages[0].SegmentPerWidth;
Add Before Print Event:

Code: Select all

if (IsFirstPass) 
	PagesCount = 0;
else {
	CrossDataBand3.CountData = PagesCount;
	CrossDataBand4.CountData = PagesCount;
}
If you want the page numbers in the footer:
Add Text component with text

Code: Select all

Page {CrossDataBand3.Position + 1 + (PagesCount * (CurrentPrintPage - 1))} of
(replace CrossDataBand3 with the name of the band inside the footer)
and one Text component with

Code: Select all

{TotalPageCount}
Attachments
ReportCrossTab.mrt
(20.2 KiB) Downloaded 147 times
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski »

Hello,

It is difficult to say something about the issue without a rendering report.
Please send us a test data for your report.

Thank you.
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck »

The attached solution in the 1st post contains test data. Not the same as in the picture in the 2nd post, but the problem is the same.
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski »

Hello,

> Is it possible to stretch the last column so it is placed on the right border of the page?

Please set the UnlimitedBreakable=false property for the page.

Thank you.
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck »

Sorry, I'm no more on this project so I can't test your solution, but thanks anyway!
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski »

Hello,

You are welcome!
Post Reply