Hi,
I use Clarion 6.3 PE 9054 with the ABC templates.
On a report I want the first page to have a different header than the 2nd to 999th page.
The problem is that the first page has a big header which occupies about 30% of the page, whereas the 2nd page has a small header which only occupies 5% of the page.
I know I can change the header contents during runtime. I also know I can change the header size during runtime. No problem so far.
When I reduce the size of the header I also want the detail section to grow and move up. However, when I move the detail section up after the first detail is printed using:
, it will overprint the large header on the first page. I.e. I moved the detail section up too early...
So, I need to know when the page has ended, i.e. when the detail section is finished and the footer and form have printed, so I can change the detail afterwards without messing up the first page.
The header contents and height I can change immediately after the first run-time has printed.
The detail ypos and height can only be changed when the first page detail section is completed. What's the right event/embed-point to do this?
While I'm writing this I think I've found a solution:
I will let the detail section overlap the header section, i.e. I let the detail section start way too high. I add an extra detail band which has a height of the height difference between the 1st page header and 2nd page header.
I add a byte variable: onfirstpage=1
In the TakeRecord-embed (before parent-call) I can print the empty detail like this:
Even though this will probably work, it's not the most elegant option. So the question remains: How can I detect a page break or a header-print or a footer-print? (perhaps it just isn't possible?)
I use Clarion 6.3 PE 9054 with the ABC templates.
On a report I want the first page to have a different header than the 2nd to 999th page.
The problem is that the first page has a big header which occupies about 30% of the page, whereas the 2nd page has a small header which only occupies 5% of the page.
I know I can change the header contents during runtime. I also know I can change the header size during runtime. No problem so far.
When I reduce the size of the header I also want the detail section to grow and move up. However, when I move the detail section up after the first detail is printed using:
Code:
target{prop:ypos} = target{prop:ypos} - moveup
So, I need to know when the page has ended, i.e. when the detail section is finished and the footer and form have printed, so I can change the detail afterwards without messing up the first page.
The header contents and height I can change immediately after the first run-time has printed.
The detail ypos and height can only be changed when the first page detail section is completed. What's the right event/embed-point to do this?
While I'm writing this I think I've found a solution:
I will let the detail section overlap the header section, i.e. I let the detail section start way too high. I add an extra detail band which has a height of the height difference between the 1st page header and 2nd page header.
I add a byte variable: onfirstpage=1
In the TakeRecord-embed (before parent-call) I can print the empty detail like this:
Code:
IF onfirstpage
PRINT(RPT:dummydetail)
DO ChangeHeader [red]! alters the header and decreases its height
! There is no need to change the detail size and ypos as
! it's already high enough for the 2nd page header[/red]
onfirstpage=false
.
Even though this will probably work, it's not the most elegant option. So the question remains: How can I detect a page break or a header-print or a footer-print? (perhaps it just isn't possible?)