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?
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?
5 Answers, 1 is accepted
0
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
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.
0
Otto Neff
Top achievements
Rank 2
answered on 28 Mar 2014, 12:05 PM
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?
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?
0
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
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.
0
Otto Neff
Top achievements
Rank 2
answered on 15 Apr 2014, 11:49 AM
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.
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.
0
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
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.