It has nothing to do with using stored procedure or not.
First of all, it is a design related question: don't create tables during run (simply use a field to bind rows to the session or user), or if yo dou use
temporary tables[
^].
An other approach is to use a transaction: 1 - start a snapshot, 2 - select your records into the (temporary) table, 3 - do the report, 4 - rollback transaction
By the way: using
transactions[
^], you will probably not need that table at all - but it can affect performance, so you have to plan carefully.