Skip to Content
avatar image
Former Member

SP21 System.InvalidCastException with VS2015 and VS2017 for SetDataSource

Hello - I installed SP21 for Visual Studio 2015 and 2017 - but when I run a report that works with SP20 in VS2015, with SP21 it shows an error in both VS2015 and VS2017 System.InvalidCastException occurred for ReportDocument.SetDataSource(mydataset) I ran the install as Administrator I have Windows 10 version 1703 Net Framework is 4.5 Please advise - Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 31, 2017 at 08:13 PM

    Did you remove all of the CR assemblies and then add the new 13.0.3500.0 versions?

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 14, 2017 at 09:48 PM

    Hi David,

    Remove the LegacyMode from the <start> section in your app.config file now. It's not need now that CR is using the updated Framework.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Don

      In my web.config i don't have any LegacyMode label or start section.

      I was using my web.config with Visual Studio 2012 and i haven't had any trouble, and i haven't need the start section

      in my web.config, now i'm trying Visual Studio 2017 and crystal reports sp21.

      Regards

  • avatar image
    Former Member
    Nov 06, 2017 at 12:32 AM

    I could resolve, taking out all crystal reports references in my web.config (13.0.2000 and 13.0.3500),

    and changing from net.framework 3.5 to 4.6.1 in the application properties.

    Thxs

    :) :)

    Add comment
    10|10000 characters needed characters exceeded