Report Design: How to use tag function in report: Difference between revisions

From AutoCount Resource Center
Content added Content deleted
(Created page with "Question: How to use tag function in report? <u><b>Answer:</b></u> Tag function is a tag line that can be used to perform pre-scripted function. Previously, these pre-scri...")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Question: How to use tag function in report?
=='''Question:''' How to use tag function in report?==
<br/>

<b>Version:</b> 1.8 / 1.9 / 2.0


<u><b>Answer:</b></u>


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.
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.
Line 23: Line 21:


==@PageTotal==
==PageTotal==
<br/>
<br/>
1. In order to show page total, go to <span style='color:red'>Report Explorer</span> (default top right box), look for <span style='color:red'>Report</span> then right click on it. <span style='color:red'>Select Insert Band > Page Footer</span>.
1. In order to show page total, go to <span style='color:red'>Report Explorer</span> (default top right box), look for <span style='color:red'>Report</span> then right click on it. <span style='color:red'>Select Insert Band > Page Footer</span>.
Line 29: Line 27:
2. Add 2 labels into this newly created Page Footer side by side at the bottom right.
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
3. Set one of the labels text to '''Page Amount''' and another one blank it


4. Type <span style='color:red'>@PageTotal</span> into the tag properties of that newly created label
4. Type <span style='color:red'>@PageTotal</span> into the tag properties of that newly created label
Line 35: Line 33:


[[File:Tag func1.jpg]]
[[File:Tag func1.jpg]]


5. After inserting the tag, go to <span style='color:red'>Data Binding > Tag > Binding</span>, find from the Invoice Master Field List and choose DocKey.


[[File: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).


[[File:Tag func3.png]]



==BFPageTotal==

<br/>

1. Continue from <span style='color:red'>@PageTotal</span>, 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 <span style='color:red'>@BFPageTotal</span>.


[[File:Tag func4.png]]


4. Similar to the @PageTotal, data bind this label tag to Invoice Master Table DocKey. <span style='color:red'>Data Binding > Tag > Binding</span>


[[File: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.


[[File:Tag func6.png]]


<i><span style='color:red'>Note:</span> For @PageTotal and @BFPageTotal, you can do the total based on label. For example you have a label called <span style='color:red'>xrQty</span> that actually binds to your Quantity field, you can get the Total Quantity by Page by setting the Tag to <span style='color:red'>@PageTotal:xrQty</span></i>


==PrintOnLastPageOnly==
<br/>
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.


[[File:Tag func777.png]]


4. After inserting the tag, go to <span style='color:red'>Data Binding > Tag > Binding</span>, find from the Invoice Master Field List and choose DocKey.


[[File: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.


<i>Page 1 (Multi-page Invoice)</i>

[[File:Tag func9.png]]


<i>Page 2 (Last Page)</i>

[[File:Tag func10.png]]


==PrintOnEveryPageExceptLastPage==
<br/>
1. Continue from the example from <span style='color:red'>@PrintOnLastPageOnly</span>, using the label that used to show “- THE END -”.

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

3. Set the tag properties to <span style='color:red'>@PrintOnEveryPageExceptLastPage</span>.


[[File:Tag func11.png]]


4. Go to <span style='color:red'>Data Binding > Tag > Binding</span>, make sure the binding is on Invoice Master Table DocKey, if not find from the Invoice Master Field List and choose DocKey.


[[File: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.

<i>Page 1 (Multi-page Invoice)</i>

[[File:Tag func12.png]]


<i>Page 2 (Last Page)</i>


[[File:Tag func13.png]]


<i><span style='color:red'>Note:</span> This function can only work in Label and Panel.</i>



By: JS 140919, KM 180309, P180322



{{NavigateForUser}}

[[Category:Users]]

Latest revision as of 08:06, 19 February 2020

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