Ignore fields with the same value

supp85supp85 Member Posts: 76
edited 2009-04-15 in Navision Attain
hello all,

I have added the sale invoice line as a data item indented under the TempCustLedgEntryLoop to the Aged acc report, so if an invoice is found to show the "Job No." on the invoice lines for that particular document and a few extra fields from the job table, as there can be several invoice lines with the same job no. the report will show all lines (detailing the same information several times), how do i get the report to ignore lines with the same job no.? (so if there are 3 invoice lines with the job no. Y and 1 line with X, then the report is to show only 2 lines Y & X.)

I hope it makes sense

Answers

  • kapamaroukapamarou Member Posts: 1,152
    You could add a variable to store the previous value and then on the OnPreSection trigger do:

    CurrReport.SHOWOUTPUT(prevValue <> currValue). Initialize your value on the onAfterGetRecord and it is solved... You could also use a GroupHeader / GroupFooter to show your info and this will do it automatically for you... You'll need a key though that will support your logic. Otherwise you could use a temporary table to hold your unique lines...

    So... there are plenty of ways for you to choose from...
  • supp85supp85 Member Posts: 76
    Thank you for your reply the SHOWOUTPUT worked great.
Sign In or Register to comment.