This content has been marked as final. Show 4 replies
there are 2 easy ways of doing this.
1. you cant add the variable to the Word Header but you can add the code. So if you go into the properties on the variable and look at the advanced tab you will see something like this
<?Address_Number_display_ID71?>. Just copy this and past into the word header. Cool. But can be time consuming. I build it up then copy and paste the whole table into the header.
2. I've started using templates instead. So in Work header call your template <?call-template: Header?>.
Then somewhere in your template (outside of word header) put the following:
Put all your tables and fields in here as per normal.
Hope that makes sense.
Thanks very much but I am missing something or did not ask my question correctly.
If I add <?Customer_Name?> into the heading, it prints the name but it prints the first customer name on every page (the same name). It does not pick up the second customer record name when it is on the body of the second customer. So, page one has Customer 1 in the heading and some detail.. Page 2 has Customer 1 in the heading but the detail is for Customer2 . How would I get the header variables to pick up the customer record name that the for loop changes to? Also not sure what you mean by putting the tables in the header. The repeat table is in the body. Are you saying move that into the header?
I do appreciate your help...as I know I am close and think I am missing something simple.
I beleive I figured this out as it seems using @section fixes my problem. I get an extra page but that is a new problem. Thanks for the info on headers.
yes sorry use @ section in your foreach statement. That will page break and ensure the values in the header are the right one.
I use word tables to align fields. So I have 1 (or more) to align fields in the header, one for the detail section (or body), and one or more for the footer with the totals.
Sometimes the gridlines are displayed and sometimes not. So thats what I moved up into the work page header, the word table that has all the header info in it.
When you say you have an extra page, have you added a section break to the template ? Are you using start body end body ? What else do you have in the template?
If you are still having issues I dont mind having a look at it for you.