CR XI: Invalid Index if report is designed using more than 1 dataset datatable
Posted on 2006-05-16
Hi experts, I need some helps here, thanks in advanced~
Development Environment : VS.NET 2003
CR Version: CR XI R2 Developer
Recently I am upgrading all my reports from CR9 to CRXI. I hits many problems in the middle but managed to solve them all except the problem mentioned at the title. Every report are working perfectly, but for all the reports that designed using more than 1 datatable (I used OLE DB->Add command to insert more than 1 tables) keep on prompting me "Invalid Index" error while doing data binding at runtime.
I used to use the similiar code below to do data binding:
/* some code to get data from database............*/
dtTable1.TableName := "Table1"; //Table1, Table2 is the matched table name in CRXI
dtTable2.TableName := "Table2";
This works in CR9 but not in CRXI. It seems that CRXI only allow SetDataSource to be execute only 1 time no matter how.
I tried took off any one of the table from the report and runtime code and the report works perfectly. I tried using DataSet instead of DataTable, I tried putting all DataTables into one DataSet... but none of them working.
I am stucked now, spent one whole day searching from articles from internet or bugs report from Crystal Decisions but have no luck. Is this the draw back of CRXI that It only support 1 Table if we are using Add Command to design the report? Any of you have experience on this? Pls comment, thanks.