Changing group header after first page

Stimulsoft Reports.NET discussion
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Changing group header after first page

Post by jmiller »

I have a report where the data is grouped. A new page occurs whenever the group changes. This is easy enough. On the first page for a group I want one page header, on the subsequent pages for that group I want a different header. What is the best to do this?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Changing group header after first page

Post by HighAley »

Hello.
jmiller wrote:I have a report where the data is grouped. A new page occurs whenever the group changes. This is easy enough. On the first page for a group I want one page header, on the subsequent pages for that group I want a different header. What is the best to do this?
You could use two Group Headers. On First header set the Print On property to the Only First Page and on the second on set this property to the Except First Page.
Look at the attached report template.

Thank you
Attachments
1783.Report.mrt
(20.37 KiB) Downloaded 362 times
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Changing group header after first page

Post by jmiller »

I thought I tried that, but it looked like the Print On was being applied across all groups and not within a group:

Page 1: Header
John Doe
123 Main Street
United States

[data]

Page 2: Header (only want the person's name and not repeat the address)
John Doe
[more data for John Doe]

Page 3: Header (group change, I want to use the address again)
Jane Smith
456 Maple Ave
United States

[data]

Page 4: Header (back to only wanting the person's name)
Jane Smith

[more data for Jane Smith]



when I did it, I would not getting the address on Page 3 that pertains to "Jane Smith".
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Changing group header after first page

Post by HighAley »

Hello.
jmiller wrote:I thought I tried that, but it looked like the Print On was being applied across all groups and not within a group:

Page 1: Header
John Doe
123 Main Street
United States

[data]

Page 2: Header (only want the person's name and not repeat the address)
John Doe
[more data for John Doe]

Page 3: Header (group change, I want to use the address again)
Jane Smith
456 Maple Ave
United States

[data]

Page 4: Header (back to only wanting the person's name)
Jane Smith

[more data for Jane Smith]

when I did it, I would not getting the address on Page 3 that pertains to "Jane Smith".
In this case you should create two Group Headers too and set the Print on All Pages property of the first header to True. Look at the attached report template.

Thank you.
Attachments
1795.Report.mrt
(20.58 KiB) Downloaded 446 times
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Changing group header after first page

Post by jmiller »

The last report.mrt didn't look like it really had anything in it. I am attaching a quick report I threw together using your demo data. On the very first page (first image), the group header is correct. It shows the full employee address. I am using "Only First Page". On subsequent pages for this employee I do not want his address. On the second page of the report (second image) I am able to just show the employee's name which is what I want. I am using a second group header with "Except First Page". The problem occurs when the next employee comes up (third image). It is not showing his full address.
Attachments
1794.GroupHeaderReport2.mrt
(29.53 KiB) Downloaded 278 times
1793.Report3.PNG
1793.Report3.PNG (4.57 KiB) Viewed 3964 times
1792.Report2.PNG
1792.Report2.PNG (5.75 KiB) Viewed 3965 times
1791.Report1.PNG
1791.Report1.PNG (5.16 KiB) Viewed 3964 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Changing group header after first page

Post by HighAley »

Hello.

Sorry, I attached the wrong file. I've uploaded right file.

Please, download it again.

It seems that you don't set the Print On property of both Group Headers to All Pages.

Thank you.
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Changing group header after first page

Post by jmiller »

That is better but I am still having a slight issue. My headers have the same information (employee name) and therefore the name is being shown twice on the first page. Please see the attached image. In the mrt you provided, the group headers have different contents.
Attachments
1796.Report4.PNG
1796.Report4.PNG (6.51 KiB) Viewed 3950 times
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Changing group header after first page

Post by Ivan »

Hello,

Please check the attached report template.

Thank you.
Attachments
1797.GroupHeaderReport3.mrt
(28.23 KiB) Downloaded 379 times
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Changing group header after first page

Post by jmiller »

That works! Thanks for your help.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Changing group header after first page

Post by Andrew »

Hello,

That's our pleasure to help you.

Thank you.
Post Reply