OBJECT Report 50078 testingSummary { OBJECT-PROPERTIES { Date=26/11/07; Time=20:35:55; Modified=Yes; Version List=; } PROPERTIES { } DATAITEMS { { PROPERTIES { DataItemTable=Table18; DataItemTableView=SORTING(No.); } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18150; SectionHeight=2538; } CONTROLS { { 1000000001;Label ;0 ;0 ;7500 ;423 ;FontSize=8; FontBold=Yes; CaptionML=ENU=Cust. Ledger Entry } { 1000000003;TextBox;0 ;423 ;7500 ;423 ;SourceExpr=COMPANYNAME } { 1000000002;TextBox;14850;0 ;3150 ;423 ;HorzAlign=Right; SourceExpr=FORMAT(TODAY,0,4) } { 1000000004;TextBox;17550;423 ;450 ;423 ;CaptionML=ENU=Page; SourceExpr=CurrReport.PAGENO } { 1000000005;Label ;16800;423 ;750 ;423 ;ParentControl=1000000004 } { 1000000006;TextBox;15750;846 ;2250 ;423 ;HorzAlign=Right; SourceExpr=USERID } { 1000000012;Label ;150 ;1269 ;2700 ;846 ;ParentControl=1000000011; VertAlign=Bottom; FontSize=8; FontBold=Yes; MultiLine=Yes } { 1000000009;Label ;5850 ;1269 ;1500 ;846 ;HorzAlign=Right; VertAlign=Bottom; FontSize=8; FontBold=Yes; CaptionML=ENU=Payment } { 1000000018;Label ;8700 ;1269 ;1800 ;846 ;HorzAlign=Center; VertAlign=Bottom; FontSize=8; FontBold=Yes; MultiLine=Yes; CaptionML=ENU=Interest } { 1000000023;Label ;11250;1269 ;1950 ;846 ;VertAlign=Bottom; FontSize=8; FontBold=Yes; CaptionML=ENU="Principal " } { 1000000007;Label ;13650;1269 ;1500 ;846 ;HorzAlign=Right; VertAlign=Bottom; FontSize=8; FontBold=Yes; CaptionML=ENU=Balance } } } { PROPERTIES { SectionType=Body; SectionWidth=18150; SectionHeight=0; } CONTROLS { } } { PROPERTIES { SectionType=Footer; PlaceInBottom=No; SectionWidth=18150; SectionHeight=1269; } CONTROLS { { 1000000010;TextBox;8250 ;0 ;2700 ;423 ;HorzAlign=Center; FontSize=9; FontBold=Yes; SourceExpr=GTotAmount } { 1000000013;TextBox;10950;0 ;2700 ;423 ;HorzAlign=Center; FontSize=9; FontBold=Yes; SourceExpr=GTotPrincipal } { 1000000014;TextBox;13800;0 ;2550 ;423 ;HorzAlign=Center; FontSize=9; FontBold=Yes; SourceExpr=GTotCustBal1 } { 1000000015;Label ;0 ;0 ;2250 ;423 ;FontSize=9; FontBold=Yes; CaptionML=ENU=Total } { 1000000008;TextBox;5550 ;0 ;2400 ;423 ;HorzAlign=Center; FontSize=9; FontBold=Yes; SourceExpr=GTPyment } { 1000000017;TextBox;5550 ;846 ;2550 ;423 ;HorzAlign=Center; FontSize=10; FontBold=Yes; SourceExpr=GTPymentLCY } { 1000000019;TextBox;8250 ;846 ;2700 ;423 ;HorzAlign=Center; FontSize=10; FontBold=Yes; SourceExpr=GTotAmountLCY } { 1000000020;TextBox;10950;846 ;2700 ;423 ;HorzAlign=Center; FontSize=10; FontBold=Yes; SourceExpr=GTotPrincipalLCY } { 1000000024;TextBox;13800;846 ;2700 ;423 ;HorzAlign=Center; FontSize=10; FontBold=Yes; SourceExpr=GTotCustBal1LCY } { 1000000025;Label ;0 ;846 ;3000 ;423 ;FontSize=10; FontBold=Yes; CaptionML=ENU=Total ( LCY) } } } } } { PROPERTIES { DataItemIndent=1; DataItemTable=Table21; DataItemTableView=SORTING(Customer No.,Posting Date,Currency Code) ORDER(Ascending) WHERE(Document Type=FILTER(Finance Charge Memo|Payment), Reversed=CONST(No)); NewPagePerRecord=No; OnPreDataItem=BEGIN LastFieldNo := FIELDNO("Customer No."); END; OnAfterGetRecord=BEGIN GTPyment := 0; GTotAmount := 0; GTotPrincipal := 0; GTotCustBal1 :=0; TotalCustBal := "Detailed Cust. Ledg. Entry"."Amount (LCY)"; CustBal1 := "Cust. Ledger Entry". Amount; TotCustBal1 += CustBal1; IF "Document Type"="Document Type"::Payment THEN BEGIN Pyment:= Amount; Amount := 0; END ELSE IF "Document Type"="Document Type"::"Finance Charge Memo" THEN BEGIN Pyment:= 0; END; Principal :=Pyment- Amount; TPyment += Pyment; TotAmount += Amount-"Cust. Ledger Entry"."Remaining Amount"; TotPrincipal += Principal; GTPyment := TPyment; GTotAmount += TotAmount; GTotPrincipal += TotPrincipal ; GTotCustBal1 += TotCustBal1; Currency.InitRoundingPrecision; IF "Currency Code" <> '' THEN GTPymentLCY := ROUND( CurrExchRate.ExchangeAmtFCYToLCY( "Posting Date","Currency Code", GTPyment,CurrExchRate.ExchangeRate("Posting Date","Currency Code")), Currency."Amount Rounding Precision") ELSE GTPymentLCY := ROUND(GTPyment,Currency."Amount Rounding Precision"); Currency.InitRoundingPrecision; IF "Currency Code" <> '' THEN GTotAmountLCY := ROUND( CurrExchRate.ExchangeAmtFCYToLCY( "Posting Date","Currency Code", GTotAmount,CurrExchRate.ExchangeRate("Posting Date","Currency Code")), Currency."Amount Rounding Precision") ELSE GTotAmountLCY := ROUND(GTotAmount,Currency."Amount Rounding Precision"); Currency.InitRoundingPrecision; IF "Currency Code" <> '' THEN GTotPrincipalLCY := ROUND( CurrExchRate.ExchangeAmtFCYToLCY( "Posting Date","Currency Code", GTotPrincipal,CurrExchRate.ExchangeRate("Posting Date","Currency Code")), Currency."Amount Rounding Precision") ELSE GTotPrincipalLCY := ROUND(GTotPrincipal,Currency."Amount Rounding Precision"); Currency.InitRoundingPrecision; IF "Currency Code" <> '' THEN GTotCustBal1LCY := ROUND( CurrExchRate.ExchangeAmtFCYToLCY( "Posting Date","Currency Code", GTotCustBal1,CurrExchRate.ExchangeRate("Posting Date","Currency Code")), Currency."Amount Rounding Precision") ELSE GTotCustBal1LCY := ROUND(GTotCustBal1,Currency."Amount Rounding Precision"); END; ReqFilterFields=Customer No.; CalcFields=Amount; DataItemLink=Customer No.=FIELD(No.), Posting Date=FIELD(Date Filter); } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=No; SectionWidth=18150; SectionHeight=0; } CONTROLS { } } { PROPERTIES { SectionType=Body; SectionWidth=18150; SectionHeight=0; } CONTROLS { } } { PROPERTIES { SectionType=Footer; PrintOnEveryPage=No; PlaceInBottom=No; SectionWidth=18150; SectionHeight=846; } CONTROLS { { 1000000016;TextBox;8850 ;0 ;1500 ;423 ;HorzAlign=Center; SourceExpr=TotAmount } { 1000000021;TextBox;5850 ;0 ;1500 ;423 ;SourceExpr=TPyment } { 1000000022;TextBox;11250;0 ;1500 ;423 ;SourceExpr=TotPrincipal } { 1000000011;TextBox;0 ;0 ;1500 ;423 ;HorzAlign=Left; SourceExpr="Customer No." } { 1000000000;TextBox;13800;0 ;1500 ;423 ;SourceExpr=TotCustBal1 } { 1000000026;TextBox;16200;0 ;1500 ;423 ;SourceExpr="Cust. Ledger Entry"."Remaining Amount" } } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR LastFieldNo@1000000000 : Integer; FooterPrinted@1000000001 : Boolean; TotalFor@1000000002 : TextConst 'ENU="Total for "'; TotalCustBal@1000000003 : Decimal; CustBal1@1000000004 : Decimal; TotCustBal1@1000000005 : Decimal; "Detailed Cust. Ledg. Entry"@1000000006 : Record 379; Pyment@1000000007 : Decimal; Principal@1000000008 : Decimal; GTotCustBal1@1000000009 : Decimal; TPyment@1000000010 : Decimal; TotAmount@1000000011 : Decimal; TotPrincipal@1000000012 : Decimal; GTPyment@1000000013 : Decimal; GTotAmount@1000000014 : Decimal; GTotPrincipal@1000000015 : Decimal; Currency@1000000020 : Record 4; CurrExchRate@1000000019 : Record 330; AmountLCY@1000000018 : Decimal; AmountFCY@1000000017 : Decimal; InitMonth@1000000016 : Integer; GTPymentLCY@1000000021 : Decimal; GTotAmountLCY@1000000022 : Decimal; GTotPrincipalLCY@1000000023 : Decimal; GTotCustBal1LCY@1000000024 : Decimal; AmtPaid@1000000025 : Decimal; BEGIN END. } }Can somebody help please?
Comments
Download the fob here:
http://savatage99.googlepages.com/50081 ... Report.fob
or read the text (I suggest the fob)
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks once again.
The
finance charge paid = Total finance charge - remaining Amount.
Principal paid = total payment - finance charge paid
also the finance charge memo should all appear under the finance charge column,all payments under the payment column and all Principal paid under the principal paid column.
these are some of the things the report is lacking. If this is solved its gona be a perfect report. You may look at the report again to see how this can be fixed. It also considers application of payments first to Finance charges and if all the finance charges are cleared by the payment and the amount not finished then its goes on to be applied on the Opening Balance.
I will be glade if someone can help on this. I am still trying to fix this but not luck yet.
Thanks
http://savatage99.googlepages.com/50081 ... eport2.fob
I'm not exactly sure what you are shooting for but this new report - breaks up almost everything. Use the fields you want & you can view the code behind it to see how it works.
good luck
http://www.BiloBeauty.com
http://www.autismspeaks.org