Creating reports with temp tables

Hi,

I have created a new datasource that runs a stored procedure. The stored procedure uses a temp table and returns the contents of the temp table.

When I add the stored procedure to the datasources window it cannot figure out the column names of the temp table. I can preview the data from VS2005 and it works fine.

However when designing the local report I have no fields to drag on to the form.

I choose Report - Report DataSources and pointed to the dataset of the stored procedure. I dropped a text box on the report and manually added Fields!DepartmentName.Value which I know is one of the column names, but that produces the error "The Value expression for the textbox ‘textbox1’ refers to the field ‘departmentName’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope."

How do I get around the problem of not having any column names in my dataset?

THanks in advance!

[1018 byte] By [Declan] at [2007-12-24]
# 1

VS Report Designer does not support direct editing of the fields in a dataset. You can workaound the problem by editing the .rdlc file in the XML editor. (Right-click the file and select Open With...). Search for the <DataSet> element and add the fields.

-Albert

AlbertYen-MS at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 2
thanks, i got around it another way, but I'll keep that in mind for future projects!
Declan at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 3
hi declan,
just wondering what kind of solution you come out with ? as i also been struggering with the problem ..i have to create the temp table as actual table in the db
hoilok at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 4

Hi Declan_

What was your solution? I am currently running into the same problem.

MGT at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 5

Albert posted the solution in this thread last year. (Pasted below) Does this solve your issue?

VS Report Designer does not support direct editing of the fields in a dataset. You can workaound the problem by editing the .rdlc file in the XML editor. (Right-click the file and select Open With...). Search for the <DataSet> element and add the fields.

-Albert

Chazoo at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...

Visual Studio

Site Classified