SQL Server Performance

Can't create report with Report services

Discussion in 'SQL Server Reporting Services' started by lliu, Feb 14, 2005.

  1. lliu New Member

    I tried to create report with Report Services but if my stored procedure use temp table (ex: #Temp), I'll get the error "There is an error in the query. Invalid object name '#Temp'). If the stored procedure doesn't include temp table, it will be OK, the report could be created. I have no idea what's going on here. if anybody can give me a hand?

    Thanks a lot.
  2. satya Moderator

    Can you execute the specified stored procedure in the query analyzer without any errors?
    Also post the query processed.

    In future kindly post the threads in the relevant forum only.
    (moving to Reporting Services forum from ANalysis forum)

    Satya SKJ
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  3. lliu New Member

    Yes, I can execute the stored procedure on Query Analyzer and get the query result, everything looks fine, but if I click the option ¡°Display estimated execution plan¡± on Query menu of Query Analyzer, I got same message ¡°Invalid object name '#temp'¡±. I tried many times on different Server, it¡¯s happened to any stored procedures which include temp table. Is it could be same problem which I got from Report Services?

    Thanks for your response.

  4. satya Moderator

  5. ribico New Member

    Try explicitly dropping your temp tables at the end of your stored procedure. That worked for me with that error in Reporting Services

Share This Page