Mastodon
Programmierung

QuickReport, Win2000 and AccessViolation

Q: QuickReport (QR) brings AccessViolations on Win2000 if
i try to print more or bigger pages or pages with graphics.
What can i do?

A:
Win2000 has a long Temp-Path which QR doesn’t like
Solution a) set the Temp-Path variable of Win2000 to a short path like ‘c:\temp’

Solution b) if you have the QR sources then fix this problem by setting the
String-Variable for the temp-path to 255 chars.

[code lang=”delphi”]Source: QRprntr.pas

function TempFilename : string;
var
AName,
ADir : array[0..255] of char;
{$ifndef win32}
ADrive : char;
{$endif}
begin
{$ifdef win32}
GetTempPath(255, adir);
GetTempFilename(aDir, PChar(‘QRP’), 0, aName);
{$else}
ADrive := GetTempDrive(ADrive);
GetTempFilename(ADrive, PChar(‘QRP’), 0, aName);
{$endif}
result := StrPas(aName);
end;
[/code]

[tags]Delphi, Printing[/tags]

0 Kommentare zu “QuickReport, Win2000 and AccessViolation

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.