How to compare line by line

Hi All,

I am a beginner of Navision.

Now I am writing a report.

May I know how to compare the output line by line?

For example,

ID Field1 Field2 Field3

001 ABC DEF YES

001 ABC DEF NO

002 ABC DEF YES

if the same ID appear 2 lines, then the output should only show the line which Field3=NO

if the ID is appear 1 line, then the output should only show line which is Field3=YEW

Anybody cannot help me?I very URGENT. THANKS A LOT^^

Use a temporary table. Insert the details as per your condition into the temporary table. Make this temporary table as the source table for your report and print it.

Hi a,

I assume you’re using a report to show your data and that the dataitem is the table you mentioned above (Field 1, Field 2, etc.).

You can get the wanted result doing this:

  1. Create a variable pointing to the same table as your dataitem (MyTableVariable)

In the OnAfterGetRecord place this code:

MyTableVariable.setrange(ID,ID);

MyTableVariable.setrange(field1,field1);

MyTableVariable.setrange(field2,field2);

if mytablevariable.count > 1 then begin

if field3 = true then

currreport.skip;

end else

if field3 = false then

currreport.skip;

hope this helps,

cheers, Jan

[:)]Hi Jan Vorauer,

I solved it. Thanks a lot