30 May 2012

Temporary table issue in RDLC

I have just created a RDLC report using a Stored Procedure, which uses a temporary table.  I am getting error "Could not generate a list of fields for the query. Invalid object name '#Tablename'".  To fix this add below statement in Stored Procedure before creating temporary tables.
"SET FMTONLY OFF"
Make your temp table a permanent one and do the management of it yourself (deleting rows after use etc). This could be faster as well as indexable and you can add keys as needed to ensure integrity. It can also act as a cache for long running queries.


2 comments:

  1. Can any body mail me a sample program using sp in rdlc report. I am facing difficulty in coding.

    ReplyDelete