Help Creating Active Vendor Labels

boku25
Member Posts: 39
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
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
-
Hi,
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?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions