extract values from different stored procedures and create one report At the company I work, the third party taking care of the database. So there is  giant complex stored procedure that produces the result for one parameter only. When management needs a desirable report - they run one parameter, grabbing the sum of money for that parameter. Then running next parameter,  grabbing another sum for parameter and so on. After that they inserting all that sums into excel spreadsheet into a table. 

So my job is to automate all this process. 
Is any way the same stored procedure can run particular parameters - insert result in tempTable, then run next parameters - insert result in same tempTable and so on. 
Do you guys know what I mean? The result of different sets of parameters should be like on a picture below

@GLCompanyGuid  varchar(8000)       =   'CpmpanyName_1',  
@PostDateFrom datetime              =   '01-01-2016',
@PostDateTo   datetime              =   '01-31-2016',
@CompanyLocationGuids varchar(8000) =   'CompanyLocation_1'
@CarrierLocationGuids varchar(8000) =    Carrier_1,   
@LineGuid     varchar(8000)         =   'Line_1'



--Now I need to run same store procedure but with different parameters value and insert the result at the same TempTable 

@GLCompanyGuid  varchar(8000)       =   'CpmpanyName_2',  
@PostDateFrom datetime              =   '01-01-2016',
@PostDateTo   datetime              =   '01-31-2016',
@CompanyLocationGuids varchar(8000) =   'CompanyLocation_2'
@CarrierLocationGuids varchar(8000) =    Carrier_2,   
@LineGuid     varchar(8000)         =   'Line_2'

--So how can I make one stored procedure run through one set of parameters, insert values in temp table, then run through another set of parameters - insert values in temp table and so on?[![enter image description here][1]][1]
If the stored procedure only returns one result set, and you know the column names in advance, then you can create a temp table and Insert #TableName Exec ProcedureName. You would then select the value you want into a variable from the temp table, and run the procedure again.

If it only returns one result set but you don't know the column names in advance, you can use this solution (https://stackoverflow.com/a/1228165/401970) to call the procedure within an Openrowset and put the results into a temp table it creates for itself with the returned column names.

SELECT * INTO #MyTempTable FROM OPENROWSET('SQLNCLI', 'Server=(local)\SQL2008;Trusted_Connection=yes;',
     'EXEC getBusinessLineHistory')


If the procedure returns multiple result sets then you're not going to be able to do a solution in T-SQL only. You can write a simple PowerShell script to do it, but that's not really going to help if they need to get the result directly from the database.