06-07-2023, 04:00 PM
Hi, I am making a program for internet using for this intraweb 14.0.29 and I would like your help to solve the creation of a file.
In the win32 version of the program create an excel and download it wherever the user wants, but with Intraweb it does not make it work, using the typical TFileSaveDialog components to select the path.
I use something like this.
In the win32 version of the program create an excel and download it wherever the user wants, but with Intraweb it does not make it work, using the typical TFileSaveDialog components to select the path.
I use something like this.
Code:
fdquery1.Open();
if fdquery1.IsEmpty = FALSE then
try
Report := TFlexCelReport.Create(true);
if not SaveDialog1.Execute then exit;
Report.AddTable('fdquery1',fdquery1, TRecordCountMode.SlowCount, TDisposeMode.DoNotDispose);
Report.SetValue('empresa',combobox7.text); // .SetCellValue(1, 1, statusbar1.panels[2].Text);
Report.SetValue('ejercicio',edit9.Text); // .SetCellValue(1, 1, statusbar1.panels[2].Text);
Report.SetValue('periodo',combobox8.Text); // .SetCellValue(1, 1, statusbar1.panels[2].Text);
Report.SetValue('fecha',datetimetostr(now)); // .SetCellValue(1, 1, statusbar1.panels[2].Text);
Report.Run(ExtractFilePath(application.ExeName)+'\EERR_SAP.xlsx', SaveDialog1.FileName);
if MessageDlg('Se ha exportado correctamente. ¿Desea abrir el archivo generado?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
ShellExecute(0, 'open', PCHAR(SaveDialog1.FileName), nil, nil, SW_SHOWNORMAL);
end;
finally
FDCONNECTion1.close;
end;