Solved

Cannot create file

Posted on 2004-10-21
370 Views
Last Modified: 2010-04-05
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
Question by:gemohe
    3 Comments
     
    LVL 1

    Accepted Solution

    by:
    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
     
    LVL 1

    Expert Comment

    by:SJohnson
    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
     
    LVL 11

    Expert Comment

    by:calinutz
    Do you have writing rights on that XP ?
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Prepare to Pass the CompTIA A+ 900 Series Exam

    CompTIA aims to adapt its A+ Certification to reflect the most current knowledge and skills needed by today's IT professionals--and this year's 2016 exam is harder than ever. This certification is one of the most highly-respected and sought after in IT.

    Suggested Solutions

    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    884 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now