This is a migrated thread and some comments may be shown as answers.

deployment to test server difficulty: Object cannot be cast from DBNull to other types

3 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 15 Nov 2013, 12:15 AM
Hello. My Telerik Reporting project is a Windows Service that generates a PDF report. The report has a mix of ObjectDataSources and SqlDataSources (MySql). My reporting service processes the report just fine on my development machine but when I deployed it to a test server I started encountering problems. I've already fixed the missing entry in DbProviderFactories for MySql, which I put into the service's app.config.

Now I'm getting exceptions on all parts of my report that call MySql stored procedures with SqlDataSource, the InvalidCastException.

There's also a series of FileNotFoundExceptions at the beginning of processing, I'm not sure if those are setting the rest of the report up for failure.

I'm also seeing System.Reflection.TargetInvocationException in Telerik.Reporting.dll when processing my graphs.

As I said, this is all working fine on my development machine, but on my test server it's not. Could there be some deployment step that I'm missing?

Output window text follows.

*** Get PDF Rendering Extension STARTED ***
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'Telerik.Reporting.Interfaces.ExtensionManagerException' occurred in Telerik.Reporting.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'Telerik.Reporting.Interfaces.ExtensionManagerException' occurred in Telerik.Reporting.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'Telerik.Reporting.Interfaces.ExtensionManagerException' occurred in Telerik.Reporting.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'Telerik.Reporting.Interfaces.ExtensionManagerException' occurred in Telerik.Reporting.dll
*** Get PDF Rendering Extension DONE in 00:00:00.4249358 ***


*** ReportProcessor.ProcessReport STARTED ***

*** ProcessReport #0 STARTED ***

*** Report Processing STARTED ***
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

*** Table::ProcessItem STARTED ***

*** TableBuilder::AddColumns STARTED ***
*** TableBuilder::AddColumns DONE in 00:00:00.0251090 ***


*** TableBuilder::AddRows STARTED ***
*** TableBuilder::AddRows DONE in 00:00:00.0082406 ***


*** TableBuilder::AddBody STARTED ***

*** Table::ProcessItem STARTED ***

*** TableBuilder::AddColumns STARTED ***
*** TableBuilder::AddColumns DONE in 00:00:00.0000996 ***


*** TableBuilder::AddRows STARTED ***
*** TableBuilder::AddRows DONE in 00:00:00.0001124 ***


*** TableBuilder::AddBody STARTED ***
*** TableBuilder::AddBody DONE in 00:00:00.0224333 ***

*** Table::ProcessItem DONE in 00:00:00.0874301 ***

*** TableBuilder::AddBody DONE in 00:00:00.1158163 ***

*** Table::ProcessItem DONE in 00:00:00.2623333 ***


*** Table::ProcessItem STARTED ***
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\pf\MySql.Data.dll'
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PeachFarm.Reporting.Service.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Table::ProcessItem DONE in 00:00:00.9704175 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 137
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.Table.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\Table.cs:line 244
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241

*** Table::ProcessItem STARTED ***
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Table::ProcessItem DONE in 00:00:00.2692167 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 137
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.Table.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\Table.cs:line 244
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241

*** Table::ProcessItem STARTED ***
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Table::ProcessItem DONE in 00:00:00.2682179 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 137
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.Table.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\Table.cs:line 244
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241

*** Table::ProcessItem STARTED ***
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Table::ProcessItem DONE in 00:00:00.2676148 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 137
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.Table.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\Table.cs:line 244
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241

*** Graph::ProcessItem STARTED ***
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Graph::ProcessItem DONE in 00:00:00.2975278 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.SeedData(IEnumerable`1 rawData) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 177
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 119
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241

*** Graph::ProcessItem STARTED ***
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in Telerik.Reporting.dll
*** Graph::ProcessItem DONE in 00:00:00.2697955 ***

An exception has occurred while processing '' item:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToByte(IFormatProvider provider)
   at MySql.Data.MySqlClient.MySqlCommandBuilder.DeriveParameters(MySqlCommand command)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Telerik.Reporting.Processing.Data.SqlProviderFactory.DeriveParameters(IDbCommand command) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 154
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.ResolveProcedure(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 287
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateParameters(IDbCommand command, SqlDataSourceParameterCollection parameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlCommandProvider.cs:line 246
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection, Boolean evaluateParameters) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 103
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateCommand(IDbConnection connection) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlQueryProvider.cs:line 90
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\Sql\SqlDataEnumerable.cs:line 49
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.SeedData(IEnumerable`1 rawData) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 177
   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Fill(ResultSet resultSet, IEnumerable`1 data) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\ResultSet.cs:line 119
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.Execute(MultidimensionalQuery query) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing.Data\SimpleDataSources\SimpleDataProvider.cs:line 84
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, Dictionary`2 aggregatesMap) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 397
   at Telerik.Reporting.Processing.DataItem.ResolveData() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 262
   at Telerik.Reporting.Processing.DataItem.ProcessItem() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\DataItem.cs:line 192
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement() in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ReportItemBase.cs:line 157
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext) in c:\temp\reporting\@RBuild-19923\Reporting_Build\Source\Code\Telerik.Reporting.Processing\ProcessingElement.cs:line 241
*** Report Processing DONE in 00:00:03.4022893 ***

*** ProcessReport #0 DONE in 00:00:03.6040165 ***

*** ReportProcessor.ProcessReport DONE in 00:00:03.6425769 ***


*** RenderReport #0 STARTED ***

*** Measure Report STARTED ***

*** Measure Report STARTED ***

*** Measure Report STARTED ***
*** Measure Report DONE in 00:00:00.1668263 ***

*** Measure Report DONE in 00:00:00.1913456 ***

*** Measure Report DONE in 00:00:00.2123840 ***


*** Arrange Report STARTED ***

*** Arrange Report STARTED ***

*** Arrange Report STARTED ***
*** Arrange Report DONE in 00:00:00.0108444 ***

*** Arrange Report DONE in 00:00:00.0309172 ***

*** Arrange Report DONE in 00:00:00.0532095 ***

*** RenderReport #0 DONE in 00:00:01.3111565 ***

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 19 Nov 2013, 06:33 PM
Hi Matt,

Since the service runs as expected locally, compare both machines settings.Then try to isolate the issue and make your service to work only with reports not connecting to MySQL database. If the issue is not reproducible this way, double-check the installed MySQL provider and if it is registered correctly for use. For more details take a look at the Data provider is missing in the SqlDataSource wizard KB article. You can also test if loading data with a standard adapter from the MySQL database using the installed provider is successful.

If you need further help, please open a support ticket and send us reference to this forum, details about the performed tests and a sample project reproducing the issue.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Matt
Top achievements
Rank 1
answered on 19 Nov 2013, 11:31 PM
So one thing I've noticed is that the MySQL .NET connector installer doesn't add entries into machine.config, this is solved with an app.config entry. I was noticing how the standalone Telerik Report Designer wasn't seeing the MySQL connector, so I dropped MySql.Data.dll into the folder and added the entry to the config file under system.data/DbProviderFactories. What I'm noticing with the Report Designer is, while it's able to enumerate the database objects, as soon as I choose a stored procedure from the list I get the same "Exception has been thrown by the target of an invocation" as I get when I process the report. However, when I use a Select Statement using the MySql syntax of "call myproc('myparam')" it works just fine....

Update... using the Select Statement to call my stored procedure and substituting in my report parameter WORKED. So there's something about calling stored procedures through the MySql connector that's not working correctly. I suppose I have a workaround now, but it's something that should be investigated, probably.
0
Stef
Telerik team
answered on 22 Nov 2013, 03:57 PM
Hello Matt,

As you have found also, the issue is most probably related to the used provider. Try to reinstall it assuring it is registered correctly by its installer or test using other provider. In addition test loading a DataSet using the provider, where you use a Stored Procedure command type.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Stef
Telerik team
Matt
Top achievements
Rank 1
Share this question
or