DataItemTableView, DataItemLink, OnPreDataItem - priority?

randrewsrandrews Member Posts: 135
Hi.
Anybody know priority of filters in
DataItemTableView, DataItemLink, OnPreDataItem?

Would be key "First Field","Second field","Third Field" the best in this example :

Property DataItemTableView in report item have filter on "First Field"
Property DataItemLink in report item have link on "Second field"=FIELD("Field from another table")
Triger OnPreDataItem have code
SETRANGE("Third Field",'some value');
?

Comments

  • samantha73samantha73 Member Posts: 96
    Just came across this old post and does anyone have any input? I'm trying to optimise performance by applying filters as early as possible and it would be good to know
  • bbrownbbrown Member Posts: 3,268
    The answers an considerations are different for today's versions than back when that original question was posted. When upgrading a report, blindly following the original design can sometimes be the worse thing to do. Unfortunately, that is often what happens during an upgrade. Even Microsoft does it. They do seem to eventually get around to redesigning some reports

    With older version, data was retrieved in pieces with each DataItem. Indented dataItems were retrieved for the related records only. Newer versions construct a compound SQL query to pull all the data at once.

    Talking only about modern NAV\BC, the answer is it does not really matter. As they are all executed before the call to SQL is made. But the specifics can change the structure of the resulting SQL query and thus its performance.



    There are no bugs - only undocumented features.
Sign In or Register to comment.