28. September 2017 14:45
DialogMGT_LC.OpenDialog(5,'Export der Daten');
startConn;
SQL_L := 'IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(' +
Text002_L+ '[dbo].[' + 'RechnungGutschrift_' + USERID + ']' + Text002_L + ')';
adoConnection_2.Execute(SQL_L); DialogMGT_LC.UpdateDialog(0);
SQL_L := 'SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ' +
'Select * ' +
' INTO [IWASNAV_Reports].dbo. ' + 'RechnungGutschrift_' + USERID + ' FROM [';
//FW KD191 15.06.16...
MiscSetup_LT.GET;
SQL_L += 'A_RechnungGutschrift';
SQL_L += '] WHERE 1=1 ';
CREATE(ADORecordset);
ADORecordset.ActiveConnection := adoConnection;
ADORecordset.CursorType:= 3;
ADORecordset.Open(SQL_L);
DialogMGT_LC.UpdateDialog(0);
adoConnection.Close;
adoConnection_2.Close;
DialogMGT_LC.UpdateDialog(0);
// ExcelAnwendung starten
ExcelExportSetup_LT.GET;
ExcelManagement_LC.openExcel();
// Makroarbeitsmappe öffnen
// ManagementFile_L := ExcelExportSetup_LT."Path to Template" + ExcelExportSetup_LT."Template Excel Management";
// ExcelManagement_LC.openWorkbookByFile(ManagementFile_L);
// Mappe mit Vorlage öffnen
TemplateFile_L := ExcelExportSetup_LT."Path to Template" + ExcelExportSetup_LT."Template Sales Line Statistic2";
WorkFile_L := 'C:\temp\' + USERID + '_' + ExcelExportSetup_LT."Template Sales Line Statistic2";
COPY(TemplateFile_L,WorkFile_L);
ExcelManagement_LC.newWorkbook(WorkFile_L);
DialogMGT_LC.UpdateDialog(0);
ERROR('Hallo3');
{SQL_L := 'Select * from [iwas_Reports].dbo. ' + 'RechnungGutschrift_' + USERID ; }
ExcelManagement_LC.runMacro('Workbook.ImportTableInPivot',SQL_L);
// ExcelManagement_LC.closeWorkbookByName(ExcelExportSetup_LT."Template Excel Management");
DialogMGT_LC.UpdateDialog(0);
DialogMGT_LC.CloseDialog;
ExcelManagement_LC.showExcel();
28. September 2017 15:27
28. September 2017 15:38
2. Oktober 2017 10:50