;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* Objective(s) - This program illustrates the use of following attributes of Report Family Copies Export Empty Fields Export Header fetch Collection Form Keep XML Case Print Output Pre Config Report Plain JSON/Plain XML Pre Load Control Print Set Set Stripe Title */ [#Menu: Gateway of Tally] Add: Item: ($$LocaleString:"All Customer Report") : Display: TSPL CustomerDetails [Report: TSPL CustomerDetails] Form : TSPL CustomerDetails Title : "Company Ledger List" Copies : 3 Export Empty Fields : Yes Export Header : "content-type:application/json" Keep Xml Case : Yes Plain JSON : Yes Family : "Custom Ledger Report" Stripe : No ;; Fetch Collection is used if same collection is referred multiple times in this ;; Report to avoid multiple requests to the Server. However, we have used it here ;; though it is a single request only Fetch Collection : TSPL CustomerLedegerDetails ;;Variable is used to display Title of the Report. The value is Set using Set attribute and ;;overriden by Print Set attribute fro print/export/email mode Variable : vReportTitle: String Title : ##vReportTitle Set : vReportTitle : $$LocaleString:"Custom Ledger Report" PrintSet : vReportTitle : $$LocaleString:"Customer Details" ;;Only When access to report is allowed in security control user roles report opens. else the following message is displayed PreLoadControl : NOT($$Allow:Display:CustomLedgerReport) : "No permission to display this report!" ;;Config report that comes before the report is printed Print : TSPL Print Landing Page ;; Pre config report that comes before config report for user input Output Pre Config Report : Output Action Info : @@ShowOutputConfig [Form: TSPL CustomerDetails] Parts : TSPL CustomerDetails Width : 100% Screen Height : 100% Screen [Part: TSPL CustomerDetails] Lines : TSPL CustomerDetailsTitle,TSPL CustomerDetails Repeat : TSPL CustomerDetails : TSPL CustomerLedegerDetails CommonBorder: Yes Scroll : Vertical JSON Tag As Desc Name : No [Line: TSPL CustomerDetailsTitle] Fields : TSPL Customer Ledger No, TSPL Customer Ledger Name, TSPL Customer Ledger Address, TSPL Customer Ledger States, TSPL Customer Ledger Pin, TSPL Customer Ledger Cont, TSPL Customer Ledger Tel, TSPL Customer Ledger FaxNo, TSPL Customer Ledger EmailAdd, TSPL Customer Ledger CB Repeat : TSPL Customer Ledger CB Local : Field: Default: Delete: Type ;; The Type attribute is locally deleted from all fields within this line context Local : Field: Default: Delete: JSONTag Local : Field: Default: Delete: Border Local : Field: Default: Add:Pre Printed : Yes ;; When printed on pre printed paper values corresponding to the fields will be ignored Local : Field: TSPL Customer Ledger No : Add:Info: $$LocaleString:"No." ;; Info is added to the mentioned fields in the context of this line Local : Field: TSPL Customer Ledger Name : Add:Info: $$LocaleString:"Name" Local : Field: TSPL Customer Ledger Address : Add:Info: $$LocaleString:"Address" Local : Field: TSPL Customer Ledger States : Add:Info: $$LocaleString:"State" Local : Field: TSPL Customer Ledger Pin : Add:Info: $$LocaleString:"Pincode" Local : Field: TSPL Customer Ledger Cont : Add:Info: $$LocaleString:"Contact" Local : Field: TSPL Customer Ledger Tel : Add:Info: $$LocaleString:"Tel. No." Local : Field: TSPL Customer Ledger FaxNo : Add:Info: $$LocaleString:"Fax No." Local : Field: TSPL Customer Ledger EmailAdd : Add:Info: $$LocaleString:"Email" Local : Field: TSPL Customer Ledger CB : Add:Info: $$LocaleString:"Cl. Balance(in thousands)" Local : Field: TSPL Customer Ledger CB : Add:Lines: 2 Border : Thin Bottom [Line: TSPL CustomerDetails] Fields : TSPL Customer Ledger No, TSPL Customer Ledger Name, TSPL Customer Ledger Address, TSPL Customer Ledger States, TSPL Customer Ledger Pin, TSPL Customer Ledger Cont, TSPL Customer Ledger Tel, TSPL Customer Ledger FaxNo, TSPL Customer Ledger EmailAdd, TSPL Customer Ledger CB JSONTag : "Customer Details" Repeat : TSPL Customer Ledger CB Local : Field: Default: Pre Printed Border: Yes ;; When printed on pre printed paper border corresponding to the fields will be ignored [Field: TSPL Customer Ledger No] Set as : $$Line Width : 3 Align : Centre Border : Thin Right Alter : Ledger ;; When user presses ctrl+enter on any line, corresponding ledger alteration screen is opened Skip Cell : Yes ;;This field value will not be printed in the excel export JSONTag : "Customer No." Fixed : Yes ;;This field remains fixed and cursor doesnt scroll through it [Field: TSPL Customer Ledger Name] Use : Name Field Set as : $Name Variable : Ledger Name ;;Field value is held in this variable to be used in the ledger voucher drilldown report Display : Ledger Vouchers ;;Report showing vouchers of the drilled down ledger is opened Border : Thin Right Quick Search: Yes ;;line cursor moves to the ledger name corresponding to the chracter typed Cell : 2 ;;Field value occupies 2 cells in excel export JSONTag : "Customer Name" ;;This will be the tag corresponding to the field in JSON and XML export of the report XML Attr : "TYPE":"Name" ;;This will be exported as xml attribute along with the tag of the field [Field: TSPL Customer Ledger Address] Set as : $STPartyFullAdd Width : 30 Lines : 0 Border : Thin Right JSONTag : "Customer Address" Scroll : Yes ;;From this field onwards the fields scroll to the next page [Field: TSPL Customer Ledger States] Set as : $StateName Width : 10 Border : Thin Right JSONTag : "Customer State" [Field: TSPL Customer Ledger Pin] Set as : $PinCode Width : 10 Border : Thin Right JSONTag : "Customer Pin" [Field: TSPL Customer Ledger Cont] Set as : $LedgerContact Width : 10 Border : Thin Right JSONTag : "Customer Contact" [Field: TSPL Customer Ledger Tel] Set as : $LedgerPhone Width : 10 Border : Thin Right JSONTag : "Customer Phone" [Field: TSPL Customer Ledger FaxNo] Set as : $LedgerFax Width : 10 Border : Thin Right JSONTag : "Customer Fax" [Field: TSPL Customer Ledger EmailAdd] Set as : $Email Width : 20 Border : Thin Right JSONTag : "Customer Email" [Field: TSPL Customer Ledger CB] Use : Amount Field Set as : $ClosingBalance Scale : Thousands ;; The Amount values are shown will scale factor Thousands DMPMode : Bold ;; Sets the printing style of the field to bold when its printing in dot matrix printer JSONTag : "Customer Closing Balance" [Collection: TSPL CustomerLedegerDetails] Type : Ledger Fetch : Name, STPartyFullAdd, StateName, Pincode, LedgerContact, LedgerPhone, LedgerFax, Email, ClosingBalance Filter : TSPLCustomerFilter [System: Formula] TSPLCustomerFilter: $$IsLedOfGrp:$Name:$$GroupSundryCreditors OR $$IsLedOfGrp:$Name:$$GroupSundryDebtors TSPL OutputAction : If ($$InPrintAction AND NOT $$InExportAction) Then "Printing Ledger Report" + Else If ($$InExportAction OR $$InUploadAction) Then "Exporting Ledger Report" + Else If $$InMailAction Then "E-Mailing Ledger Report" + Else iF $$InWhatsAppAction Then @@locWhatsAppAction Else $$LocaleString:"Output" [Report: TSPL Print Landing Page] Use : SV Output Medium Form: SV Output Medium Local: Part: SV Output Title Info : Local: Field: Left Subtitle : Set as: @@TSPLOutputAction ;;EOF