Tag Function (Basic) – Page Total, BF Page Total, Print On Last Page Only, Print On Every Page Except Last Page

Home » Report Designer » Tag Function (Basic) – Page Total, BF Page Total, Print On Last Page Only, Print On Every Page Except Last Page
Report Designer No Comments

Tag function is a tag line that can be used to perform pre-scripted function. These pre-scripted function are functions such as printing label only at last page where it requires some scripting to be done before this. AutoCount had simplified this process by introducing this tag function to everyone. With this tag function, users will not need to write script for certain function in order to achieve what is required.

Currently AutoCount implements the following tag function in Report Designer:

  1. @PageTotal – Show Page total
  2. @BFPageTotal – Show accumulated page total, excluding current page
  3. @PrintOnLastPageOnly – Set to print only on last page
  4. @PrintOnEveryPageExceptLastPage – Set to print on every page except last page

So now you know currently that AutoCount has these tag function, but how do I implement them? The following will teach the process of implementing each of these tag function, step by step. All of the steps below will be using System Report – Invoice.

 

@PageTotal

1. In order to show it obviously, go to Report Explorer (default top right box), find Report then right click on it. Select Insert Band –> Page Footer.

2. Add 2 labels into this newly created Page Footer side by side at the bottom right.

3. Set one of the labels text to Page Amount and another one blank it

4. Type @PageTotal into the tag properties of that newly created added label

image1

 

5. After insert the tag, go to Data Binding –> Tag –> Binding, find from the Invoice Master Field List and choose DocKey.

image2

 

6. After this, save and preview the Invoice to observe the result. A small amount will appear at the very bottom of the page and this amount is this page total amount (not including amount from other pages if your invoice is multi-page).

image3

 

@BFPageTotal

1. Continue from @PageTotal, add additional 2 more labels at the Page Footer, place both next to the Page Amount label.

2. This time set one of the labels text to B/F Amount and another one blank it.

3. This time set the tag properties to @BFPageTotal.

image4

 

4. Similar to the @PageTotal, data bind this label tag to Invoice Master Table DocKey. Data Binding –> Tag –> Binding

image5

 

5. After this, save and preview using a multi-page Invoice to observe the result. A small amount will appear at the very bottom of the page, next to the page amount and this amount is the accumulated B/F total Amount (not including amount from current pages and upcoming pages if your invoice is multi-page).

6. The B/F Amount will be the same amount with the example that is shown in @PageTotal topic as the Invoice used is the same Invoice.

image6

 

*For @PageTotal and @BFPageTotal, you can do the total based on label. For example you had a label call xrQty that actually binds to your Quantity field, you can get the Total Quantity by Page by setting the Tag to @PageTotal:xrQty

 

@PrintOnLastPageOnly

1. To observe the result clearly, this example will remove the labels that were used previously in @PageTotal and @BFPageTotal.

2. Add one label with the text “- THE END – “.

3. Set the tag properties of this label to @PrintOnLastPageOnly.

image7

 

4. After insert the tag, go to Data Binding –> Tag –> Binding, find from the Invoice Master Field List and choose DocKey.

image8

 

5. After this, save and preview using a multi-page Invoice to observe the result. The label will only print on the last page and will not appear at the rest of the page.

 

Page 1 (Multi-page Invoice)

image9

 

Page 2 (Last Page)

image10

 

@PrintOnEveryPageExceptLastPage

1. Continue from the example from @PrintOnLastPageOnly, using the label that used to show “- THE END -”.

2. Change the text to “CONTINUE NEXT PAGE”.

3. Set the tag properties to @PrintOnEveryPageExceptLastPage

image11

 

4. Go to Data Binding –> Tag –> Binding, make sure the binding is on Invoice Master Table DocKey, if not find from the Invoice Master Field List and choose DocKey.

image12

 

5. After this, save and preview a multi-page Invoice to observe the result. The label will print on every page of the invoice except the last page of the Invoice.

Page 1 (Multi-page Invoice)

image13

Page 2 (Last Page)

image14

 

 *This function can only work in Label and Panel

 

You can download this guide here: Tag Function (Basic) – Page Total, BF Page Total, Print On Last Page Only, Print On Every Page Except Last Page.