multiply result sets

I am looking for the best solution  to my dilemma .
I have a stored procedure using a cursor that give me results from passing an invoice number to give me different tables with different information resulting from the one invoice number.
example
select invoice from table1

open cursor
exec sptable2
close cursor

open cursor
exec sptable3
close cursor

ect...
But now I need to show the results but cannot bind it to a dataset for a crystal report because I only see the first select. any tool modules or suggestions would be great.
LVL 9
Seven priceFull StackAsked:
Who is Participating?
 
brad2575Connect With a Mentor Commented:
You can create multiple temp tables then.
0
 
brad2575Commented:
You can use an output paramater on your SP to output 2 table variables.

Or even better yet generate a temp table (or even permenant table) in the SP and read from it inside the report.
0
 
Seven priceFull StackAuthor Commented:
But a temp table I thought of but there are different headers for each table, some similar but not totally.
0
 
Seven priceFull StackAuthor Commented:
Ok if this is possible then I can take all the temp tables and make one pdf file, is that correct.
0
 
Seven priceFull StackAuthor Commented:
Sounds like something I can try. Thanks for the idea.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.