• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Cannot create file

I have an aplication running on Delphi 4. This uses Quickreports version 3.0 And it works fine. Now, I've installed the same aplication on Windows XP. When I try to generate a reporte an error ocurr: "EFC CREATE ERROR WITH MESSAGE CANNOT CREATE FILE".

If you know something about it i'll apreciate it.

Thanks...
0
gemohe
Asked:
gemohe
1 Solution
 
vaceroseCommented:
This is a possibility.  Quoted from Quick Report help

Q.  My report crashes under Windows 2000 and/or Windows NT
A.  In qrprntr.pas, there is a function named TempFileName and it is probably not allocating enough characters for the path to the Windows temp directory.  This has been addressed for QR 3.0.5.  For QR2, you can replace the function with the following code:
function TempFilename : string;
var
  AName,
  ADir : array[0..255] of char;
begin
  GetTempPath(255, adir);
  GetTempFilename(aDir, PChar('QRP'), 0, aName);
  result := StrPas(aName);
end;

An alternative to this is changing the TEMP system variable to a shorter path, like C:\WINDOWS\TEMP

The problem could also be user permissions, have you tried installing/running as an administrative user?
0
 
SJohnsonCommented:
I've seen this happening on a few apps before, and yacerose has the solution.

Previously, your temp dir was in C:\WiNDOWS\TEMP.  Now it's in C:\Documents and Settings\<yourname>\Local Settings\temp.  So it's considerably longer than the default size allocated.

Stu
0
 
calinutzCommented:
Do you have writing rights on that XP ?
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now