GO set ANSI_NULLS ON GO set QUOTED_IDENTIFIER ON GO IF OBJECT_ID ('dbo.PSExcel_BI013','P') IS NOT NULL DROP PROCEDURE dbo.PSExcel_BI013 GO CREATE PROCEDURE [dbo].[PSExcel_BI013] /********************************* LES PARAMETRES DU FILTRE *******************************/ @CustomerNo1 AS VARCHAR(20), @CustomerNo2 AS VARCHAR(20), @MinDate AS smalldatetime , @MaxDate AS smalldatetime AS BEGIN EXEC sp_makewebtask @outputfile = 'c:\Test\Statistiques.xls', @query = [EXEC PSBI013 @CustomerNo1, @CustomerNo2, @MinDate, @MinDate ], @colheaders =1, @FixedFont=0, @lastupdated=1, @resultstitle='Statistiques Globales' END
ExecuteSP(VAR Code1 : Code[20];VAR code2 : Code[10];VAR StartDate : Date;VAR EndDate : Date;VAR ChaineConnection : Text[1000]) IF ISCLEAR(lADOConnection) THEN CREATE(lADOConnection); lADOConnection.ConnectionString:=ChaineConnection; lADOConnection.Open; //***************************** Execute SP ************************* CustomerNo1:= Code1; CustomerNo2:=code2; MinDate:= StartDate; MaxDate:= EndDate; lADOConnection.Execute(STRSUBSTNO('EXEC PSExcel_BI013 ''%1'',''%2'',''%3'',''%4''', CustomerNo1, CustomerNo2, MinDate, MaxDate)); //***************************** Close sql connection ********************* lADOConnection.Close; CLEAR(lADOConnection);
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!