Report Design: How to use tag function in report

From AutoCount Resource Center

Question: How to use tag function in report?


Version: 1.8 / 1.9 / 2.0

Tag function is a tag line that can be used to perform pre-scripted function. Previously, these pre-scripted functions such as "printing label only at last page" requires some scripting. AutoCount has simplified this process by introducing tag function. With this tag function, users will not need to use scripting for certain function to work.

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


Each of these tag functions will be shown step by step on how to implement it.

All examples below are using System Report – Invoice.


PageTotal


1. In order to show page total, go to Report Explorer (default top right box), look for 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 label



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



6. Save and preview the Invoice to preview 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).



BFPageTotal


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

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

3. Set the tag properties to @BFPageTotal.



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



5. 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.



Note: For @PageTotal and @BFPageTotal, you can do the total based on label. For example you have a label called 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.



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



5. 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)


Page 2 (Last Page)


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.



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.



5. 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)


Page 2 (Last Page)



Note: This function can only work in Label and Panel.


By: JS 140919, KM 180309, P180322



Go to menu

AutoCount Accounting 2.0 & 2.1


AutoCount Accounting 1.8 / 1.9
AutoCount Payroll
AutoCount POS


AutoCount On The Go
AutoCount Accounting Plug-In Documentations