Dear Experts Please suggest me how to add 'total amount field' in bottom for this UDF ;;........................................................................................................................................................................................................ ;;customer receipt ;;........................................................................................................................................................................................................ [Report : Customer Receipt] ;Use : Dsp Template Variables : SV CurrentCompany, SV FromDate, SV ToDate, SV SortMethod, SVBudget, SVVariance Set : SV Sort Method : "Default" Set : Is Day Book : Yes Form: RecCus [Form : RecCus] Use : Dsp Template Height : 100 % Page Width : 100 % Page Part : DSP AccTitles, RecCusBody [Part : RecCusBody] Lines : RCuschqlineh, RCuschqline Repeat : RCusChqline : RCusctvchs Scroll : Vertical Common border: Yes [Line : RCusChqLineh] Fields : RCusFldsl, RCusFldDate, RCusFldhead Right Fields: RCusFldChno, RCusFldAmt, RCusFldPart Local : Field : RCusFldsl : Set as : "Vch No." Local : Field : RCusFldDate : Set as : "Rec. Date" Local : Field : RCusFldDate : Type : String Local : Field : RCusFldhead : Set as : "Amount Received From" Local : Field : RCusFldChno : Set as : "Cheque No." Local : Field : RCusFldAmt : Set as : "Rec. Amount" Local : Field : RCusFldAmt : Type : String Local : Field : RCusFldPart : Set as : "Naration" Local : Field : RCusFldsl : Align : Center Local : Field : RCusFldDate : Align : Center Local : Field : RCusFldhead : Align : Center Local : Field : RCusFldChno : Align : Center Local : Field : RCusFldAmt : Align : Center Local : Field : RCusFldPart : Align : Center Border : thin Top Bottom [Line : RCusChqLine] Fields : RCusFldsl, RCusFldDate, RCusFldhead, Right Fields: RCusFldChno, RCusFldAmt, RCusFldPart, Option : AlterOnEnter : $$IsVoucher AND NOT $IsDeleted Explode : RCusHeadDetail : $$KeyExplode OR ##ExplodeFlag [Field : RCusFldsl] Use : Short Name Field Set as : $VoucherNumber Width : 9 Align : Right Alter : Voucher : $$IsVoucher AND NOT $IsDeleted ;;space Right: 2 Border : Thin Right Align: Center Size: Small [Field : RCusFldDate] Use : Uni Date Field Set as : $Date Border : thin Right width : 10 Size: Small [Field : RCusFldhead] Use : Name field Set as : $Ledgername Width : 40 Border : Thin left Size: Small [Field : RCusFldChno] Use : Name Field Set as : $DueDateOfPymt Width : 12 Align : Center Border : Thin left Size: Small [Field : RCusFldAmt] Use : Amount Field Set as : $$FilterAmtTotal:AllLedgerEntries:RCusChBkEntries:$Amount ;;$Amount space Right : 1 Border : Thin left ;;Inactive: Not @@IsBankLedPresent Size: Small [Field : RCusFldPart] Use : Name Field Set as : $Narration ;;$VoucherChequename Width : 50 Line: 0 Border : Thin left Size: Small [Collection : RCusctvchs] Collection : RCusctvchsgb [Collection : RCusctvchsgb] Type : Vouchers : Group Childof : "Advance Received From Customer" Filter: RCusctvchs [System : Formula] RCusctvchs: $$IsReceipt:$VoucherTypeName ;;and RCusChBkEntries: Not $LedgerName And Not $$IsDr:$Amount [Part : RCusHeadDetail] Line : RCusChqexpln Repeat : RCusChqexpln : AllLedgerEntries Option : small size Part [Line : RCusChqexpln] Fields : RCusFldsle, RCusFldDatee, RCusFldheade Right Fields: RCusFldChnoe, RCusFldAmte, RCusFldParte [Field : RCusFldsle] Use : Short Name Field Set as : "" Width : 9 Align : Right Alter : Voucher : $$IsVoucher AND NOT $IsDeleted ;;space Right: 2 Border : thin Right Size: Small [Field : RCusFldDatee] Use : Uni Date Field Set as : "" Border : thin Right width : 10 Size: Small [Field : RCusFldParte] Use : Name Field Set as : $Narration Width : 50 Line: 0 Size: Small [Field : RCusFldChnoe] Use : Short Name Field Set as : "" Width : 12 Align : Center Border : Thin left Size: Small [Field : RCusFldAmte] Use : Amount Field Set as : $Amount space Right: 1 Border : Thin left Size: Small [Field : RCusFldheade] Use : Name field Set as : $Ledgername Width : 40 Border : Thin left Size: Small
first you kindly define the field that you want to total in the particular part. after you use the function in the field with $$Total:FieldName. definitely you get total. ex:- total:xyzfield $$Total:xyzfild
i can't understand of scope of your program, just i enable your program, it is not working, report shows blank. it is better to upload sample data. one more thing this is not a formula, this is a function. even we regularly used to get total in invoice printing.
Try this [Part : RecBody] Lines : Rchqlineh, Rchqline Bottom Line : MyTotal Repeat : RChqline : Rctvchs Scroll : Vertical Common border : Yes Total : RFldAmt [Line:MyTotal] Use : Rchqline Local : Field : RFldAmt : Set as :$$Total:RFldAmt Local : Field : RFldsl : Set as :"" Local : Field : RFldPart : Set as :"Total" Local : Field : RFldChno : Set as :"" Local : Field : RFldhead : Set as :"" Local : Field : RFldDate : Set as :"" Border:Thin box