Record that are blank should not be printed

divyesh10divyesh10 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 ]
](*,) ](*,) ](*,) (*,)

Comments

  • vaprogvaprog Member Posts: 1,141
    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?
Sign In or Register to comment.