add. subreports: different header on 1st page per subreport?

Stimulsoft Reports.NET discussion
Post Reply
DCollins
Posts: 9
Joined: Tue Nov 27, 2012 2:05 pm

add. subreports: different header on 1st page per subreport?

Post by DCollins »

Dear Stimulsoft team,

There is a table that needs to be printed with too many columns to fit on one page (landscape)
So I want to create a subreport for each group of 5 columns (max column count for landscape) and add those to an empty main report.

Whenever a new subreport starts, the header of the first page of that subreport needs to be different from the header on the following pages of that subreport.
The mrt contains 2 page header bands. 1 to show on the first page and one to show on all other pages (setting the property ‘Print on’ in the designer accordingly)

Now when I add the subreports with mainreport.SubReports.Add() only the very first page of the resulting report does show the header band for the first page. That is not what I expected.
So my question is:
Is there a (simple) way to have one (page)header on the first page of a subreport and another header on all other pages of that subreport, when generating a report that has several subreports added.

I am using Stimulsoft 2015.1.19 and testdata.zip contains the relevant data and mrt and a codesnippet how the report is generated.

thank you & best regards,
DCollins
Attachments
testdata.zip
(mrt, data, etc)
(22.18 KiB) Downloaded 186 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: add. subreports: different header on 1st page per subrep

Post by HighAley »

Hello.

You don't need to use sub-reports.
Did you try to use Page Segments?
Please, look at the Page Segments section of our Demo.

Thank you.
DCollins
Posts: 9
Joined: Tue Nov 27, 2012 2:05 pm

Re: add. subreports: different header on 1st page per subrep

Post by DCollins »

hello Aleksey,

thank you for the suggestion of using page segments. I have never tried to work with Page segments, but from reading into it, I am not sure it is what is needed, because the segments per page (width) is not known at design time but would need to be set depending on the amount columns in the datatable.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: add. subreports: different header on 1st page per subrep

Post by HighAley »

Hello.

When do you get information about the count of columns?
You could try to create a report in code and add there necessary amount of columns.
Maybe you should use cross-tab?
Sorry, but we need more detailed description of your issue to give more specific answer.

Thank you.
Post Reply