After completing this chapter my there is my self attempt also. Please take a bird view:
——————-
;; Author: Ozair Ahmad, Cell: 7007427343
;; Date: 16-11-2021, E-Mail: blissghazal@gmail.com
;; Tdl for
;;;******** Part ‘Sales Report’ is defined here for
;;;******** displaying my custom sales report
[Part: My Sales Part]
Line : My Sales Column Titles, My Sales Line
Repeat : My Sales Line: MySalesColl ;;We are using only this collection apart from the agg. UDF/AllInventoryEntries
Scroll : Vertical
;;;******** Line ‘My Sales Column Titles’ is defined here for setting the title
[Line: My Sales Column Titles]
;Field: Name Field,NameField101,NameField102,NameField103
Use : My Sales Line
Local: Field: MySrNo : Info : “Sr.No.”
Local: Field: MyDate : Info : “Date”
Local: Field: MyInvoice : Info : “Invoice No.”
Local: Field: MyVchPartyName : Info : “Party”
Local: Field: VchItemName : Info : “Item Name”
Local: Field: MyVchQty : Info : “Billed Qty”
Local: Field: MyVchRate : Info : “Rate”
Local: Field: MySalesVchAmount: Info : “Amount”
Local: Field: MySalesVchAmount: Style: Amt Style
Local: Field: Default : Type : String
Local: Field: Default : Color: Red
Local: Field: Default : Style: My New Style
Height : 1.25
Space Top : 0.75
Space Bottom: 0.75
Border : Column Titles
[Style: My New Style]
Font : “Helvetica”
Height : 16
[Style: Amt Style]
Font : “Arial”
Height : 16
[Variable: MyLine]
Variable:L1: Number:#MySrNo
;;;******** Line ‘My Sales Line’ is defined here for setting data in fields
[Line: My Sales Line]
Left Field : MySrNo,MyDate,MyInvoice,MyVchPartyName,VchItemName
Right Field : MyVchQty,MyVchRate,MySalesVchAmount
Space Top : 0.15
Space Bottom : 0.15
Explode: TestExplodePart: ($$KeyExplode or ##ExplodeFlag)
;;************************** Exploded Part **************************;;
[Part: Test Explode Part] ;;Exploded Part
Line: Explode My Line
Repeat: ExplodeMyLine: AllInventoryEntries
;;Below Lines belongs to the Explode Part
[Line: Explode My Line]
;;’My Sales Line’ fiedl is defined here as locally
;; and now these fields bind with ‘Explode My Line’
Field: MySrNo,MyDate,MyInvoice,MyVchPartyName,VchItemName
Local:Field: MySrNo: Type: String ;;Locally defined as string to avoid zero
Local:Field: MySrNo: Set as:””
Local:Field: MyDate: Set as:””
Local:Field: MyInvoice: Type: String ;;Locally defined as string to avoid zero
Local:Field: MyInvoice: Set as:””
;;************** Repeated body line fields **************;;
[Field: MySrNo]
Use : Number Field
;;œ Below line generates line number automatically
Set as : $$Line ;; To generate line number automatically
Style : Normal
Variable: MyLine:$$Line
[Field: My Date]
Use : Short Date Field
;;œ Below line ‘$MyDate’ retrieves method value of the Voucher Object
Set as : $Date ;; To access the Date of the Voucher Object
Style : Normal
[Field: My Invoice]
Use : Number Field ;Qty Primary Field
;;œ Below line ‘$VchNo’ retrieves method value of the Voucher Object
Set as : $VoucherNumber ;; To access the VoucherNumber of the Voucher Object
Style : Normal
[Field: My Vch Party Name]
Use : Name Title Field
;;œ Below line ‘$MyName’ retrieves method value of the Voucher Object
;; To access the LedgerName of the Voucher Object
Set as : $PartyLedgerName;”This global field value”;$LedgerName
Style : Normal
[Field: Vch Item Name]
Use : Name Title Field
;;œ Below line ‘$MyItem’ retrieves method value of the Voucher Object
Set as : $StockItemName ;; To access the StockItemName of the Voucher Object
Style : Normal
Display : Item Monthly Summary
;Variable ‘StockItemName’ retains the Item selected by the user for the subsequent report
Variable: StockitemName
[Field: My Vch Qty]
Use : Qty Primary Field
;;œ Below line ‘$MyQty’ retrieves method value of the Voucher Object
Set as : $BilledQty ;; To access the Qty of the Voucher Object
Style : Normal
[Field: My Vch Rate]
Use : Rate Field
;;œ Below line ‘$SRate’ retrieves method value of the Voucher Object
Set as : $Rate;$SRate ;$Amt/$MyQty ;; To access the Rate of the Voucher Object
Style : Normal
[Field: My Sales Vch Amount]
Use : Amount Field
;;œ Below line ‘$Amt’ retrieves method value of the Voucher Object
Set as : $Amt ;; To access the Amount of the Voucher Object
Style : Normal
;;************** Repeated body line fields ends **************;;
;;;******** Collection ‘My Sales Coll’ is defined for fetching out
;;;******** Company’s Sales Voucher Entries line by line upto end
[Collection: My Sales Coll]
Type : Vouchers: VoucherType
Child of : $$VchTypeSales
Belongs to : Yes
Fetch : Rate,BilledQty,LedgerEntries,VoucherNumber,MasterID,Date,+
VoucherTypeName,Rate,PartyLedgerName,BasicPurchaseOrderNo,Amount
/*
[Collection: My New Sales Collection]
Source Collection: MySalesColl
Walk : LedgerEntries,;InventoryEntries
By : MyDate: $Date
By : VchNo : $VoucherNumber
By : MyName: $PartyLedgerName
By : MyItem: $StockItemName
Please post your codes in Dropbox and also post a screen shot of the report/output result in Dropbox in your student folder so that I can have a review of the same.
I read this chapter many time specially last section. It is designed very intelligently. Very nice Rana Sir.
After completing this chapter my there is my self attempt also. Please take a bird view:
——————-
;; Author: Ozair Ahmad, Cell: 7007427343
;; Date: 16-11-2021, E-Mail: blissghazal@gmail.com
;; Tdl for
[#Menu: Gateway of Tally]
Add: Item: Custom Sales Report:Display: Sales Item Report
[Report: Sales Item Report]
Form: Sales Report
[Form: Sales Report]
Part : My Sales Part
Use : DSP Template
;Button: Change Period,Export Button,ExplodeFlag
Height : 100% Page
Width : 100% Page
Background: MyFormBG
[Color: My Form BG]
RGB: 250,220,220
;;;******** Part ‘Sales Report’ is defined here for
;;;******** displaying my custom sales report
[Part: My Sales Part]
Line : My Sales Column Titles, My Sales Line
Repeat : My Sales Line: MySalesColl ;;We are using only this collection apart from the agg. UDF/AllInventoryEntries
Scroll : Vertical
;;;******** Line ‘My Sales Column Titles’ is defined here for setting the title
[Line: My Sales Column Titles]
;Field: Name Field,NameField101,NameField102,NameField103
Use : My Sales Line
Local: Field: MySrNo : Info : “Sr.No.”
Local: Field: MyDate : Info : “Date”
Local: Field: MyInvoice : Info : “Invoice No.”
Local: Field: MyVchPartyName : Info : “Party”
Local: Field: VchItemName : Info : “Item Name”
Local: Field: MyVchQty : Info : “Billed Qty”
Local: Field: MyVchRate : Info : “Rate”
Local: Field: MySalesVchAmount: Info : “Amount”
Local: Field: MySalesVchAmount: Style: Amt Style
Local: Field: Default : Type : String
Local: Field: Default : Color: Red
Local: Field: Default : Style: My New Style
Height : 1.25
Space Top : 0.75
Space Bottom: 0.75
Border : Column Titles
[Style: My New Style]
Font : “Helvetica”
Height : 16
[Style: Amt Style]
Font : “Arial”
Height : 16
[Variable: MyLine]
Variable:L1: Number:#MySrNo
;;;******** Line ‘My Sales Line’ is defined here for setting data in fields
[Line: My Sales Line]
Left Field : MySrNo,MyDate,MyInvoice,MyVchPartyName,VchItemName
Right Field : MyVchQty,MyVchRate,MySalesVchAmount
Space Top : 0.15
Space Bottom : 0.15
Explode: TestExplodePart: ($$KeyExplode or ##ExplodeFlag)
;;************************** Exploded Part **************************;;
[Part: Test Explode Part] ;;Exploded Part
Line: Explode My Line
Repeat: ExplodeMyLine: AllInventoryEntries
;;Below Lines belongs to the Explode Part
[Line: Explode My Line]
;;’My Sales Line’ fiedl is defined here as locally
;; and now these fields bind with ‘Explode My Line’
Field: MySrNo,MyDate,MyInvoice,MyVchPartyName,VchItemName
Local:Field: MySrNo: Type: String ;;Locally defined as string to avoid zero
Local:Field: MySrNo: Set as:””
Local:Field: MyDate: Set as:””
Local:Field: MyInvoice: Type: String ;;Locally defined as string to avoid zero
Local:Field: MyInvoice: Set as:””
Local:Field: MyVchPartyName: Set as:””
Local:Field: VchItemName: Type: String
Local:Field: VchItemName: Set as:$$LocaleString:$$Line+”. “+$StockitemName
Local:Field: VchItemName:Variable: $StockitemName
Local:Field: Default: Color: Blue
Local:Field: Default: Style: Normal Bold
;;*******************************************************************
;;************** Repeated body line fields **************;;
[Field: MySrNo]
Use : Number Field
;;œ Below line generates line number automatically
Set as : $$Line ;; To generate line number automatically
Style : Normal
Variable: MyLine:$$Line
[Field: My Date]
Use : Short Date Field
;;œ Below line ‘$MyDate’ retrieves method value of the Voucher Object
Set as : $Date ;; To access the Date of the Voucher Object
Style : Normal
[Field: My Invoice]
Use : Number Field ;Qty Primary Field
;;œ Below line ‘$VchNo’ retrieves method value of the Voucher Object
Set as : $VoucherNumber ;; To access the VoucherNumber of the Voucher Object
Style : Normal
[Field: My Vch Party Name]
Use : Name Title Field
;;œ Below line ‘$MyName’ retrieves method value of the Voucher Object
;; To access the LedgerName of the Voucher Object
Set as : $PartyLedgerName;”This global field value”;$LedgerName
Style : Normal
[Field: Vch Item Name]
Use : Name Title Field
;;œ Below line ‘$MyItem’ retrieves method value of the Voucher Object
Set as : $StockItemName ;; To access the StockItemName of the Voucher Object
Style : Normal
Display : Item Monthly Summary
;Variable ‘StockItemName’ retains the Item selected by the user for the subsequent report
Variable: StockitemName
[Field: My Vch Qty]
Use : Qty Primary Field
;;œ Below line ‘$MyQty’ retrieves method value of the Voucher Object
Set as : $BilledQty ;; To access the Qty of the Voucher Object
Style : Normal
[Field: My Vch Rate]
Use : Rate Field
;;œ Below line ‘$SRate’ retrieves method value of the Voucher Object
Set as : $Rate;$SRate ;$Amt/$MyQty ;; To access the Rate of the Voucher Object
Style : Normal
[Field: My Sales Vch Amount]
Use : Amount Field
;;œ Below line ‘$Amt’ retrieves method value of the Voucher Object
Set as : $Amt ;; To access the Amount of the Voucher Object
Style : Normal
;;************** Repeated body line fields ends **************;;
;;;******** Collection ‘My Sales Coll’ is defined for fetching out
;;;******** Company’s Sales Voucher Entries line by line upto end
[Collection: My Sales Coll]
Type : Vouchers: VoucherType
Child of : $$VchTypeSales
Belongs to : Yes
Fetch : Rate,BilledQty,LedgerEntries,VoucherNumber,MasterID,Date,+
VoucherTypeName,Rate,PartyLedgerName,BasicPurchaseOrderNo,Amount
/*
[Collection: My New Sales Collection]
Source Collection: MySalesColl
Walk : LedgerEntries,;InventoryEntries
By : MyDate: $Date
By : VchNo : $VoucherNumber
By : MyName: $PartyLedgerName
By : MyItem: $StockItemName
Compute : MyQty : $BilledQty
Compute : SRate : $Rate
Compute : Amt : $Amount
Please post your codes in Dropbox and also post a screen shot of the report/output result in Dropbox in your student folder so that I can have a review of the same.