none
VS2008 SP1 crashes when datasource removed from RDLC file... RRS feed

  • Question

  • I am pretty new to using the ReportViewer for creating client side reports.

    While I have been creating reports, I have been playing my the datasources, my project uses objects. Sometimes I add and remove.

    I have tried to remove a datasource using the datasource viewer but this does not remove it from the RDLC XML file...I have manually gone there to delete the source but when that is done, VS will crash.

    I'd have thought that removing a data source would automatically update the RDLC but this is not the case.

    The crash is consistent when following these steps.

    1. Create report.

    2. Add 2 data sources.

    3. Save and view report.

    4. Delete one data source from the xml and try to build and run...it crashes.

     

    Anyone noticed this?

    Tuesday, September 14, 2010 6:04 PM

Answers

  • Anyway, I think we can survive through this by not making the designer work too much. If we need to remove a datasource, we'd consider creating a new RDLC and copying and pasting the contents of the old one.


    Hi ludwigg,

    Actually, we could delete the report item which depend on the datasource firstly, then delete the datasource by right-clicking the datasource name in the Solution Explorer window and then select Delete. This method works fine in my local environment (both VS2008 and VS2010). It might have some relationship with your environment, here I would recommend you close other application and other Reports to vacate much resource for designer just as you mentioned. Although it is not a grace method, anyway it works for you.

    Thanks,

    Challen Fu

     

    • Marked as answer by ludwigg Tuesday, September 21, 2010 4:56 PM
    Tuesday, September 21, 2010 2:06 AM
    Moderator

All replies

  • Hi ludwigg,

    Actually, it is more convenient to delete the datasource directly in your project list than XML file. After being deleted the datasource in the XML file, the report control that depend on this datasource will not be deleted by itself, this is the root cause for Visual Studio’s crash, if you delete the these report control which depend on this datasource firstly, then delete this datasource in the XML file, Visual Studio will not crash. However, it is also not recommended to delete the datasource in XML file as there is no official document for this action in Microsoft. Please make a backup before you modify the RDLC report’s XML file.

    If you have any question, please feel free to ask.

    Best regards,

    Challen Fu

    Wednesday, September 15, 2010 5:13 AM
    Moderator
  • Hello Challen,

    VS2008 SP1 does crash when I remove the datasource from the "Data Source" view and then remove it from the XML. Not only crashes but before that the rendering of the ruler on the designer is gone and will show red lines. I wonder how would VS2010 behave.

    It also crashes on the scenario I described on my first post...which makes sense why it would crash.

    Since the designer will not remove the datasources when deleted and it is not recommended to delete the datasource from the xml then what are the options for making sure that a datasource is deleted?

    We were considering VS2010 but after seeing that there are bugs with nested objects then it seems better to stay with VS2008.

    Anyway, I think we can survive through this by not making the designer work too much. If we need to remove a datasource, we'd consider creating a new RDLC and copying and pasting the contents of the old one.

    Thanks.

     

    Wednesday, September 15, 2010 2:06 PM
  • Anyway, I think we can survive through this by not making the designer work too much. If we need to remove a datasource, we'd consider creating a new RDLC and copying and pasting the contents of the old one.


    Hi ludwigg,

    Actually, we could delete the report item which depend on the datasource firstly, then delete the datasource by right-clicking the datasource name in the Solution Explorer window and then select Delete. This method works fine in my local environment (both VS2008 and VS2010). It might have some relationship with your environment, here I would recommend you close other application and other Reports to vacate much resource for designer just as you mentioned. Although it is not a grace method, anyway it works for you.

    Thanks,

    Challen Fu

     

    • Marked as answer by ludwigg Tuesday, September 21, 2010 4:56 PM
    Tuesday, September 21, 2010 2:06 AM
    Moderator
  • Ok - sounds good. Thanks for looking into it.

    If I find out more, I will post again.

    Tuesday, September 21, 2010 4:56 PM