Crystal Reports give the error "20507 Invalid file name"

This error really is what the message says - the filename is invalid.

What it really means is that the report is not where the CGI expects it to be, and that the Crystal runtime engine cannot locate the report for execution.

Normally, the CGI (MET_EX.EXE) executes reports in it's own directory (usually CGI-BIN). This is done to prevent security problems arising from allowing the CGI to execute reports in another directory. So - the first step is to make sure that the report you are trying to execute is located in the same directory where the CGI is.

If it is not feasible to keep your Crystal reports used by Metrology Xplorer® in the CGI-BIN directory, then you have to inform the CGI that these reports are located in another directory. To direct the CGI to your report location, create (or modify) a text file in the CGI-BIN directory named METEX.INI. Create a line in this file as follows:

METCAL=(drive/path of your reports)

For example, if your reports are on the D: drive on your server in the "metcal" directory, then the line would look as follows:

METCAL=D:\metcal

This line informs the CGI to get it's reports from the "D:\metcal" directory instead of the CGI-BIN directory.

The last issue to check is to see if the report actually exists in the directory that the CGI is executing reports from. It is possible to configure the Metrology Xplorer® administration utility to get report filenames from a local or network location, and those report filenames are not the same as what exists in the location that the CGI executes reports from. Double-check to make sure that the name of the report as shown in the administration utility actually exists in the CGI report directory.