anchor.diff:      FSaveDialog.DefaultExt:= 'html';
       FSaveDialog.Filter:=SHtmlFileDescription + '|*.html';
     end;
  +
  +  if GetLastUsedFolderForExport.NotNull and DirectoryExists(GetLastUsedFolderForExport.AsString) then
  +    FSaveDialog.InitialDir:= GetLastUsedFolderForExport.AsString;
  +
     if FSaveDialog.Execute then
     begin
       if FileExists(FSaveDialog.FileName) then
  
positive.code: end;
  {$ENDIF}
  
  end.
  
negative.code:   end;
  
  
  function GetLastUsedFolderForExport : TNullableString;
  
  implementation
  
  uses
    SysUtils,
    mVirtualDatasetFormulasToXml, mGridColumnSettingsToXml, mSummaryToXml;
  
  var
    _LastUsedFolderForExport : TNullableString;
  
  function GetLastUsedFolderForExport: TNullableString;
  begin
    if not Assigned(_LastUsedFolderForExport) then
      _LastUsedFolderForExport := TNullableString.Create();
    Result := _LastUsedFolderForExport;
  end;
  
  { TmDBGridHelper }
  
  