Compare two fields in a report

Maybe a stupid question… How can I compare 2 fields of the same table in a report? I want to set a filter for the records where for example address1 <> address2

At Record Level, Show only records where same value in both fields OnAfterGetRecord() IF Address <> “Address 2” THEN CurrReport.SKIP; At Record Level, Show only records where Differemt value in both fields OnAfterGetRecord() IF Address = “Address 2” THEN CurrReport.SKIP; David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

David’s is definitely the only viable solution thinkable, but please bear in mind the amount of traffic this may generate on the network. Using normal filters, the server passes to the client only those records that match the filter. When using David’s approach, all records in the table are passed to the client, where your code in the OnAfterGetRecord-trigger decides whether or not to process or print the records. Kind regards, Jan Hoek Weha Automatisering BV Woerden - The Netherlands

True Jan But you cannot use a Conditional field compare Filter at table level, so the report is the only way. You can filter the report recordset in the normal way! David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

In Session body, Onpresession CurrReport.Showoutput(address1 <> address2 ) ; If address1 <> address2 Record show If address1 = address2 Record Hide Edited by - sak on 2001 Jul 18 05:26:59

[quote]
Originally posted by sak: In Session body, Onpresession CurrReport.Showoutput(address1 <> address2 ) ; But if u use CurrReport.ShowOutput u will get problems with totals in report …