Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem viewing Crystal Report written against FoxPro db

Status
Not open for further replies.

jstangel

Technical User
Jan 31, 2008
21
I'm trying to create a couple of reports against a FoxPro application. I currently use Crystal Reports XI and have no issues when running reports against SQL databases. I have been able to successfully set up an ODBC connection to the FoxPro tables and I can run the reports locally in Crystal Developer. The issue I am having is running the reports on the BusinessObjects InfoView. Anytime I try to run the report on demand or schedule it, I receive the following error:

The table 'x' could not be found. Error in File C:\WINDOWS\TEMP\{B6E59083-036E-42F3-BF77-8A07F457DE3A}.rpt: The table could not be found.

Any ideas what could be causing this error? I have already verified all the correct permissions are on the folders containing the db files, and I'm not quite sure what else to look at.
 
Do you know which version of FoxPro was used to create your tables? If it was fairly recent (6.0 or later), then you should not be using ODBC from within BO. Switch to using the FoxPro OLE DB provider instead. That will solve a lot of problems.

Having said that, this particular problem might be caused by some sort of pathing issue. If so, it might be helpful if you post the code that invokes the report. But I suggest you change to OLE DB first, which would be worth doing in any case

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
The error of not finding a table/file could also be a permission error. From what I google InfoView is a web interface and would typically run on an IIS webserver service. The account running IIS is typically a limited system account and has neither network access nor any more access to folders, than it needs (eg to
You may have checked permissions, but towards users of InfoView, which wouldn't matter. It's the IIS system account that needs file access.

Bye, Olaf.
 
Thanks Mike. I'm not sure what version of FoxPro the program uses, it is from a third party vendor that is very unsupportive of me using Crystal to run reports. I did take your suggestion, however, and rewrote my report (it is a very small and simple one) using the OLE DB. To be honest, I am completely unfamiliar with FoxPro and OLE DB's, I have only ever written reports using ODBC connections to SQL db's before.

After changing it to an OLE DB, I resaved it to my InfoView and tried running it again. On the upside, I am no longer receiving the "table could not be found" error. On the downside, I am still having issues running the report. I am hoping I did something wrong setting up the OLE DB.

When asked for the data source, I am assuming that I enter the path for the shared folder containing the db tables. For the user ID and password, I initially entered my application login info and am able to successfully run the report from my local machine. Same with using my NT info as well as not entering any info in. When I try to run it on InfoView, however, it is asking for login info and nothing I enter seems to work. By chance do you have any suggestions on how to identify what login info is needed here?
 
Jstangel,

You're right that the datasource is the folder (shared or otherwise) containing the data files. But let me clarify that.

If your FoxPro data consists of "bound" tables, you need to point the datasource to a folder containing a DBC file. Essentially, if you can see a DBC file (probably a file whose name is that of the database and whose extension is DBC) somewhere in the application's data, that is the directory that you must point to.

If you can't see a DBC, but you can see several (or many) DBF files (possibly with some CDXs, FPTs, and others), then it is the directory containing those files that is your datasource.

Re your login details, FoxPro does not require a login or password for its database. The OLE DB provider should never prompt you for one. If the BO InfoView is prompting you, then that is an issue for BO.

However, in Crystal Reports, I've occasionally seen a case where the report prompts for a login, and always rejects whatever you offer; this usually turns out to be some other problem in the datasource, unrelated to logins. I would guess that's what's happening here, although I'm afraid I can't give you any idea of what the actual problem is. Sorry.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Jstangel,

My above post isn't quite correct. If a DBC is present, then you must set the Database Type to "Visual FoxPro Database (DBC)", and set the path to the actual DBC file (not the containing folder).

If there's no DBC, set the type to "Free table directory" and the path to the folder containing the DBF files.

Another possibility is to check the "Exclusive" setting (in the OLE DB setup). (It might be shown under "Advanced" or "Options".) If it is ticked, and if the database is in use by another user or process, that could explain the error you are seeing (although it's not likely, given that the checkbox is not ticked by default).

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thanks so much, you have been extremely helpful! I think you are correct that the login issue I am seeing now is specific to BO. When I run the report locally it doesn't prompt for or require a user ID and password, only when I try to run it from the web. I will have to research more on that end and in the meantime I can just run the reports I need manually. Once again, thank you for all your help.
 
So not quite sure what I did, but I tried this report again in BO Enterprise and it appears to be working now when I schedule it.

To be specific, I decided to try it again. I went back to my original reports written against the ODBC connection I had initially created. I reset the datasource location on the reports to the OLE DB connection (which I set using the full server path, eg \\servername\shared\dbfolder). I saved a fresh copy to Enterprise. When I try to run it on demand, I am still getting a prompt for a log in that I can't get past, but if I schedule the report with no log in, it is now running successfully. Previously it was failing saying I had invalid login credentials when I tried to schedule it.

So all is working now. Thanks again for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top