I have a problem with either the Data Source not pointing to the correct place or Crystal "seeing" the data diffently when using an ADO.NET connection within VB.Net to the ODBC(RDO) connection directly from Crystal.
I appear to potentially have two problems one within Crystal and the other with VB.Net which may or may not be linked.
I initially was able to create a Data Source within VS 2005 using the standard "Data Source Configuation Wizard" to an ODBC complient accounting database called Sage using the ".NET Framework Data Provider for ODBC". I am now able to create the connection string and test the connection which is successful but when I get to page four of the wizard "Choose Your Database Objects" I get an error and no objects are displayed to choose from. The error is
"An error occured while retrieving the information from the database:
An item with the same key has already been added."
and I can not go on to complete creating the dataset.
I can get around this by creating a Connection String as an Application Setting and then adding a DataSet object to the project which is then linked to the Application Setting Connection String - all appears to work as it should. I can add the TableAdapters and Preview the Data success fully but when I then try and write a Crystal report using the Table it displays completely different data. It does not matter what table I use from the database the crystal report, which is extremely simple list of four field with no sorting or grouping, displays the same information from somewhere else - no idea where.
If I use the Crystal Reports "Set Datasource Location" to change from using the ADO.NET source I created in VS to the ODBC(RDO) System DSN setting then the data is correctly displayed. (As an aside when I look at the properties of the ADO.NET source within the Crystal "Set Datasource Location" it shows me the Internal Connection ID: {e8b56615-ef0b-473a-bd44-50cc8db161ec} - where can I find what my computer actually thinks that connection relates to).
Below is an extract of the report (two text fields and two numberic and columns should be aligned! ) :
Code:[ACCOUNT REF] [NAME ] [ BALANCE] [ BUDGET] Correct data is shown as: 0025 Fixed Assets 1200.00 1000.00 0030 Depreciation 123.00 123.00 etc.... Where as the incorrect data is (whole report): Purple Friday 310 284 Yellow Saturday 109 10 Navy Sunday 111 105 Lime Monday 42 200 Green Thursday 86 14 Teal Saturday 175 221 Gray Tuesday 78 258 Navy Tuesday 217 172 Teal Wednesday 35 316 Teal Wednesday 62 120
Any ideas ...




Reply With Quote