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!

REPORT command error: "Report file is invalid."

Status
Not open for further replies.

wgcs

Programmer
Mar 31, 2002
2,056
EC
Some of our customers get this error: "Report file is invalid." (error #50). If they get it once, it seems persistant.. that that report always throws that error, though I can never reproduce the problem. The same installation package works fine on other computers.

There are two spaces between "file" and "is", which indicates it's trying to put the report file name in, but somehow things the report file is blank.

The command that throws the error (there are a couple, this is an example) is:

REPORT FORM (rpt_name) NOEJECT NOCONSOLE to Printer

I have verified from my error log files:
rpt_name="DivTeam"
Dbf()="C:\AAS\TTWIN\TMP.DBF"
Set('Defa')+curdir()="C:\AAS\TTWIN"
SET('PRINTER')="C:\DOCUME~1\MARTYD~1\LOCALS~1\Temp\TT_25323.TMP"

 
wgcs

Is your report compiled in your exe or a your distributing it separately? It sounds like it is supplied separately and it gets corrupted. You may consider including it in the exe and just send the exe, not separate reports.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hmm..
Mike, if the report is Included in the EXE.. does that mean, I don't have to distribute the FRX file (even a new one that the client doesn't have?)...

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
It is supplied separately, because the user can select between different printers (with different LPP settings), and it's impossible to edit a report that is embedded in the .EXE

I've sent the latest customer a patch to install known-good copies of the report files.

However, it seems odd to me that the report file name doesn't show up in the error message where the help says it would... and in testing, when I corrupt a report file and try to generate the report, it does show the report file name.
 
If you do include the report in the EXE, you don't have to distribute the (reportname).FRX file or (reportname).FRT file.

Also, the file Inside the .EXE will take precedence over any files outside the EXE, so if you already distributed reports externally, you don't have to worry. However, you won't be able to send updates by just sending the .FRX/T's either.

And, as I noted, the embedded reports can't be changed in any way.
 
TeknoSDS

Mike, if the report is Included in the EXE.. does that mean, I don't have to distribute the FRX file (even a new one that the client doesn't have?)...

If you clients do not have the need or the desire to modify your reports, no, include them in the exe, and also make sure that you client doesn't have any .FRX files laying around that could be mistaken for the one's that are included in the exe, because my understanding is the the sequence is, if you say for example :
do c:\myapp\reports\myReport.frx to printer. VFP 1st looks at that path and if there is a physical file there is will use it, otherwise in will then look within the application for the alternate one. Been doing this for years.

wgcs

As I see your error, according to microsoft ( the name of the report should be there, hence the space (if you do ERROR 50 in the command window you see the space), it may be either a wrong report path issue, or VFP just cannot find the path of the report.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top