Record that are blank should not be printed

divyesh10
Member Posts: 71
I have made a report with Purchase invoice line and the code fro the same is
Purch. Inv. Line - OnPreDataItem()
IF AsOnDate = 0D THEN
ERROR(Text50000);
PurchInvLine.SETRANGE(PurchInvLine."Posting Date",010413D,AsOnDate);
PurchInvLine.SETRANGE(PurchInvLine."Purchase Type",PurchaseType);
PurchInvLine.SETRANGE(PurchInvLine."Copy Document Type",PurchInvLine."Copy Document Type"::Invoice);
Purch. Inv. Line - OnAfterGetRecord()
Vendor.RESET;
Vendor.SETRANGE(Vendor."No.","Purch. Inv. Line"."Buy-from Vendor No.");
IF Vendor.FINDFIRST THEN BEGIN
Vendor_Txt :=Vendor.Name;
END;
no :='';
PurchaseLine.RESET;
PurchaseLine.SETRANGE(PurchaseLine."Document No.","Purch. Inv. Line"."Copy Document No.");
PurchaseLine.SETRANGE(PurchaseLine."Line No.","Purch. Inv. Line"."Copy Document Line No.");
IF PurchaseLine.FINDFIRST THEN BEGIN
no :=PurchaseLine."Document No.";
END
the report is printed but i am getting those record whose no is ' '
i want only those record which are having "Document No."<>''
i tried row visibility in report
but no able to get results ]
](*,) ](*,) ](*,) (*,)
Purch. Inv. Line - OnPreDataItem()
IF AsOnDate = 0D THEN
ERROR(Text50000);
PurchInvLine.SETRANGE(PurchInvLine."Posting Date",010413D,AsOnDate);
PurchInvLine.SETRANGE(PurchInvLine."Purchase Type",PurchaseType);
PurchInvLine.SETRANGE(PurchInvLine."Copy Document Type",PurchInvLine."Copy Document Type"::Invoice);
Purch. Inv. Line - OnAfterGetRecord()
Vendor.RESET;
Vendor.SETRANGE(Vendor."No.","Purch. Inv. Line"."Buy-from Vendor No.");
IF Vendor.FINDFIRST THEN BEGIN
Vendor_Txt :=Vendor.Name;
END;
no :='';
PurchaseLine.RESET;
PurchaseLine.SETRANGE(PurchaseLine."Document No.","Purch. Inv. Line"."Copy Document No.");
PurchaseLine.SETRANGE(PurchaseLine."Line No.","Purch. Inv. Line"."Copy Document Line No.");
IF PurchaseLine.FINDFIRST THEN BEGIN
no :=PurchaseLine."Document No.";
END
the report is printed but i am getting those record whose no is ' '
i want only those record which are having "Document No."<>''
i tried row visibility in report
but no able to get results ]
](*,) ](*,) ](*,) (*,)
0
Comments
-
Try CurrReport.SKIP in Dataitem.OnAfterGetRecord trigger or CurrReport.SHOWOUTPUT in section. Or use a filter on PurchInvLine.
By the way, why don't you use a dataitem for PurchInvLine?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