Visual Studio Report Designer – Adding a new Column to a dataset

//Visual Studio Report Designer – Adding a new Column to a dataset

Visual Studio Report Designer – Adding a new Column to a dataset

There is a problem in Visual Studio 2010 Report Viewer and Datasets.

Problem:

If you create a VS report by manually or by using the wizard, and configure a dataset based on a stored procedure, then later modify the stored procedure to include new columns, these are not picked up in the report designer.

I repeated these steps several times and all with the same result. I was able to configure the dataset, and get that to recognise the new fields, but in the report editor, it did not include them in the fields list.

WORKAROUND

This is what I found, in visual studio, solution explorer, right click the report and choose Open With,

Choose, XML editor

The in the editor, look for the fields list, and manually add your new fields in, making sure you get the name exactly right, and the correct datatype.

Configure Report to include new column

 This is what it looks like in the xml editor, you can see the list of fields.

Report rdlc file opened in xml editor

Report rdlc file opened in xml editor

By | 2012-01-29T20:56:31+00:00 January 29th, 2012|Uncategorized|0 Comments

About the Author:

Leave A Comment