Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Reports The table could not be found.

Posted on 2009-07-16
1
Medium Priority
?
1,773 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline

610 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