In Reporting Services- Report Wizard doesn''t like Temp tables?

  • So I want to create a report using the report wizard.

    In the query window I typed in

    EXEC  [dbo].[rpt_payor_difference]

    I got the following error:

    There is an error in the query. Invalid object name '#TempNow'.

    #TempNow is a temp table I created in my SP.

    Apparently Report Wizard don't like temp tables.

    Any ideas how to let me pass? or workarounds?

  • Hi,

    Here are 2 things to try.

    1. Add the following setting to you SP

    SET FMTONLY OFF

    2. Don't use the wizard! To create a new report right click in the solution exlorer Reports->Add->New Item and then choose the Report option. You shouldn't be prompted with the report wizard.

    Regards

    Daniel

  • Thanks Daniel

    did it w/o the wizard at the end 🙂

  • Sql reporting service wizard does not have a permission to access temp tables created in other sessions.Use 'Declare @Temp Table' instead of create statements.

  • I got around this error by setting the NOCOUNT ON at the geginning of the procedure and then setting NOCOUNT OFF at the end

    BEGIN

    SET NOCOUNT ON

    ...

    SET NOCOUNT OFF

    END

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply