none
Missing fields in Visual Studio 2010 Report Data Sources Configuration RRS feed

  • Question

  • I converted a project from VS2008 to VS2010 and I have some problems with reports. All colums in report data source are missing.
    I made some experiment creating a new report and, using the data source wizard, adding an existing dataset as an object. When I complete the procedure to add the data source and finally select the data set, no column appear in the field, or better, none of the data set column. Instead of the data set fields I just se "ClearBeforeFill - Boolean" listed. I specify that ClearBeforeFill is not actually a real field in my data sets. I tried the same procedure using different data sets always with the same result. I also tried to create a new data set directly from the add new data source report wizard, an in this way all works. The problem is that I need to use the project previously available data source. Last information: using the data sources in the windows forms all works fine.
    Wednesday, March 10, 2010 11:27 PM

Answers

  • Riccardo,
    This is caused by the fact that when you move a dataset file .xsd from one folder to another, Visual Studio will automatically change the underlying class's namespace. For example, if you move a sample.xsd from the root place to a folder named DataSets under the root folder. Then if you check the file Sample.designer.cs, you can find that the namespace is changed from:
    DemoProject to DemoProject.DataSets

    As well the table data adapter class's namespace is changed from DemoProject.SampleDataSetTableAdapters to DemoProject.DataSets.SampleSetTableAdapters. However other places reference the dataset still use the original namespace DemoProject and DemoProject.SampleSetTableAdapters to reference the dataset and table adapter.

    To resolve it, you can manually remove the ".DataSets" in the namespace of the dataset's .cs file.

    Best regards,
    Charles Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, March 16, 2010 9:31 AM
    Moderator

All replies

  • An other information. I managed to solve the problem, but it seems that there is something strange. I have my data sources moved in a folder just to have my project more organized. This is the problem: if the data source .xsd is in the project root directory all works fine, but if I move the data source in a folder below the root project folder, the fields are no more available.
    Wednesday, March 10, 2010 11:36 PM
  • Riccardo,
    This is caused by the fact that when you move a dataset file .xsd from one folder to another, Visual Studio will automatically change the underlying class's namespace. For example, if you move a sample.xsd from the root place to a folder named DataSets under the root folder. Then if you check the file Sample.designer.cs, you can find that the namespace is changed from:
    DemoProject to DemoProject.DataSets

    As well the table data adapter class's namespace is changed from DemoProject.SampleDataSetTableAdapters to DemoProject.DataSets.SampleSetTableAdapters. However other places reference the dataset still use the original namespace DemoProject and DemoProject.SampleSetTableAdapters to reference the dataset and table adapter.

    To resolve it, you can manually remove the ".DataSets" in the namespace of the dataset's .cs file.

    Best regards,
    Charles Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, March 16, 2010 9:31 AM
    Moderator