;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* - This program illustrates the use of following attributes of Line Border Combine Explode Indent Field Key Local Use Repeat Page Break Next Page About Program - This program displays stockitem details and illustrates following xml and json output - XML Output Item1 -2.00 2 nos -249 nos - JSON Output { "Stock Item Details": [ { "Stock Item": "Item1", "Closing Value": -2.00, "Stock Balances": { "Stock Opening Balance": "2 nos", "Stock Closing Balance": "-249 nos" } } ] } */ [#Menu: Gateway of Tally] Add: Item: ($$LocaleString:"StockItem Details"): Display: TSPL Stock Rep [Report: TSPL Stock Rep] Form : TSPL Stock Rep Title : ($$LocaleString:"StockItem Details") [Form: TSPL Stock Rep] Parts : TSPL Stock Rep Width : 100% Screen Height : 100% Screen [Part: TSPL Stock Rep] Lines : TSPL Stock Rep Title, TSPL Stock Rep Details Repeat : TSPL Stock Rep Details : TSPL Stock Coll Scroll : Vertical CommonBorder: Yes JSON Tag As Desc Name: No [Line: TSPL Stock Rep Title] Fields : TSPL Stock Rep Name Right Field : TSPL Stock Closing Val Local : Field : Default : Type : String Local : Field : Default : Align : Center Local : Field : TSPL Stock Rep Name : Set as : $$LocaleString:"Particulars" Local : Field : TSPL Stock Rep Name : Widespaced: Yes Local : Field : TSPL Stock Closing Val : Set as : $$LocaleString:"Closing Balance" ;; Border is drawn on the top and bottom of the line Border : Thin Top Bottom ;; This line and its border is assumed to be pre printed if pre printed option in selected in print config Pre Printed : Yes Pre Printed Border: Yes [Line: TSPL Stock Rep Details] Fields : TSPL Stock Rep Name Right Field : TSPL Stock Closing Val Explode : TSPL Stock Bal ;; This is the JSONTag of the line in JSON output of the report JSONTag : "Stock Item Details" ;; The given value appears as XML attribute along with the XML Tag of the Line in XML Output of the Report XMLAttr : "Type": "Amount" [Field: TSPL Stock Rep Name] Use : Name Field Set as : $Name JSONTag : "Stock Item" [Field: TSPL Stock Closing Val] Use : Amount Field Set as : $ClosingValue Format : "NoZero, DrCr" Border : Thin Left JSONTag : "Closing Value" [Part: TSPL Stock Bal] Line : TSPL Stock CB JSONTag : "Stock Balances" [Line: TSPL Stock CB] Field : TSPL Stock OB, TSPL Stock CB ;; The corresponding json tag(the description name as json tag attribute not specified) of this line will ;; not appear in the JSON output of the report JSON Tag As Desc Name: No [Field: TSPL Stock OB] Use : Qty Primary Field Set as : $OpeningBalance JSONTag : "Stock Opening Balance" [Field: TSPL Stock CB] Use : Qty Primary Field Set as : $ClosingBalance JSONTag : "Stock Closing Balance" [Collection: TSPL Stock Coll] Type : StockItem Fetch : Name, Closing Balance, Closing Value ;;End Of File