Problem with report....

voodoovoodoo Member Posts: 82
edited 2005-10-27 in Navision Attain

I have some problem with my report(with new one - the old one works great).........well, I have 3 dataitems:

---->Value Entry

The old one gives me SUM of "Sales Amount (Actual)"(Value Entry) grouped by classes.

The new one should be the same but I need also to show data by months:

<labels> class class description jan feb mar .... dec

I tried to put this into OnAfterGetRecord (value Entry) but something is wrong :(

FOR i := 1 TO 12 DO BEGIN
   ValueEntry2 := "Value Entry";
   ValueEntry2.SETRANGE("Posting Date",PeriodStartDate[i],PeriodStartDate[i + 1] - 1);
   IF ValueEntry2.FIND('-') THEN
        SalesAmount[i] := ValueEntry2."Sales Amount (Actual)";
     UNTIL ValueEntry2.NEXT = 0;


ValueEntry2 record Value Entry
PeriodStartDate[13] date
SalesAmount[12] decimal

Thnx in advance :)
misha fka voodoo


  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I don't see a
    ValueEntry2.CALCSUMS("Sales Amount (Actual)");
    to calculate your SumIndexField.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • voodoovoodoo Member Posts: 82
    Well I would try to explain....I think that's not a point in SUM, because, like I said, the old one works great, on OnPreDataItem of Value Entry I put:
    CurrReport.CREATETOTALS("Invoiced Quantity","Sales Amount (Actual)","Discount Amount");
    and in it's property GroupTotalFields: Item No.
    My problem is how can I show "Sales Amount (Actual)" from Value Entry by months(example user may choose a year(enter some four digits(1999......2005) and in the report I would have to show months(by names or by numbers(1..12))
    I hope that you understand what I need.........and sorry for my english ;)
    misha fka voodoo
Sign In or Register to comment.