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 » Mon Mar 08, 2021 6:59 am

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 39 times
HerrHaeck
Posts: 5
Joined: Mon Mar 08, 2021 6:41 am

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck » Tue Mar 09, 2021 8:13 am

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

Re: Page Header with Cross Data and Business Objects

Post by HerrHaeck » Thu Mar 11, 2021 1:44 pm

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

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski » Wed Mar 17, 2021 6:55 pm

Hello,

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

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

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski » Mon Mar 29, 2021 12:43 pm

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 » Wed Mar 31, 2021 8:43 am

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: 3592
Joined: Tue Mar 20, 2018 5:34 am

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski » Tue Apr 06, 2021 7:43 am

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 » Tue May 04, 2021 9:14 am

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

Re: Page Header with Cross Data and Business Objects

Post by Lech Kulikowski » Tue May 04, 2021 9:17 am

Hello,

You are welcome!
Post Reply