Solved

Crystal Reports The table could not be found.

Posted on 2009-07-16
1
1,767 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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