Hello,
we have a problem with groups and pageheader with Print On-Property is set.
we want:
PageHeader 1 print on every first page of group
PageHeader 2 print except first page of group
GroupHeader
DataBand
GroupFooter
what we do:
Report: Double Pass
Page Header1: Print On "Only First Page"
Page Header2: Print On "Except First Page"
GroupFooter Reset Page Number = true; New Page After
What is here wrong?
Problem with groups aand PageHeader
Problem with groups aand PageHeader
- Attachments
-
- ReportmitGruppePageHeader1.mrt
- (28.09 KiB) Downloaded 218 times
Re: Problem with groups aand PageHeader
Hello.
Your problem is in the Reset Page Number property of the Group Footer. It reset number of the current page.
We offer you to use a bool variable. It should have false init value. In the Before Print event of Group Header it will be set to true and in the Before Print event of Group Footer it will be set to false.
Also it's necessary to set the Condition of the both Page Headers.
Please look at the attached report template. Thank you.
Your problem is in the Reset Page Number property of the Group Footer. It reset number of the current page.
We offer you to use a bool variable. It should have false init value. In the Before Print event of Group Header it will be set to true and in the Before Print event of Group Footer it will be set to false.
Also it's necessary to set the Condition of the both Page Headers.
Please look at the attached report template. Thank you.
Re: Problem with groups aand PageHeader
Thanks for your quick reply.
Some questions remain:
1. Why do you use Engine.NewPage() in the afterPrint-Event of the GroupFooter instead of "New Page After" Property of the GroupFooter? I know, New Page After dont work in your solution, but why? How should we decide, what is the right way?
2. How can we use the group value in the Page Header?
When we use New Page After" Property the group value is on the first Page wrong; from the second ok. When we use Engine.NewPage(), on all pages wrong. In Crystal Reports it works fine (in that case). See sample.
Understands us. We don't back to Crystal, but in that case StiReports don't work correct.
Ralf
Some questions remain:
1. Why do you use Engine.NewPage() in the afterPrint-Event of the GroupFooter instead of "New Page After" Property of the GroupFooter? I know, New Page After dont work in your solution, but why? How should we decide, what is the right way?
2. How can we use the group value in the Page Header?
When we use New Page After" Property the group value is on the first Page wrong; from the second ok. When we use Engine.NewPage(), on all pages wrong. In Crystal Reports it works fine (in that case). See sample.
Understands us. We don't back to Crystal, but in that case StiReports don't work correct.
Ralf
- Attachments
-
- ReportmitGruppePageHeader1.mrt
- (28.09 KiB) Downloaded 214 times
-
- BerichtGroupPageHeader.zip
- Crystal Report sample
- (26.47 KiB) Downloaded 215 times
Re: Problem with groups aand PageHeader
Hello.
The main difference with Crystal reports is that several bands could be on the one page. So when the Page Header is printing the Data Band is not initialize the Data Source. So it's better to use the New Page After property of the Group Footer or the New Page Before property of the Group Header. But you should remember that the data is not initialized on the Page Header.
As a way you could use two Group Headers with one Condition. Please, look at the attached report template. Thank you.
The main difference with Crystal reports is that several bands could be on the one page. So when the Page Header is printing the Data Band is not initialize the Data Source. So it's better to use the New Page After property of the Group Footer or the New Page Before property of the Group Header. But you should remember that the data is not initialized on the Page Header.
As a way you could use two Group Headers with one Condition. Please, look at the attached report template. Thank you.
Re: Problem with groups aand PageHeader
Hallo,
thanks, is works and I understand the difference between Stimulsoft/Crystal Reports.
For the users of the forum:
The screenshot shows, why the solution works. I've been looking for a while ...
Happy new year!
thanks, is works and I understand the difference between Stimulsoft/Crystal Reports.
For the users of the forum:
The screenshot shows, why the solution works. I've been looking for a while ...
Happy new year!
Re: Problem with groups aand PageHeader
Hello.
Thank you for explanation.
Happy New Year!!!
Thank you for explanation.
Happy New Year!!!