Help! Recently I was asked to create an active vendor labels reports that pulls all active vendors using Vendor and Vendor Ledger Entry table. The report uses Post Date to filter for the most current Vendors, and create Labels for our AP Department.
I started by using the (10105)vendor labels report,
Renamed it: Active Vendor Labels
I created 4 global Variables
PostDate (Text)
VendorLedgerEntry (Record) Vendor Ledger Entry
vDateFilter (Text)
I (interger)
OnPreDataItem()
FOR i := 1 TO 5 DO BEGIN
SETRANGE("Date Filter",PostDate,PostDate[i + 1] - 1);
VendLedgerEntry.SETCURRENTKEY("Vendor No.","Posting Date");
vDateFilter := VendLedgerEntry.GETFILTER("Posting Date");
VendLedgerEntry.SETRANGE("Posting Date",PostDate,PostDate[i + 1] - 1);
VendLedgerEntry.SETFILTER("Posting Date",vDateFilter);
But it seems like the filter isn’t working,
Please help..
OnPreReport()
IF PeriodLength = '' THEN
PeriodLength := '1M';
PostDate[1] := 0D;
FOR i := 2 TO 4 DO
PostDate[i + 1] := CALCDATE(PeriodLength,PostDate);
PostDate[6] := 12319999D;
Form is for the user to filter Post date
OnInit()
IF PostDate[2] = 0D THEN
PostDate[2] := WORKDATE;
IF PeriodLength = '' THEN
PeriodLength := '1M';
Please advice..
Help Help
0
Comments
You are overwritting
VendLedgerEntry.SETRANGE("Posting Date",PostDate,PostDate[i + 1] - 1);
with
VendLedgerEntry.SETFILTER("Posting Date",vDateFilter);
I don't see and END statement but assume it is there.
Are you only trying to create labels for vendors with > ZERO Balances?