Vasantha,
Here is an example, using MSSQL, related to your question:
Say, you have a fex called RPT1. In RPT1 is the following:
-DEFAULT &SERVER_NAME = 'xx.x.x.xxx';
-SET &CONNECTION = IF &SERVER_NAME EQ 'x.x.x.xxx' THEN 'development' ELSE 'prodution';
-*------------------------------------------------------------------------
-* Call Stored Procedure #1
-*------------------------------------------------------------------------
SQL SQLMSS SET SERVER &CONNECTION
SQL SQLMSS EX DataBase.DBO.SQL_Stored_proc1 '&VAR1', '&VAR2', '&VAR3', &VAR4;
-*------------------------------------------------------------------------
-* Read the data into a hold file.
-*------------------------------------------------------------------------
TABLE FILE SQLOUT
SUM
COLUMN1
COLUMN2
COLUMN3
ON TABLE HOLD AS PASS1 FORMAT ALPHA
END
-RUN
-READ PASS1 &COL1.AXX. &COL2.AXX. &COL3.AXX
-*------------------------------------------------------------------------
-* Call Stored Procedure #2
-*------------------------------------------------------------------------
SQL SQLMSS SET SERVER &CONNECTION
SQL SQLMSS EX DataBase.DBO.SQL_Stored_proc2 '&VAR1', '&VAR2', '&VAR3', &VAR4;
-*------------------------------------------------------------------------
-* Read the data into a hold file.
-*------------------------------------------------------------------------
TABLE FILE SQLOUT
SUM
COLUMN1
COLUMN2
COLUMN3
ON TABLE HOLD AS PASS2 FORMAT ALPHA
END
-RUN
The report is now generated from the HOLD file PASS2.
&COL1, &COL2, &COL3 are now available to be placed in your HEADING
&SERVER_NAME and &CONNECTION are examples only, you need to replace them with your data
&VAR 1-4 are variables being passed to the stored proc.
Hope this helps...
Tom
Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe