Options

don't want to print the undo transaction record

Hi all,

i am having trouble when i want to print the document. when it has the undo record, the system just print all of it , right ? do anyone know how to print only NON-undo lines?

for example
line 1 Qty 100
line 2 Qty -100
line 3 Qty 20

print only line 3.

many thanks,

Best Answer

Answers

  • Options
    AntidotEAntidotE Member Posts: 61
    edited 2016-04-08
    This is area of data gathering.
    You may firstly generate records and then delete the ones which are opposite to each other or whatsoever.
    It is much harder to maintain dataset filtering on printing stage.

    concerning your example one of possible solutions should be with several dataitems:
    headerrec
      integerrec

    on header section, add code to fill temporary records, kind of this:
    headerrec.onaftergetrecord
    templinesrec.deleteall;
    linesrec.setrange(docno,headerrec."no.");
    if linesrec.findset then repeat
      currentsum += linesrec.qty;
      if currentsum = 0 then       //<==== kind of main check
        templinesrec.deleteall     //<==== result of check
      else begin
        templinesrec := linesrec;
        templinesrec.insert;
      end;
    until linesrec.next=0;
    
    integerrec.onpredataitem
    integerrec.setrange(number,1,templinesrec.count)
    
    integerrec.onaftergetrecord
    if integerrec.number >1 then
      templinesrec.next
    else
      templinesrec.findfirst;
    
    It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.
  • Options
    vijay_gvijay_g Member Posts: 884
    edited 2016-05-04
    Document undo lines are already hide based on the check "Show Correction Lines" set false in the request page of standard report.
  • Options
    Hi @vijay_g : i dont see that on request page, and what happen if that report don't have a request page. the report just provide reqfilterfield

    thanks,
  • Options
    vijay_gvijay_g Member Posts: 884
    edited 2016-05-04
    I can see this in standard report 208 Sales - Shipment and it works. still if you want to identify the records which has undo lines is marked in field Correction=True in shipment line table. hope this will help you.
Sign In or Register to comment.