Title: Message
Has anyone looked at the source code for correcting this issue, if they have the professional version?
 
We currently use 2.0 registered version for some some software. I did a search for GetTempPath in all of the source code and found only one file, QRPRNTR.PAS
 
There is a function in there defined as follows. This is the only reference to the API call in this unit.
 
function TempFilename : string;
var
  AName,
  ADir : array[0..80] of char;
{$ifndef win32}
  ADrive : char;
{$endif}
begin
{$ifdef win32}
  GetTempPath(30, adir);
  GetTempFilename(aDir, PChar('QRP'), 0, aName);
{$else}
  ADrive := GetTempDrive(ADrive);
  GetTempFilename(ADrive, PChar('QRP'), 0, aName);
{$endif}
  result := StrPas(aName);
end;
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Patrick Dunford
Sent: Monday, 24 September 2001 13:57
To: Multiple recipients of list delphi
Subject: [DUG]: Q uickreports and Temp path (was Metafile not valid)

Is there any Borland documentation for the Quickreport thing?
 
Qusoft on their website says "We are not responsible for the free version supplied with Delphi, Borland is" then on Borland's web site, I can't find any documentation at all of the problem.
 
Also I am not very thrilled with Qusoft's explanation of the problem as saying glibly that MS's long temp paths break lots of apps when all they had to do was follow the API documentation. For the GetTempPath function it gives the following:
 
"If the function succeeds, the return value is the length, in characters, of the string copied to lpBuffer, not including the terminating null character. If the return value is greater than nBufferLength, the return value is the size of the buffer required to hold the path. "
 
Buffer overruns are one of the most common errors known to mankind :) 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sammy
Sent: Monday, 24 September 2001 06:39
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Metafile not valid

Taken from Windows 2000 Help ........

 

To add or change the values of environment variables

  1. Open System in Control Panel.
  2. On the Advanced tab, click Environment Variables, then click the name of the user variable or system variable you want to change, as follows:
    • Click New to add a new variable name and value.
    • Click Edit to change a current variable name and value.
    • Click Delete to remove a variable name and value.

 Notes

  • If you are not logged on as administrator to the local computer, the only environment variables you can change are user variables.
  • To open a Control Panel item, click Start, point to Settings, click Control Panel, and then double-click the appropriate icon.
  • Windows 2000 saves changes in the registry so they are available automatically the next time you start your computer.
  • You may have to close and reopen running programs for the new settings to take effect.
 
 
Sammy !!
----- Original Message -----
Sent: Monday, September 24, 2001 1:31 AM
Subject: RE: [DUG]: Metafile not valid

How do you change the temp path in Windows 2000?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James Sugrue
Sent: Monday, 13 August 2001 14:35
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Metafile not valid

Just to back up what Nello and Craig have said, I found this by searching Deja in delphi.reporting-charting
 
 
>Hello
>
>I have experienced the same problem, and resolved by changing temp file path
>in Win2K.
>Please refer the following suggestion.
>--------------------------------------------
>It is because QR cannot handle the length of the default temp file
>path in Win2000.   If you don't have the QR source code, change your
>windows temp file path to something shorter.
-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Monday, 13 August 2001 14:18
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Metafile not valid

OK Craig and Nello
 
I'm going to be on site tomorrow and I'll check those suggestions.
 
Sorry, Nello, for dismissing the Temp directory pointer _ I did not realise that they were 'somehow connected'!
 
Thanks for the input.
 
Mark
----- Original Message -----
Sent: Monday, August 13, 2001 1:58 PM
Subject: Re: [DUG]: Metafile not valid

Mark
 
It would surprise me if the BDE version is in play here (but being
surprised often is one of the charms of this business <g> )
 
I vaguely recall that the "metafile problem" and the "TEMP problem"
are somehow connected.
 
Some guesses to try ...
 
1.  checking permissions on your TEMP directory to insure you
    aren't having a problem accessing it
 
2.  check that the path to your TMP and TEMP dirs are not "too long"
    I think there is a problem about this.
 
-ns
 
----- Original Message -----
Sent: Monday, August 13, 2001 8:36 AM
Subject: Re: [DUG]: Metafile not valid

Nello
Can't find an update newer than the one I have (3.0.7) for QRStandard and D5.
There IS one for D6 but that is no good for me.
Curious thing is that I am running Win2000 Pro as my development machine, without this problem.
 
Question:  If different workstations had different versions of the BDE installed could this cause the reported problem?
 
Mark
----- Original Message -----
Sent: Monday, August 13, 2001 12:00 PM
Subject: Re: [DUG]: Metafile not valid

around last May I remember reading about 2 QR problems
in Windows 2000.   One had something to do with TEMP files
and this was the other one.
 
ISTR QuSoft fixed both in a 2K update available on their
website.   Probably worth a look.    (www.qusoft.com ?)
 
-ns
----- Original Message -----
Sent: Monday, August 13, 2001 6:23 AM
Subject: [DUG]: Metafile not valid

Hi
 
Have a site running a a Windows LAN and my app based on Paradox.
 
They have recently upgraded one of their workstations to Win2000 Pro (and I suspect added some other software)
 
Now my app is generating an error message whenever this user previews a report and tries to view the second page.
The reports are QuickReports and the message is "Metafile not valid".
 
Has anyone come across this before or provide any insights as to where I might start looking?
 
TIA
 
Mark

Reply via email to