• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1239
  • Last Modified:

No columns data of a SQL stored procedure in Visual Studio rdlc Report


I am trying to create a Dataset (xsd file) for a Report (rdlc file), the datasource for the dataset  is a stored procedure that executes a sql sentence  "exec(@strSQL)" in order to retrieve the desired data, the problem is that in visual studio when I am creating the data set and attach the stored procedure, no columns are obtained in order to keep with the design of the report.

1 Solution
Christopher KileCommented:
When you are executing dynamic SQL, it is impossible for the designer to figure out what the columns of the output are - it can only do this when the stored procedure returns a static query.  Is there a way for you to reengineer the query to fill a table variable or temporary table  and return a SELECT on that table?
negreteoAuthor Commented:
I did what was recommended by

            insert into #tblResults

            select * from #tblResults

by executing this query I am able to see the columns and its records but still no columns are retrieved for the report from the datasource

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now