TinyButStrong - the PHP Template Engine
Categories > Your tips & tricks >

Block with headergrp having Page Break before except for the first occurence

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Jules
Date: 2013-01-31
Time: 13:57

Block with headergrp having Page Break before except for the first occurence

Hello,

Let us suppose you have a document that has as its first paragraph a title for the whole document. For example: "PROGRAM FOR 2013"
And then the second paragraph, containing a block with headergroup. For example: [BLK_RES.TRIMESTER;BLOCK=W:P;HEADERGRP=TRIMESTER] TRIMESTER].
The field "trimester" of every record contains "First" or "Second" or "Third" or "Fourth".
If you want that every new trimester section begin on a new page, you can apply the format "Page Break Before" to the paragraph that contains the trimester.
But the problem is that you will have also the first semester beginning on a new page (page 2), leaving behind the document title as one line alone on the first page.

How can you prevent this separation of the first occurence of the breaking field trimester from the very beginning of the document.

The simple solution I found is to:
1- make sure Word has a different header for the first page;
2- Move the first paragraph (title of the whole document) in this header, so that my breaking field "trimester" is now in the first paragraph of the main text.
Since Word ignore the "Page Break Before" format for the first paragraph of the main text, your first trimester will not be separated form the document title (in this case: "PROGRAM FOR 2013".

I hope this tip can be useful to somebody.