How to skip page header by condition?
How to skip page header by condition?
Hallo,
i've a very simple question: I will split my page header in two headers, the one will be printed on each page, the second "TSection2" only if the group header "GroupHeaderSection1" (every group header begins on a new page: NewPageBefore=TRUE) is not printed, because this Group Header will duplicate the same information as second page header and formatted together with more additionally information.
How I can do skipping by condition?
Thanks in advice!
i've a very simple question: I will split my page header in two headers, the one will be printed on each page, the second "TSection2" only if the group header "GroupHeaderSection1" (every group header begins on a new page: NewPageBefore=TRUE) is not printed, because this Group Header will duplicate the same information as second page header and formatted together with more additionally information.
How I can do skipping by condition?
Thanks in advice!
How to skip page header by condition?
Hi Alex,
If I understand you in the proper way, then it is possible to set the following properties for the GroupHeader band:
PrintOnAllPages=true, NewPageBefore = true, SkipFirtst = true;
There is no need in PageHeader band in that case at all.
Thank you.
If I understand you in the proper way, then it is possible to set the following properties for the GroupHeader band:
PrintOnAllPages=true, NewPageBefore = true, SkipFirtst = true;
There is no need in PageHeader band in that case at all.
Thank you.
How to skip page header by condition?
Hi Edward,
if I undestand correct, you mean what I need are TWO "Group Header"'s, where the second header (from top of the page to down) simulates my second "Page Header"?
So for example I have GroupHeader1 and GroupHeaders2. But SkipFirst for the second Header does not really help - it skips only on the first page of the whole report.
What I probably need is the property ans settings like: "SkipPrint = GroupHeader1.Printed";
Thanks.
if I undestand correct, you mean what I need are TWO "Group Header"'s, where the second header (from top of the page to down) simulates my second "Page Header"?
So for example I have GroupHeader1 and GroupHeaders2. But SkipFirst for the second Header does not really help - it skips only on the first page of the whole report.
What I probably need is the property ans settings like: "SkipPrint = GroupHeader1.Printed";
Thanks.
How to skip page header by condition?
Allright, I’ve founded two different solutions.
Both solutions use events.
The second one uses some additional invisible element and is most elegant
1. In GroupHeader1: define event "Get Value" as "this.GroupHeader2.Enabled=false;" ==> this definitively suppress the output of GroupHeader2 below GroupHeader1 along the same page.
2. Add some invisible element (named CHECKER), i.e. transparent line with Size=0 and Width=0 on some DataBand, i.e. MainSection : Data below the GroupHeader2.
3. In CHECKER: define event "Get Value" as "this.GroupHeader2.Enabled=true;" ==>
this enables the output of GroupHeader2 again, i.e. on the following page.
Now the output looks as reqired.
Both solutions use events.
The second one uses some additional invisible element and is most elegant

1. In GroupHeader1: define event "Get Value" as "this.GroupHeader2.Enabled=false;" ==> this definitively suppress the output of GroupHeader2 below GroupHeader1 along the same page.
2. Add some invisible element (named CHECKER), i.e. transparent line with Size=0 and Width=0 on some DataBand, i.e. MainSection : Data below the GroupHeader2.
3. In CHECKER: define event "Get Value" as "this.GroupHeader2.Enabled=true;" ==>
this enables the output of GroupHeader2 again, i.e. on the following page.
Now the output looks as reqired.
How to skip page header by condition?
Hi Alex,
Thank you for this information.
Please let us know if any help is required.
Thank you.
Thank you for this information.
Please let us know if any help is required.
Thank you.
How to skip page header by condition?
Hi Edward,
this solution is only a "workaround" for me, because it depend on internally generated code, code execution order and order of events, maybe it depends also of report creational order.
More logically and intuitive ill be properties like "PrintedOnPage" and "SkipOnPage" or "PrintOnPage", so we can create code like "GH2.SkipOnPage=GH1.PrintedOnPage". Such properties must be evaluated on each page or specifically pages (defined by report creator).
Thanks.
this solution is only a "workaround" for me, because it depend on internally generated code, code execution order and order of events, maybe it depends also of report creational order.
More logically and intuitive ill be properties like "PrintedOnPage" and "SkipOnPage" or "PrintOnPage", so we can create code like "GH2.SkipOnPage=GH1.PrintedOnPage". Such properties must be evaluated on each page or specifically pages (defined by report creator).
Thanks.
How to skip page header by condition?
Hi Alex,
Maybe it is possible to check Enabled property of appropriate band? Suggested properties by you are also is not easy to understand at once
What do you think?
Thank you.
Maybe it is possible to check Enabled property of appropriate band? Suggested properties by you are also is not easy to understand at once

What do you think?
Thank you.
How to skip page header by condition?
Hallo Edward,
Checking the 'Enabled' property was my first attempt. But the problem is, once disabled, the element is always deactivated for the rest of time, and can't enable himself anymore - so we must use event of someone other element to enable it again, as showed in my example - the things become complicated.
Generally I find the conditional model easily to understand as event model. Particularly if condition appears per page, because of event will be only an attempt to emulate this 'page'-condition.
In the conditional model you wrote only direct condition when to enable/disable element on current page, or some other conditions. Condition can be more complex and it will be very difficult to use events. Moreover, it will also continue the same 'conditional'-appearance, already implemented in report engine.
Thanks.
Checking the 'Enabled' property was my first attempt. But the problem is, once disabled, the element is always deactivated for the rest of time, and can't enable himself anymore - so we must use event of someone other element to enable it again, as showed in my example - the things become complicated.
Generally I find the conditional model easily to understand as event model. Particularly if condition appears per page, because of event will be only an attempt to emulate this 'page'-condition.
In the conditional model you wrote only direct condition when to enable/disable element on current page, or some other conditions. Condition can be more complex and it will be very difficult to use events. Moreover, it will also continue the same 'conditional'-appearance, already implemented in report engine.
Thanks.
How to skip page header by condition?
Hi Alex,
Yes, you are right. Conditions is the best approach and this feature has been already implemented.
Please open attached file in the Demo.exe sample application.
Thank you.
Yes, you are right. Conditions is the best approach and this feature has been already implemented.
Please open attached file in the Demo.exe sample application.
Thank you.
- Attachments
-
- 137.PageHeaderDisabling.mrt
- (15.09 KiB) Downloaded 382 times
How to skip page header by condition?
Hallo Edward,
it's true, conditions are already implemented. The problem is not a definition of condition itself, it is how to specify some "page"-condition for element dependent on behaviour of some other element.
By the way, try to reproduce with simple condition what I describe above in this topic and have already solved by using of events.
Thanks.
it's true, conditions are already implemented. The problem is not a definition of condition itself, it is how to specify some "page"-condition for element dependent on behaviour of some other element.
By the way, try to reproduce with simple condition what I describe above in this topic and have already solved by using of events.
Thanks.