Office +1 (678) 666-2100
Fax: +1 (678) 666-1997

Search:

Applying Data Security to Jet Reports (Web-Service)

The data security applied inside NAV on pages can also be applied in Jet Reports. A few small changes is required in a codeunit delivered by Jet Reports.

+--------------------------------------------------------------+
! Codeunit 14125500 Jet Data Source                            !
+--------------------------------------------------------------+
  Object is Changed (0.99 % changed)

--- Before ----
      IsCancelled@1240190000 : Boolean;
      CancelCheckIteration@1240190011 : Integer;

    LOCAL PROCEDURE Init@1240190017();
--- After -----
      IsCancelled@1240190000 : Boolean;
      CancelCheckIteration@1240190011 : Integer;
      ESFLADSSetFilters@1000 : Codeunit 14123812;

    LOCAL PROCEDURE Init@1240190017();
---------------

PROCEDURE QueryCount
--- Before ----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
--- After -----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(TableRef,8,0);
      // << ES Filter for Data Security

      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
---------------

PROCEDURE QuerySum
--- Before ----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
--- After -----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(TableRef,8,0);
      // << ES Filter for Data Security

      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
---------------

LOCAL PROCEDURE QueryRecord
--- Before ----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
--- After -----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(TableRef,8,0);
      // << ES Filter for Data Security

      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
---------------

PROCEDURE QueryRecords
--- Before ----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
--- After -----
      Id := QueryIterator.GetQueryId();
      TableRef.OPEN(QueryIterator.GetTable());
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(TableRef,8,0);
      // << ES Filter for Data Security

      GetKey(KeyFields, KeyFieldCount);
      SetKey(TableRef, KeyFields, KeyFieldCount);
---------------

LOCAL PROCEDURE LinkFilterMatches
--- Before ----
    BEGIN
      LinkTableRef.OPEN(LinkFilterIterator.GetTable());
      GetLinkKey(LinkFilterIterator, KeyFields, KeyFieldCount);
      SetKey(LinkTableRef, KeyFields, KeyFieldCount);
--- After -----
    BEGIN
      LinkTableRef.OPEN(LinkFilterIterator.GetTable());
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(LinkTableRef,8,0);
      // << ES Filter for Data Security

      GetLinkKey(LinkFilterIterator, KeyFields, KeyFieldCount);
      SetKey(LinkTableRef, KeyFields, KeyFieldCount);
---------------

PROCEDURE FilterMatchesValue
--- Before ----
    BEGIN
      TableRef.OPEN(TableNo,TRUE);
      FieldRef := TableRef.FIELD(FieldNo);
      SetFieldValue(TableRef.NUMBER, FieldRef, FieldValue);
--- After -----
    BEGIN
      TableRef.OPEN(TableNo,TRUE);
      // >> ES Filter for Data Security
      ESFLADSSetFilters.FilterRecRef(TableRef,8,0);
      // << ES Filter for Data Security

      FieldRef := TableRef.FIELD(FieldNo);
      SetFieldValue(TableRef.NUMBER, FieldRef, FieldValue);
---------------



Like   Don't Like

© 2017 Mergetool.com. All rights reserved.



Related resources

Download software from Mergetool.com