![]() |
Fastreport PDF Erstellen stürtzt ab
Ich habe ein Notebook (Windows Profil) habe letztens das Notebook durch einen neuen ersetzt
Wenn ich Drucken oder eine Vorschau mache geht alle, wenn ich aber eine PDF erzeugen mit frxPDFExport will bekomme ich eine Zugriffsverletzung. Hier der Code an dem ich glaube das das Problem liegt. Ich kann leider kein madexcept nutzen da das Projekt noch mit Delphi 2006 und Fastreport 6 erstellt ist.
Delphi-Quellcode:
If Header.Typ='TfrxPictureView' then
Begin v2:=TfrxPictureView.Create(B1); S1.Seek(0,0); v2.LoadFromStream(S1); v2.Name:='Firmenkopf_'+IntToStr(i); If Header.Name='Picture_Background' then Begin v2.Name:='Picture_Background'; with v2 do begin Left:= -(report.Pages[1] as TfrxReportPage).LeftMargin * fr01cm; Top:= -(report.Pages[1] as TfrxReportPage).TopMargin * fr01cm; Width:= (report.Pages[1] as TfrxReportPage).PaperWidth * fr01cm; Height:= (report.Pages[1] as TfrxReportPage).PaperHeight * fr01cm; end; End; End; |
AW: Fastreport PDF Erstellen stürtzt ab
Ich würde, auch wenn es vielleuicht nichts mit dem Problem zu tun hat
Delphi-Quellcode:
end;
with v2 do
begin Left:= -(report.Pages[1] as TfrxReportPage).LeftMargin * fr01cm; Top:= -(report.Pages[1] as TfrxReportPage).TopMargin * fr01cm; Width:= (report.Pages[1] as TfrxReportPage).PaperWidth * fr01cm; Height:= (report.Pages[1] as TfrxReportPage).PaperHeight * fr01cm; durch
Delphi-Quellcode:
ersetzen.
v2.Left:= -(report.Pages[1] as TfrxReportPage).LeftMargin * fr01cm;
v2.Top:= -(report.Pages[1] as TfrxReportPage).TopMargin * fr01cm; v2.Width:= (report.Pages[1] as TfrxReportPage).PaperWidth * fr01cm; v2.Height:= (report.Pages[1] as TfrxReportPage).PaperHeight * fr01cm; |
AW: Fastreport PDF Erstellen stürtzt ab
Zitat:
Delphi-Quellcode:
Left, Top, Width, Height... soll der Compiler die aus v2 oder der Form benutzen? :wink: Das ist genau ein Beispiel warum man with wegläßt. :wink:
with v2 do
begin Left:= -(report.Pages[1] as TfrxReportPage).LeftMargin * fr01cm; Top:= -(report.Pages[1] as TfrxReportPage).TopMargin * fr01cm; Width:= (report.Pages[1] as TfrxReportPage).PaperWidth * fr01cm; Height:= (report.Pages[1] as TfrxReportPage).PaperHeight * fr01cm; end; |
AW: Fastreport PDF Erstellen stürtzt ab
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:26 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz