Discussion Locked

Control Break in MS word

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have to generate a report type format in MS word. Is there any way to make a detail line? If I have an IF field that has an identifier such as one. Then each record on the page should print the information applying to the detail record 1. Whenthe identifier switches to 2 the page should break the next set of records should be reported. Is this possible?

2 replies

by glenn from iowa

I curious as to where you are getting the data. Is this a mail merge type document?

At any rate, this solution should work. Put two fields in your data, for example, DetailNum and DetailSeq. DetailNum would be the identifier you mentioned, and DetailSeq would be the sequence within DetailNum. For example,

DetailNum DetailSeq Data
1 1 Record 1
1 2 Record 2
1 3 Record 3
2 1 Record 4
2 2 Record 5
and so on...

If I am understanding you correctly, you want to put a page break between Record 3 and Record 4 and all other records where the DetailNum changes. Sort your records by DetailNum then by DetailSeq and put the following field at the top of your main document: {IF {MERGEFIELD DetailSeq } 1 "[HPg]" " " }, replacing [HPg] with a hard page.

I created the IF statement using the Insert Word Field and putting a space in both the Insert this text and in the Otherwise inse

This discussion is closed to new replies.