Issue in totaling


I am preparing a report with “Vendor Ledger Entry” table. It does the grouping on “Vendor No.” field. The fields which are shown in the body part are Document No.,Document Date, Amount, DueDate which is variable from “Purch Invoice Header” table. I have field called CalculationDate in the request form which takes the date we enter. I have an other variable in the body part of “Vendor Ledger Entry” called OverDueDays which has the value,

OverDueDays := recPIH.“Due Date” - CalulationDate;

The amount field is shown in the GroupFooter for totaling for the respective vendor. I have an other two boolean options in the request form, ShowDueDays which ticked shows only positive values of the OverDueDays variable field and ShowOverDueDays ticked shows negative values. If the boolean option is not ticked the total for the amount field at the GroupFooter is proper. But if it is ticked also its showing the same total.Its not filtering for the positive and negative values. Have used this code at the body part.

IF ShowDueDays THEN
CurrReport.SHOWOUTPUT := OverDueDays > 0;

IF ShowOverDueDays THEN
CurrReport.SHOWOUTPUT := OverDueDays < 0;

Can anyone help me…

Thanks in advance…

How you are calculating Amount total?

Have set the Amount field in TotalFields and have shown it in the GroupFooter of “Vendor Ledger Entry”.

How do it know whether to calculate on ShowDueDays and ShowOverDueDays ?

You need calculate it manually by checking this conditions…


You nee to calculate the Total Amount on the basis of your condition as by just adding in Total field it will not calculate.You need to tweet your code accordingly

We have no other option to do this?

No [:(]