Item list - last entry from Value Entry

Hey,

I have problem with a report that generates an item list. I need the latest Posting Date for Purchase from the Value Entry.

This is what I have so far:

DataItem

Item

_Integer

Integer - OnPreDataItem

RecVE.SETRANGE(“Item No.”,Item.“No.”);

RecVE.SETRANGE(“Item Ledger Entry Type”,0);

RecVE.SETRANGE(“Entry Type”,0);

IF RecVE.FINDLAST THEN BEGIN

Buchungsdatum := RecVE.“Posting Date”;

SOP := TRUE;

END ELSE BEGIN;

SOP := FALSE;

END;

Instead of showing me:ART001 25.07.08ART002 01.04.07It shows a hundred pages of:ART001 25.07.08ART001 25.07.08ART001 25.07.08

What am I missing? Any help appreciated!

/Sandra

Oh, the output looks strange.

I want it to show:

ART001 25.07.08

ART002 01.04.08

But it shows a hundred pages of:

ART001 25.07.08

ART001 25.07.08.