Bug #25634 Problem to print reports with Crystal Reports XI
Submitted: 15 Jan 2007 18:29 Modified: 17 Jan 2007 9:49
Reporter: Renato Gontijo Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.12 OS:Microsoft Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any
Tags: ADO 2.8 SP1, MyODBC 3.51.12, Mysql 5.0.27

[15 Jan 2007 18:29] Renato Gontijo
Description:
I'm using Windows XP SP2 with last updates and ADO 2.8 SP1.
When I try to create a DSN on "System DSN" to connect to database.

I'm using Crystal Reports XI SP2 and when I try to connect to database using ODBC (RDO) option. The program doens't show any table and database.

When I develop an database using MS Access and then redirect the System DSN to an database MySQL and print do the following error:
Table '' could not be found.

I'm not able to set datasource location because the tables don't appear in Crystal Reports XI (SP2).

How to repeat:
Create databases on MySQL (5.0.27) with the following Structure:

CREATE DATABASE DB1;

USE DB1;

CREATE TABLE `DB1`.`TB1` (
  `COD_TB1` INTEGER NOT NULL,
  `NM_TB1` VARCHAR(45) NOT NULL,
  `CTBLOQ_TB1` DATETIME NOT NULL,
  PRIMARY KEY(`COD_TB1`)
)
ENGINE = InnoDB;

CREATE DATABASE DB2;

USE DB2;

CREATE TABLE `DB2`.`TB2` (
  `COD_TB2` INTEGER NOT NULL,
  `DS_TB2` TEXT NOT NULL,
  `CTBLOQ_TB2` DATETIME NOT NULL,
  PRIMARY KEY(`COD_TB2`)
)
ENGINE = InnoDB;

** After:
.Download all critical updates on Windows XP SP2.
.Try do create a report to print all data of table TB1 of database DB1.
Print report.

Suggested fix:
I guess that some files was altered on Windows Update and generate this problem because I was using the Crystal Reports with MySQL and one day (I don't install anything, only Windows Updates) this error starts and now I'm not able to print and develop any Crystal Report on MySQL.
[15 Jan 2007 18:31] Renato Gontijo
Configuration file that I use

Attachment: my.ini (application/octet-stream, text), 9.05 KiB.

[16 Jan 2007 11:15] Tonci Grgin
Hi Renato and thanks for your problem report.
I am unable to repeat it:
  - MySQL server 5.0.34BK on WinXP Pro SP2 localhost, fully updated just now
  - CR XI 11.0.0.895
  
mysql> insert into tb1 values (1,"testrow1",now()), (2,"testrow2",now());
Query OK, 2 rows affected (0.03 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from tb1;
+---------+----------+---------------------+
| COD_TB1 | NM_TB1   | CTBLOQ_TB1          |
+---------+----------+---------------------+
|       1 | testrow1 | 2007-01-16 12:08:56 |
|       2 | testrow2 | 2007-01-16 12:08:56 |
+---------+----------+---------------------+
2 rows in set (0.02 sec)

mysql>
[16 Jan 2007 11:16] Tonci Grgin
CR fields editor

Attachment: 25634-1.jpg (image/jpeg, text), 5.66 KiB.

[16 Jan 2007 11:17] Tonci Grgin
Printed report

Attachment: 25634.pdf (application/save, text), 35.26 KiB.

[16 Jan 2007 11:23] Tonci Grgin
Renato, even though it is my opinion that this problem has nothing to do with MySQL, you might try using MyODBC driver from ftp://ftp.mysql.com/pub/mysql/download/connectors/odbc/mysql-connector-odbc-3.51.13r136-pr...
and post your findings.

Mind you, this is pre-release version!
[16 Jan 2007 13:58] Renato Gontijo
I downloaded MyODBC 3.51.13 but problem persists.
I made the following test. Now in MyODBC when I create a System DSN to a MySQL database and connect to this database by ADO using system DSN created, is necessary to send command "USE DB1" after connection.
I guess that this is generating this error if I connect to MySQL (in Crystal) using a connection string the database and his tables was listed ok.

But using Access and SQL Server 2000/2005 (Microsoft Access Driver, SQL Server, SQL Native Client Drivers) this is not necessary. I need only to pass DSN name, user and password (DSN=DbX;UID=myuser;PWD=myPAss;).
When I create the System DSN I need to informe how is the database where I will connect. Why do I need inform database that I will use, after connection? With this I only able to connect in MySQL database by Crystal, using connection string, What is bad because I need to make one diferent report for MySQL and one to others database.
It's possible that the message that was generated on Crystal "The table '' could not be found" is because the connection was made but the command "USE DB1" not send and the tables don't show and could't recovery data from database.

This problem was recent I haven't this problem in past. It's very, very strange.
[16 Jan 2007 14:51] Tonci Grgin
Renato, I can't say I fully understand your problem... You can, for sure, create System DSN which points to exact database (pick one from list) and use it in CR... If that's not an option, you can enter commands to be executed at connect while configuring MyODBC.
What MS changed in latest update I realy can not say I just know I had to download 60MB to "fix" my fully functioning box...
[17 Jan 2007 9:49] Renato Gontijo
I resolve the problem setting connection to all tables in report (one-by-one). Only it works. This is a problem with crystal reports and mysql to set connection to reports, but works.

Tanks.
[17 Jan 2007 12:18] Tonci Grgin
Renato, glad your problem is solved.
[9 Jan 2008 16:21] john fumagalli
I have the exact same problem using driver 3.51.19.0 and 3.51.22.0.  I have a box with 3.51.11.00 that does not have this problem but I cannot find the install for this, nor can I find available on the site (although I continue to look)  

I see you have a solution to make table connections one-by-one but I am not sure how to do that.  Can you elaborate on doing this?
[9 Jan 2008 17:13] john fumagalli
I reverted back to 3.51.11.00 driver and it works now.  Anything later than that version retains the problem.