AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Delphi Fastreport PDF Erstellen stürtzt ab
Thema durchsuchen
Ansicht
Themen-Optionen

Fastreport PDF Erstellen stürtzt ab

Ein Thema von franktron · begonnen am 3. Aug 2018 · letzter Beitrag vom 3. Aug 2018
Antwort Antwort
franktron

Registriert seit: 11. Nov 2003
Ort: Oldenburg
1.446 Beiträge
 
Delphi 10.2 Tokyo Enterprise
 
#1

Fastreport PDF Erstellen stürtzt ab

  Alt 3. Aug 2018, 10:42
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='TfrxPictureViewthen
               Begin
                  v2:=TfrxPictureView.Create(B1);
                  S1.Seek(0,0);
                  v2.LoadFromStream(S1);
                  v2.Name:='Firmenkopf_'+IntToStr(i);
            If Header.Name='Picture_Backgroundthen
            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;
Frank
Tux sein Lieblingsquellcode
While anzfische<TuxSatt do begin
Fisch:=TFisch.Create; Tux.EssenFisch(Fisch); Fisch.Free;inc(anzfische); end;
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: Fastreport PDF Erstellen stürtzt ab

  Alt 3. Aug 2018, 10:55
Ich würde, auch wenn es vielleuicht nichts mit dem Problem zu tun hat
Delphi-Quellcode:
              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;
durch
Delphi-Quellcode:
        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;
ersetzen.
Markus Kinzler
  Mit Zitat antworten Zitat
Benutzerbild von haentschman
haentschman

Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.297 Beiträge
 
Delphi 12 Athens
 
#3

AW: Fastreport PDF Erstellen stürtzt ab

  Alt 3. Aug 2018, 10:58
Zitat:
Hier der Code an dem ich glaube das das Problem liegt.
Delphi-Quellcode:
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;
Left, Top, Width, Height... soll der Compiler die aus v2 oder der Form benutzen? Das ist genau ein Beispiel warum man with wegläßt.
  Mit Zitat antworten Zitat
franktron

Registriert seit: 11. Nov 2003
Ort: Oldenburg
1.446 Beiträge
 
Delphi 10.2 Tokyo Enterprise
 
#4

AW: Fastreport PDF Erstellen stürtzt ab

  Alt 3. Aug 2018, 13:45
Zitat:
Hier der Code an dem ich glaube das das Problem liegt.
Delphi-Quellcode:
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;
Left, Top, Width, Height... soll der Compiler die aus v2 oder der Form benutzen? Das ist genau ein Beispiel warum man with wegläßt.
Das script ist aus einer Unit und keine Form weit und breit
Frank
Tux sein Lieblingsquellcode
While anzfische<TuxSatt do begin
Fisch:=TFisch.Create; Tux.EssenFisch(Fisch); Fisch.Free;inc(anzfische); end;
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz