ODP.NET driver when using WinForms and Report Designer

4 posts, 1 answers
  1. Stephen
    Stephen avatar
    141 posts
    Member since:
    Feb 2008

    Posted 06 Apr Link to this post

    Hi,

    I want to use report designer to create a report, and then import it into a WinForms application and deply as a ClickOnce application.

    I need to package up the ODP.NET driver as part of ClickOnce, but I dont see it as a dependency to flag as "Include" in my assembly.

    I only see the Oracle.ManagedDataAccess.dll in the list of Application Files to include, if I manually add a redundant DataSource to my project. 

    So my question is, am I taking the correct approach to ensure my users will have the Oracle driver installed, by introducing a blank ODP.NET data source just to get the .dll in my assembly?

    As an alternative, I could actually "use" a data source I add to my WinForms project and swap out the details in the <DataSources><SqlDataSource> of my report XML definition to use a project level defined data source, but am not sure how to do that.

    Any advice appreciated.

    Regards

    Stephen

     

  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 07 Apr Link to this post

    Hello Stephen,

    The .NET data provider must be installed on the machine where reports will be processed in order to be able to establish a connection through the corresponding classes.

    If ensuring that the .NET provider will be available is not possible, test retrieving data from a remote source via data service. Please consider the example in Connecting Telerik Reporting to OData feeds.
    To use an ObjectDataSource in the Standalone Designer, the data access layer must be built in an external assembly loaded by the designer -  Extending Report Designer (there are tutorials at the bottom of the article).


    Please note that custom data objects are not serialized along with the report settings. Only data source components' properties are serialized in the report, where data source components are for specifying a data-retrieval method in  a declarative manner and instantiated data objects will not be serialized as well.


    I hope this information is helpful.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Answer
    Stephen
    Stephen avatar
    141 posts
    Member since:
    Feb 2008

    Posted 07 Apr in reply to Stef Link to this post

    Hi,

    The whole idea of "ClickOnce" is that all the dependencies get packaged up, and so I dont need to ensure all my clients have Oracle ODAC installed.  I got it working using ODAC and am now able to deploy reports to customers who do not have Oracfe installed.

     

    The trick was to ensure the Oracle.ManagedDataAccess.dll was part of the CLickOnce assembly as an "Include", but then some additions to AppConfig.

     

    <system.data>
    <DbProviderFactories>
    <remove invariant="Oracle.ManagedDataAccess.Client" />
    <!-- If any should be in the machine.config -->
    <add name="Oracle Data Provider for .NET" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral" />
    </DbProviderFactories>
    </system.data>
    <connectionStrings>
    <clear />
    <add name="ConnectionStringAriel" providerName="Oracle.ManagedDataAccess.Client"
    connectionString="Data Source=myserver.mycompany.net:1524/DARIEL;Persist Security Info=True;User ID=myname;Password=mypassword;Connection Timeout=60;"/>
    </connectionStrings>

     

    So I disagree that you cannot create winforms solutions you can deploy to clients without Oracle installed.

    Regards

     

    Stephen

  5. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 07 Apr Link to this post

    Hi Stephen,

    Thank you for providing the additional configuration that helped you to resolve the issue.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top