I have a WinForms application, written in VS2012. It sources data from a View on my SQL Server database. I added a new column to my view, but, can't find a way to get the ReportViewer dataset to see the new column.
In the ReportData panel, I have attempted:
Right Click data source, and click Refresh. Right Click data set, and click Refresh
Both do not get the new column to show in the list of available columns.
How do I get the column to show in my report designer within VS2012?
Since I just had the same problem and none of the suggested answers helped...
You can add the field in XML as well. Right click on the report and chose Open with...
, select XML (Text)-Editor
. Now look for the tag <DataSets>
and add a new <Field>
inside the <Fields>
branch. For example, you just added the column Test
to your DataSet, which previously contained FieldName1
and FieldName2
. You can edit the XML as such:
<DataSets>
<DataSet Name="YourDataSet">
<Fields>
<Field Name="FieldName1">
<DataField>FieldName1</DataField>
<rd:TypeName>System.YourType</rd:TypeName>
</Field>
<Field Name="FieldName2">
<DataField>FieldName2</DataField>
<rd:TypeName>System.YourType</rd:TypeName>
</Field>
<Field Name="Test">
<DataField>Test</DataField>
<rd:TypeName>System.YourType</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
Now save the XML and open it again in the report designer. You now should be able to select your new field and add it to the report.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With