Problem integrating Telerik reporting with Openaccess

6 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    May 2013

    Posted 09 May 2013 Link to this post

    We're trying to create a new report inside an ASP.NET page using OpenAccess as a datasource and, althought the page works without problems, when we click on 'Preview' tab on Visual Studio, it alwways throws the next exception.

    Telerik reporting Ver: 2013 Q1 (Trial)
    OpenAccess Ver: 2013 Q1
    Database: SQL Compact Edition 4

    An error has occurred while processing Report 'InfFactura': An error occurred while invoking data retrieval method. Try restarting Visual Studio. ------------- InnerException ------------- Se produjo una excepción en el destino de la invocación. ------------- InnerException ------------- The metadata for field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente' cannot be initialized: Field '_cliente' of class 'Facturacion.BdFacturacion.Clientefactura' is not a reference, collection or array; was used to define field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente'. --> Bemasoft/namespace[Facturacion.BdFacturacion]/class[Cliente]/field[_clientefacturas]/collection/inverse="_cliente" ------------- InnerException ------------- Field '_cliente' of class 'Facturacion.BdFacturacion.Clientefactura' is not a reference, collection or array; was used to define field '_clientefacturas' of class 'Facturacion.BdFacturacion.Cliente'. --> Bemasoft/namespace[Facturacion.BdFacturacion]/class[Cliente]/field[_clientefacturas]/collection/inverse="_cliente"

    Any idea?
  2. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 14 May 2013 Link to this post

    Hello Daniel,

    Check what method and connection string are used for data retrieval. If the model and the report use different configuration files, the stored for the model connection string has to be copied also in the report library. You can find attached a sample project illustrating successful data retrieving from AdventureWorks database. For more details, please check How to: Integrate Telerik OpenAccess ORM with Telerik Reporting help article.

    In order to provide you more adequate suggestions, let us know more details about your application structure, used data and connection strings. If possible upload your code and post the link to it here.

    All the best,
    Stef
    the Telerik team

    Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

  3. DevCraft banner
  4. Otto Neff
    Otto Neff avatar
    36 posts
    Member since:
    Jul 2011

    Posted 28 Mar 2014 in reply to Stef Link to this post

    Hi Stef,

    thanks for you sample. I've the same problem with a WebProject in VS2013.
    Either VS2013 crashes (static method with connection string) or I get the error:

    "An error has occurred while processing Report 'WorkTime': An error occurred 
    while invoking data retrieval method. Try restarting Visual Studio. 
    ------------- InnerException ------------- Exception has been thrown by the 
    target of an invocation. ------------- InnerException ------------- 
    System.Configuration.ConfigurationErrorsException: A connection string was 
    referenced by name 'MiniERPConnection' but could not be resolved through the 
    web.config or the executables app.config file. at 
    Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString 
    connectionString, PropertySet driverProps, ConnectionPoolType poolType, 
    LogEventStore pes) at 
    OpenAccessRuntime.Relational.sql.SqlDriver.InitializeFor(ConnectionString 
    connectionString, Boolean noConnect, PropertySet props, DBDriver& driver, 
    Connection& conn, ConnectionPoolType poolType) at 
    OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor"

    Maybe you have a hint. See the attached project.

    Kind regards, Otto.

    allowed types only images? someone funny at telerik?



  5. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 02 Apr 2014 Link to this post

    Hi Otto,

    The reason for the issue in design preview is you are using an ObjectDataSource component. Without using the constructor where you supply the connection string, this connection string has to be added to the start application configuration file (devenv.exe.config for VS). Instead of an ObjectDataSource you can use the OpenAccessDataSource component to connect to your model.

    The ObjectDataSource would work on preview in a custom application.

    About the allowed attachments in public forums, we aim to avoid sharing projects in public due to various license terms. It may happen by mistake to share DEV assemblies. Thus the preferred approach to send us your examples is through the support ticketing system.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Otto Neff
    Otto Neff avatar
    36 posts
    Member since:
    Jul 2011

    Posted 15 Apr 2014 in reply to Stef Link to this post

    Hi Stef,

    the devenv.exe.config did it. I knew it was about the DesignTime compile, but always tried to inject the
    connection string in the constructors... forgot all the way to vs config. thanks.

    Not having example projects attached is going to make it hard for beginners or other forum users to understand
    and recreate problems. I understand the DLL/Dev assemblies problem too. Maybe filtering the Zips for DLLs on upload?

    Best regards, Otto.




  7. Stef
    Admin
    Stef avatar
    3041 posts

    Posted 16 Apr 2014 Link to this post

    Hello Otto,

    We understand your considerations and will discuss the options for attaching files into forums.

    Our recommendation is to use the support ticketing system for sending projects, as in private communication we are free to exchange files freely, and moreover the system assigns response times based on the purchased support subscriptions. All interesting cases for the community can be shared in public forums or Code Libraries (where we can revise projects for the used assemblies before making them public).

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner