Thursday, October 11, 2018

NAV - How to set default filters on a report

  • Set Default Report Filters
    • On Report, DataItem header
    • Populate the ReqFilterfields property
  • This will not work for Option fields as the value passed from the option field filter include the field name
  • Use a boolean, or hardcode if then statements for the options if possible
  • Otherwise, use 
ReplaceString(String : Text[250];OrigSubStr : Text[100];ReplSubStr : Text[100]) : Text[250]// StartPos : Integer
StartPos := STRPOS(String,OrigSubStr);
WHILE StartPos > 0 DO BEGIN
String := DELSTR(String,StartPos) + ReplSubStr + COPYSTR(String,StartPos + STRLEN(OrigSubStr));
StartPos := STRPOS(String,OrigSubStr);
END;
EXIT(String);


as a function to remove the beginning of the string.

No comments:

Post a Comment