;;Combine/Total Attribute /* This example shows how the Combine/Total attribute works in a Part Definition. It accepts field names like TSPLLedgerOp and TSPLLedgerCl, which are defined in the same Part's Line. This attribute is used to calculate the total or subtotal of those fields. After it is defined, you can access these calculated values anywhere within the Part using the functions $$Total and $$SubTotal. ;;Syntax [Part : ] Combine : or [Part : ] Total : */ [#Menu: Gateway of Tally] Add: Item: "Combine/Total attribute" : Display : TSPL CombineAttribute [Report: TSPL CombineAttribute] Form: TSPL CombineAttribute [Form: TSPL CombineAttribute] Part: TSPL CombineAttribute [Part: TSPL CombineAttribute] Line : TSPL LedgerTitles,TSPL LedgerDetails Bottom Line: TSPL LedgerTotals Repeat : TSPL LedgerDetails : List of Ledgers ;;The line "TSPL LedgerDetails" is repeated over the "List of Ledgers" collection using this CombineAttribute. Scroll : Vertical ;;This attribute allows repeated lines in the Part to be scrolled. Common Border: Yes ;;This attribute allows borders from one line to extend across other lines within the Part. Float : No ;;This attribute when set to 'No' it keeps the Bottom line at the end of the part. Border : Thin Box Total : TSPLLedgerOp, TSPLLedgerCl ;;Total/Combine Attribute will allow the total of the field values that are defined within the same Part. [Line: TSPL LedgerTitles] Field: TSPL LedgerName,TSPL LedgerParent,TSPL LedgerOp,TSPL LedgerCl Local: Field: Default : Type : String Local: Field: Default : Align : Center Local: Field: Default : Style : Normal Bold Local: Field: TSPL LedgerName : Set as: "Ledger Name" Local: Field: TSPL LedgerParent : Set as: "Parent" Local: Field: TSPL LedgerOp : Set as: "Opening Bal" Local: Field: TSPL LedgerCl : Set as: "Closing Bal" Border: Thin Bottom [Line: TSPL LedgerTotals] Field: TSPL LedgerName,TSPL LedgerParent,TSPL LedgerOp,TSPL LedgerCl Local: Field: Default : Style : Normal Bold Local: Field: TSPL LedgerName : Set as: "TOTAL" Local: Field: TSPL LedgerParent : Set as: " " Local: Field: TSPL LedgerOp : Set as: $$Total:TSPLLedgerOp ;;$$Total function will take the field name as parameter & total the field values that are defined within the same Part. Local: Field: TSPL LedgerCl : Set as: $$Total:TSPLLedgerCl ;;$$Total function will take the field name as parameter & total the field values that are defined within the same Part. Border: Totals [Line: TSPL LedgerDetails] Field: TSPL LedgerName,TSPL LedgerParent,TSPL LedgerOp,TSPL LedgerCl Local: Field: Default : Style : Small [Field: TSPL LedgerName] Use : Name Field Set as : $Name ;;Methods are extracted and displayed based on the objects in the collection. Width : 5 Cms Border : Thin Right [Field: TSPL LedgerParent] Use : Name Field Set as : $Parent Width : 4 Cms Border : Thin Right [Field: TSPL LedgerOp] Use : Amount Field Set as : $OpeningBalance Width : 3 Cms Border : Thin Right [Field: TSPL LedgerCl] Use : Amount Field Set as : $ClosingBalance Width : 3 Cms ;;End of File