...
ReplacePosition@1110001 : Integer;
TempDecimal@1110008 : Decimal;
TotalDecimal@1110009 : Decimal;
TempInteger@1110011 : Integer;
TotalInteger@1110012 : Integer;
BEGIN
// Format Table Filter
IF FORMAT(IESField."Table Filter") <> '' THEN BEGIN
ColonPosition := STRPOS(FORMAT(IESField."Table Filter"), ':');
TableViewString2 := COPYSTR(FORMAT(IESField."Table Filter"),ColonPosition + 2);
...
...
ReplacePosition@1110001 : Integer;
TempDecimal@1110008 : Decimal;
TotalDecimal@1110009 : Decimal;
TempInteger@1110011 : Integer;
TotalInteger@1110012 : Integer;
// Add the following line.
IESAnnex@1110020 : Record 13351;
BEGIN
// Format Table Filter
IF FORMAT(IESField."Table Filter") <> '' THEN BEGIN
ColonPosition := STRPOS(FORMAT(IESField."Table Filter"), ':');
TableViewString2 := COPYSTR(FORMAT(IESField."Table Filter"),ColonPosition + 2);
...
...
END;
TableViewString := TableViewString + TableViewString2;
TableViewString := 'WHERE(' + TableViewString + '))';
END;
// Calculate Table Field Value
Field.GET(IESField."Table No.",IESField."Field No.");
RecRef.OPEN(IESField."Table No.");
IF FORMAT(IESField."Table Filter") <> '' THEN
RecRef.SETVIEW(TableViewString);
...
...
END;
TableViewString := TableViewString + TableViewString2;
TableViewString := 'WHERE(' + TableViewString + '))';
END;
// Add the following line.
IESAnnex.GET(IESField."IES Statement Name",IESField."IES Annex Name");
// Calculate Table Field Value
Field.GET(IESField."Table No.",IESField."Field No.");
RecRef.OPEN(IESField."Table No.");
IF FORMAT(IESField."Table Filter") <> '' THEN
RecRef.SETVIEW(TableViewString);
...
...
RecRef.CURRENTKEYINDEX(IESField."Key No.");
// Apply Date Filter
IF IESField."Date Filter Field No." <> 0 THEN BEGIN
DateFilterFldRef := RecRef.FIELD(IESField."Date Filter Field No.");
IF IESField."Include Closing End Date" THEN
// Delete the following line.
DateFilterFldRef.SETFILTER('%1..%2',"Starting Date",CLOSINGDATE("Ending Date"))
ELSE
DateFilterFldRef.SETFILTER('%1..%2',"Starting Date","Ending Date");
END;
IF RecRef.FINDSET THEN BEGIN
IF NOT IESField."Total Fields" THEN BEGIN
...
...
RecRef.CURRENTKEYINDEX(IESField."Key No.");
// Apply Date Filter
IF IESField."Date Filter Field No." <> 0 THEN BEGIN
DateFilterFldRef := RecRef.FIELD(IESField."Date Filter Field No.");
IF IESField."Include Closing End Date" THEN
// Add the following lines.
DateFilterFldRef.SETFILTER('%1..%2',"Starting Date",CLOSINGDATE("Ending Date"));
IF IESAnnex."Use Calender Rule" THEN
DateFilterFldRef.SETFILTER('%1..%2',CALCDATE('-CY',"Starting Date"),CALCDATE('CY',"Starting Date"))
// End of the lines.
ELSE
DateFilterFldRef.SETFILTER('%1..%2',"Starting Date","Ending Date");
END;
IF RecRef.FINDSET THEN BEGIN
IF NOT IESField."Total Fields" THEN BEGIN
...