Hi,
I've develpoed a dozen Telerik reports for my application.
I connect to any handy datasource to design and preview reports but in production I always supply a dataset myself like this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
Me.DataSource = dt
End Sub
This works fine for everything except my new xtab report where I get the exception - the data is present and correct but the report crashes the development PC as it trys in vain to use the data passed to it.
If I delete the SQLdatasource1 used to preview it still cannot match the data correctly.
Please help
I've develpoed a dozen Telerik reports for my application.
I connect to any handy datasource to design and preview reports but in production I always supply a dataset myself like this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
Me.DataSource = dt
End Sub
This works fine for everything except my new xtab report where I get the exception - the data is present and correct but the report crashes the development PC as it trys in vain to use the data passed to it.
If I delete the SQLdatasource1 used to preview it still cannot match the data correctly.
Please help
6 Answers, 1 is accepted
0
Hi Graham,
Make sure the connectionString name in the configuration file of your actual application matches connectionString name in the app.config of the report class library. If there are no connections in your app, copy the one from your class library. You can find more info on why this is needed from the following KB article: Using connectionStrings from configuration file.
All the best,
Steve
the Telerik team
Make sure the connectionString name in the configuration file of your actual application matches connectionString name in the app.config of the report class library. If there are no connections in your app, copy the one from your class library. You can find more info on why this is needed from the following KB article: Using connectionStrings from configuration file.
All the best,
Steve
the Telerik team
0
graham
Top achievements
Rank 1
answered on 22 Nov 2010, 07:01 PM
Hi Steve,
Thank you for the reply.. I have seen other articles related to this issue talking about connection strings. I have tried what you have suggested in App.config and web.config but this hasn't fixed the issue.
The use of connectionstrings confuses me further.. I am passing the report a full dataset, so why would it need a connectionstring?
The preview used to work when using SqlDataSource1 now after implementing your change it doesn't work in preview or when passed a full dataset.. It seems it can't link the data passed to it with the fields defined in the report?
Also please note it works on all my other reports except for this cross-tab, is there anything different about a cross-tab report?
OK - I've set up TelerikConnectionString consistent in app.config and web.config.
I've made another Xtab report and got it previewing OK.
I then use main production app and pass report a full dataset
I get following error...
An exception has occured while processing '' item:
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateConnection()
at Telerik.Reporting.Processing.Data.SqlDataEnumerable.SqlDataEnumerator.CreateReader()
at Telerik.Reporting.Processing.Data.SqlDataEnumerable.SqlDataEnumerator.MoveNext()
at Telerik.Reporting.Processing.Data.ResultSet.SeedData(IEnumerable`1 rawData)
at Telerik.Reporting.Processing.Data.ResultSet.Fill(IEnumerable`1 data)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.Execute(MultidimensionalQuery query)
at Telerik.Reporting.Processing.Table.ProcessItem()
at Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data)
*** Report Processing DONE in 00:00:25.1013483 ***
Now my report is broken again - won't preview and won't run production data.
Help much appreciated.
Many thanks,
Graham
Thank you for the reply.. I have seen other articles related to this issue talking about connection strings. I have tried what you have suggested in App.config and web.config but this hasn't fixed the issue.
The use of connectionstrings confuses me further.. I am passing the report a full dataset, so why would it need a connectionstring?
The preview used to work when using SqlDataSource1 now after implementing your change it doesn't work in preview or when passed a full dataset.. It seems it can't link the data passed to it with the fields defined in the report?
Also please note it works on all my other reports except for this cross-tab, is there anything different about a cross-tab report?
OK - I've set up TelerikConnectionString consistent in app.config and web.config.
I've made another Xtab report and got it previewing OK.
I then use main production app and pass report a full dataset
I get following error...
An exception has occured while processing '' item:
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateConnection()
at Telerik.Reporting.Processing.Data.SqlDataEnumerable.SqlDataEnumerator.CreateReader()
at Telerik.Reporting.Processing.Data.SqlDataEnumerable.SqlDataEnumerator.MoveNext()
at Telerik.Reporting.Processing.Data.ResultSet.SeedData(IEnumerable`1 rawData)
at Telerik.Reporting.Processing.Data.ResultSet.Fill(IEnumerable`1 data)
at Telerik.Reporting.Processing.Data.SqlQueryProvider.Execute(MultidimensionalQuery query)
at Telerik.Reporting.Processing.Table.ProcessItem()
at Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data)
*** Report Processing DONE in 00:00:25.1013483 ***
Now my report is broken again - won't preview and won't run production data.
Help much appreciated.
Many thanks,
Graham
0
Hi Graham,
First we would like to note that we do not do anything specific when it comes to connectionStrings and this is how .NET works.
When you use the SqlDataSource Component, it asks you whether you want to save the connectionString to the application settings. This is how the report runs in preview by using the connectionString from it. However in your actual application, this connection does not exist and that is why you should copy it from the app.config to the web.config of your web site/app. According to the stack trace you've pasted, this is still the problem, so please double check the steps you've taken.
All the best,
Steve
the Telerik team
First we would like to note that we do not do anything specific when it comes to connectionStrings and this is how .NET works.
When you use the SqlDataSource Component, it asks you whether you want to save the connectionString to the application settings. This is how the report runs in preview by using the connectionString from it. However in your actual application, this connection does not exist and that is why you should copy it from the app.config to the web.config of your web site/app. According to the stack trace you've pasted, this is still the problem, so please double check the steps you've taken.
All the best,
Steve
the Telerik team
0
graham
Top achievements
Rank 1
answered on 24 Nov 2010, 08:29 PM
Hi Steve,
I haven't had time to do anything new on this today but just a quick comment though, I'm passing a full dataset to my report so why does the report need a connection string? I only need a connection for the Preview function, otherwise the report just needs to match the fieldnames in the datatable I have passed to it!
I connect to any handy datasource to design and preview reports but in production I always supply a dataset myself like this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
Me.DataSource = dt
End Sub
The error comes in production mode - I can see the datasource is all present and correct but it still errors out.
Regards
Graham
I haven't had time to do anything new on this today but just a quick comment though, I'm passing a full dataset to my report so why does the report need a connection string? I only need a connection for the Preview function, otherwise the report just needs to match the fieldnames in the datatable I have passed to it!
I connect to any handy datasource to design and preview reports but in production I always supply a dataset myself like this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
Me.DataSource = dt
End Sub
The error comes in production mode - I can see the datasource is all present and correct but it still errors out.
Regards
Graham
0
graham
Top achievements
Rank 1
answered on 25 Nov 2010, 12:03 PM
Hi Steve,
Finally solved this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
'Me.ReportParameters(0).Value = ReportTitle
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
'Me.DataSource = dt
Me.Crosstab1.DataSource = dt
End Sub
The missing line is now shown in bold above - I thought tat if the crosstab was the only thing on the report that 'Me.DataSource = dt' would fill it.
Regards
Finally solved this...
Public Sub New(ByVal sConn As String, ByVal sSQL As String, ByVal ReportTitle As String)
InitializeComponent()
'Me.ReportParameters(0).Value = ReportTitle
Dim ds As DataSet = SnagRData1.getDataSet(sSQL, sConn, "qSchedXtab")
Dim dt As DataTable
dt = ds.Tables("qSchedXtab")
'Me.DataSource = dt
Me.Crosstab1.DataSource = dt
End Sub
The missing line is now shown in bold above - I thought tat if the crosstab was the only thing on the report that 'Me.DataSource = dt' would fill it.
Regards
0
Hi Graham,
Somehow I've missed the explanation in your previous post, that the problem is only related to the crosstab - sorry for that. Indeed the Table/CrossTab item is a Data Item i.e. a separate data region, so it needs to be bound on its own, exactly as you did.
Regards,
Steve
the Telerik team
Somehow I've missed the explanation in your previous post, that the problem is only related to the crosstab - sorry for that. Indeed the Table/CrossTab item is a Data Item i.e. a separate data region, so it needs to be bound on its own, exactly as you did.
Regards,
Steve
the Telerik team