slow report filtering?

ive got a report that is based on 5 tables all linked by a primary keys. now i want to filter on a field (code,20) with the value of “STATUS”, now currently there are only 2 matching items out of 1,000. the field is the primary key. but when it runs its as slow as hell, 10 mins or more. yet if i filter on any other value than status it completes within 30 seconds. any ideas, how to speed it up or sort it out? (running on sql)

Hi Try setting the Table View …in the dataitem properties…

how are dataitems Linked ? Are they indented ? Are the filters transfered to other data items ? As said by Jagan correct SORTING and FILTERING should help.

cheers, (its 3.7 iif that makes a difference) i have all the tables linked and indented correctly, and each tableView is sorted by its primary key. only 2 tables have filters on them, first is exlcuding all blank entries and values in the range 030|040|050 second is any field with the value of “status”. ive tried transferring the filters but it doesnt seem to work correctly. (getfilters / setfilters) am i missing something simple?

It’s not important that you use primary keys on all Data items. It’s more important that you use keys (can be primary) which has fields on which you set filters. That means fields that are used in “DataItemLink”, fields that you set filters in code and “ReqFilterFields” (those which will be set by user).

well ive rebuilt the report from scratch, the problem was the field filter “status” was doing the most work, but it was being called last. so i reorder (tables) in the report so it is the first filter to be run. now the report runs in 5 mins. it as something simple :slight_smile: cheers…