While creating a BI Publisher Invoice report for a client I had to google like a mad women.
Here are some of the things I've learned:
The template consists of 2 pages because one of the requirements was a remittance advice at the end of each invoice (per student) - almost like a footer but only on the last page. This was the final .rtf template:
The body of the template looked like this:
Tips:
1. Formatting the date: <?format-date:A.DATE_DUE;'dd/mm/yyyy';'UTC'?>
2. Formatting the amounts: <?format-number:A.TOT_FUTURE_AMT;'999G999D99'?>
3. Calculating the sum of the current group: <?sum(current-group()//EXPR64_64)?>
4. If statements: <?if:sum(current-group()//A.DEBIT_UFS)<0.00?><?sum(current-group()//EXPR64_64)?><?end if?>
OR
<?if:A.TOT_FUTURE_AMT!=0.00?>
5. Upper Case: <?xdofx:upper(A.NAME_TITLE)?>
Because of the last page "footer" both pages must have a header identified - just be carefull with group-by statements - these should only be on the first page header... tick the "different first page" box in word properties of your header. TYPE form fields into the word header (drag and drop or inserting with add-Ins functionality will give an error when trying to save the template - dankie Dino! :D.
First page Header group by: <?for-each-group@section:row;./A.EMPLID?>
This is the first page header (with group by):
This is the second page header:
To get the last page footer to work do the following:
1. Add a "Section Break" in your template (word property: page layout>breaks>section break).
2. Add the following syntax: <?start@last-page-first:body?> <?end body?> --> everything above this statement will be the header (which we defined with word) and everything below this statement will be the footer:
See the <?end for-each-group?> statement under the footer (to make this part of the group-by).
This is gr8, its working, even I was finding difficult to print the fooetr on the last page. The above solution is exactly what I was looking... Thanks a lot for posting it...
ReplyDeleteYou are sharing better solution.Thanks for sharing this informative blog.Its an exact solution for this.You can visit online writing services for getting better writing ideas.
ReplyDeleteThanks for this article. It contains the information I was searching for and you have also explained it well. We are also an assignment writing help provider. So, the students struggling to write their college assignments can opt for our online assignment help and can get a quality assignment written from us. college essay writing tips
ReplyDeleteYour post is very helpful to get some effective tips to reduce weight properly. You have shared various nice photos of the same. I would like to thank you for sharing these tips. Surely I will try this at home. Keep updating more simple tips like this. Custom Essay Writing Service
ReplyDelete