Report Design: How to use tag function in report

From AutoCount Resource Center
Jump to navigation Jump to search

Question: How to use tag function in report?


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


Tag func1.jpg


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


Tag func222.jpg


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


Tag func3.png


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.


Tag func4.png


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


Tag func5.png


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.


Tag func6.png


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.


Tag func777.png


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


Tag func8.png


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)

Tag func9.png


Page 2 (Last Page)

Tag func10.png


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.


Tag func11.png


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.


Tag func8.png


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)

Tag func12.png


Page 2 (Last Page)


Tag func13.png


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


By: JS 140919, KM 180309, P180322



Go to menu

IconAcc20.PNG AutoCount Accounting 2.0


IconAcc188.PNG AutoCount Accounting 1.8 / 1.9
Wiki-Payroll.png AutoCount Payroll
Wiki-POS.PNG AutoCount POS
Wiki-AOTG.PNG AutoCount On The Go
Wiki-Accounting-Plugin.png AutoCount Accounting Plug-In Documentations