Solved

Crystal Reports The table could not be found.

Posted on 2009-07-16
1
1,769 Views
Last Modified: 2012-05-07
Am writting a general Crystal reports viewer in C#. The application works well with all reports designed using Crystal 2008 but for reports generated with Crystal Reports prior to this version (CR 9 /10 or XI)  I get a 'The table could not be found'. or an error message similar to the one below

Error in File Customer List, with Terms {C8B9B467-656D-4654-9FC2-E663561CD0AF}.rpt:
The table could not be found.

 I edit the same report with CR 2008 making sure I save with with the new version and the program works well. All these reports are designed for MS SQL and the 'Save data With Report' option is switched off always

Question 1. What is causing the 'Table could not be found' ?

Question 2. Can I determine in any way if the CR 2008 API exposes the version of the report in which is had been designed (ie. ver 8.5 9 10 or XI) - Am using a stand alone version..and all reports are external to the application ?
0
Comment
Question by:mprivitera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
mprivitera earned 0 total points
ID: 24870155
Solution

TableLogOnInfo logonInfo = new TableLogOnInfo();

foreach (Table table in objRepDoc.Database.Tables)
{
myTableLocation = table.Name;
logonInfo = table.LogOnInfo;
logonInfo.ConnectionInfo.AllowCustomConnection = true;
logonInfo.ConnectionInfo.ServerName = __PS_ODBC_DSN;
logonInfo.ConnectionInfo.DatabaseName = __PS_Database;
logonInfo.ConnectionInfo.UserID = API_FrontEnd_User;
logonInfo.ConnectionInfo.Password = API_FrontEnd_Password;
logonInfo.ConnectionInfo.Type = ConnectionInfoType.SQL;
logonInfo.ConnectionInfo.IntegratedSecurity = false;

table.ApplyLogOnInfo(logonInfo);

table.Location = __PS_Database + ".dbo." + myTableLocation;

}
INSTEAD OF
 TableLogOnInfo tb = new TableLogOnInfo();
    tb.ConnectionInfo.ServerName = __PS_ODBC_DSN.ToString();
    tb.ConnectionInfo.DatabaseName = __PS_Database.ToString();
    tb.ConnectionInfo.UserID = API_FrontEnd_User.ToString();
    tb.ConnectionInfo.Password = API_FrontEnd_Password.ToString();
    tb.ConnectionInfo.IntegratedSecurity = false;

    for (int ii = 0; ii < objRepDoc.Database.Tables.Count; ii++)
     {
     objRepDoc.Database.Tables[ii].LogOnInfo.ConnectionInfo.AllowCustomConnection = true;
     objRepDoc.Database.Tables[ii].ApplyLogOnInfo(tb);
     }
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question