Cannot pint, AccessViolation...
Hi,
I try to print to ArchiveFile, I have no printer installed.
An access violation is raised
in unit: ppDrwCmd
in function: function DetermineHeight(BWidth: Integer; var BHeight:
Integer): Boolean;
because ppPrinter is not assigned.
and try to GetPixelsPerInch.
function TppCustomPrinter.GetPixelsPerInch: TPoint;
begin
FLock.Acquire; //!! ACCESS VIOLATION WILL OCCOUR HERE !!//
try
{call GetDC which will create a DC and determine devcaps, if needed }
GetDC;
if FDC <> 0 then
Result := FPixelsPerInch
else
Result := Point(Screen.PixelsPerInch, Screen.PixelsPerInch);
finally
FLock.Release;
end;
end; {function, GetPixelsPerInch}
best regards
Ferenc Nemeth
I try to print to ArchiveFile, I have no printer installed.
An access violation is raised
in unit: ppDrwCmd
in function: function DetermineHeight(BWidth: Integer; var BHeight:
Integer): Boolean;
because ppPrinter is not assigned.
and try to GetPixelsPerInch.
function TppCustomPrinter.GetPixelsPerInch: TPoint;
begin
FLock.Acquire; //!! ACCESS VIOLATION WILL OCCOUR HERE !!//
try
{call GetDC which will create a DC and determine devcaps, if needed }
GetDC;
if FDC <> 0 then
Result := FPixelsPerInch
else
Result := Point(Screen.PixelsPerInch, Screen.PixelsPerInch);
finally
FLock.Release;
end;
end; {function, GetPixelsPerInch}
best regards
Ferenc Nemeth
This discussion has been closed.
Comments
Which version of ReportBuilder are you using? This bug may have been
addressed in a patch or update.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Are you using XP Pro SP2?
We had no problems with RB and other Word Processing products with no
printer installed on XP untill we upgraded to XP SP2. After the upgrade
unless there was a printer assigned we were getting access violations on a
regular basis.
XP SP2 seemed to have changed a number of features of printing.
Hope this helps
ReportBuilder Enterprise Edition
Version 7.04
thank you, but I think it will not help.
I am using XP with SP2. I have spent 2 days to solve this problem. You
can meet this problem on a Win 2000 server, Win 2003 server or XP. If
there is NO PRINTER INSTALLED, or the printer IS NOT READY, you will get
this AV.
I think if you use Barcode, then the above code will run, and raise an
AV. because it uses TppCustomPrinter.GetPixelsPerInch.
best regards
Ferenc Nemeth