frxReport SaveToFile

edited 8:30AM in FastReport VCL 5
NEW

<TfrxReport Version="5.5" DotMatrixReport="False" IniFile="/Software/Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Padr??o" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="40137,4756620949" ReportOptions.Description.Text="" ReportOptions.LastChange="42521,5861578704" ScriptLanguage="PascalScript" ScriptText.Text="var;;numrelacao: integer;;;;;procedure Child2OnBeforePrint(Sender: TfrxComponent);;;begin;; Child2.Visible := ;frxDBRelatorio3.;observped;; ;; '';;;end;;;;;procedure Child6OnBeforePrint(Sender: TfrxComponent);;;begin;; Child6.Visible := ((;DadosRelatorio.;observped;; ;; '') or (;DadosRelatorio.;obscredped;; ;; ''));;;end;;;;;procedure GroupHeader14OnBeforePrint(Sender: TfrxComponent);;;begin;; numrelacao:=;frxDBRelatorio7.;numeroren;;;;;end;;;;;procedure GroupHeader20OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;frxDBRelatorio8.;numeroren;; ;; numrelacao then;; begin;; GroupHeader20.Visible:=False;;; GroupHeader19.Visible:=False;;; MasterData8.Visible:=False;;; GroupHeader17.Visible:=False;;; GroupHeader16.Visible:=False;;; Memo335.Visible:=False;;; end;; else;; begin;; GroupHeader20.Visible:=True;;; GroupHeader19.Visible:=True;;; MasterData8.Visible:=True;;; GroupHeader17.Visible:=True;;; GroupHeader16.Visible:=True;;; Memo335.Visible:=True;;; end;;;end;;;;;procedure MasterData1OnBeforePrint(Sender: TfrxComponent);;;begin;;if ;DadosRelatorio.;natopeitp;; = '6910' then;; Memo348.color := Clyellow;; else;; Memo348.color :=clnone;;;if (;DadosRelatorio.;preuniitp;;-;DadosRelatorio.;vlrfreteunitp;;); ;DadosRelatorio.;precotbp;; then;; Memo358.color := Cllime;; else;; Memo358.color := clnone;;;end;;;;;;;procedure MasterData9OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;frxDBRelatorio9.;numeroren;; = ;frxDBRelatorio4.;numeroren;; then;; MasterData9.Visible:=True;; else;; MasterData9.Visible:=False;;;;;end;;;;;;;procedure Memo40OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;DadosRelatorio.;vlrdesctoped;; ; 0 then;; Memo40.Visible:=True;; else;; Memo40.Visible:=False;;;end;;;;;begin;; Page1.Visible:= ;frxDBRelatorio2.;tiporel;; in [1];;; Page2.Visible:= ;frxDBRelatorio2.;tiporel;; in [2];;; Page3.Visible:= ;frxDBRelatorio2.;tiporel;; in [3];;; Page4.Visible:= ;frxDBRelatorio2.;tiporel;; in [4];;; Page5.Visible:= ;frxDBRelatorio2.;tiporel;; in [5];;; Page6.Visible:= ;frxDBRelatorio2.;tiporel;; in [6];;; Page7.Visible:= ;frxDBRelatorio2.;tiporel;; in [6];;;end.">


OLD
<TfrxReport Version="5.5" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Padr??o" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="40137,4756620949" ReportOptions.Description.Text="" ReportOptions.LastChange="42521,5861578704" ScriptLanguage="PascalScript" ScriptText.Text="var
numrelacao: integer;

procedure Child2OnBeforePrint(Sender: TfrxComponent);
begin
Child2.Visible := <frxDBRelatorio3."observped"> <> '';
end;

procedure Child6OnBeforePrint(Sender: TfrxComponent);
begin
Child6.Visible := ((<DadosRelatorio."observped"> <> '') or (<DadosRelatorio."obscredped"> <> ''));
end;

procedure GroupHeader14OnBeforePrint(Sender: TfrxComponent);
begin
numrelacao:=<frxDBRelatorio7."numeroren">;
end;

procedure GroupHeader20OnBeforePrint(Sender: TfrxComponent);
begin
if <frxDBRelatorio8."numeroren"> <> numrelacao then
begin
GroupHeader20.Visible:=False;
GroupHeader19.Visible:=False;
MasterData8.Visible:=False;
GroupHeader17.Visible:=False;
GroupHeader16.Visible:=False;
Memo335.Visible:=False;
end
else
begin
GroupHeader20.Visible:=True;
GroupHeader19.Visible:=True;
MasterData8.Visible:=True;
GroupHeader17.Visible:=True;
GroupHeader16.Visible:=True;
Memo335.Visible:=True;
end;
end;

procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
if <DadosRelatorio."natopeitp"> = '6910' then
Memo348.color := Clyellow
else
Memo348.color :=clnone;
if (<DadosRelatorio."preuniitp">-<DadosRelatorio."vlrfreteunitp">)> <DadosRelatorio."precotbp"> then
Memo358.color := Cllime
else
Memo358.color := clnone;
end;


procedure MasterData9OnBeforePrint(Sender: TfrxComponent);
begin
if <frxDBRelatorio9."numeroren"> = <frxDBRelatorio4."numeroren"> then
MasterData9.Visible:=True
else
MasterData9.Visible:=False;

end;


procedure Memo40OnBeforePrint(Sender: TfrxComponent);
begin
if <DadosRelatorio."vlrdesctoped"> > 0 then
Memo40.Visible:=True
else
Memo40.Visible:=False;
end;

begin
Page1.Visible:= <frxDBRelatorio2."tiporel"> in [1];
Page2.Visible:= <frxDBRelatorio2."tiporel"> in [2];
Page3.Visible:= <frxDBRelatorio2."tiporel"> in [3];
Page4.Visible:= <frxDBRelatorio2."tiporel"> in [4];
Page5.Visible:= <frxDBRelatorio2."tiporel"> in [5];
Page6.Visible:= <frxDBRelatorio2."tiporel"> in [6];
Page7.Visible:= <frxDBRelatorio2."tiporel"> in [6];
end.">


lXml := TStringList.Create;
frxReport1.SaveToFile('temp.fr3');
lXml.LoadFromFile('temp.fr3');





Comments

  • edited 8:30AM
    Leandro wrote: »
    NEW

    <TfrxReport Version="5.5" DotMatrixReport="False" IniFile="/Software/Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Padr??o" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="40137,4756620949" ReportOptions.Description.Text="" ReportOptions.LastChange="42521,5861578704" ScriptLanguage="PascalScript" ScriptText.Text="var;;numrelacao: integer;;;;;procedure Child2OnBeforePrint(Sender: TfrxComponent);;;begin;; Child2.Visible := ;frxDBRelatorio3.;observped;; ;; '';;;end;;;;;procedure Child6OnBeforePrint(Sender: TfrxComponent);;;begin;; Child6.Visible := ((;DadosRelatorio.;observped;; ;; '') or (;DadosRelatorio.;obscredped;; ;; ''));;;end;;;;;procedure GroupHeader14OnBeforePrint(Sender: TfrxComponent);;;begin;; numrelacao:=;frxDBRelatorio7.;numeroren;;;;;end;;;;;procedure GroupHeader20OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;frxDBRelatorio8.;numeroren;; ;; numrelacao then;; begin;; GroupHeader20.Visible:=False;;; GroupHeader19.Visible:=False;;; MasterData8.Visible:=False;;; GroupHeader17.Visible:=False;;; GroupHeader16.Visible:=False;;; Memo335.Visible:=False;;; end;; else;; begin;; GroupHeader20.Visible:=True;;; GroupHeader19.Visible:=True;;; MasterData8.Visible:=True;;; GroupHeader17.Visible:=True;;; GroupHeader16.Visible:=True;;; Memo335.Visible:=True;;; end;;;end;;;;;procedure MasterData1OnBeforePrint(Sender: TfrxComponent);;;begin;;if ;DadosRelatorio.;natopeitp;; = '6910' then;; Memo348.color := Clyellow;; else;; Memo348.color :=clnone;;;if (;DadosRelatorio.;preuniitp;;-;DadosRelatorio.;vlrfreteunitp;;); ;DadosRelatorio.;precotbp;; then;; Memo358.color := Cllime;; else;; Memo358.color := clnone;;;end;;;;;;;procedure MasterData9OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;frxDBRelatorio9.;numeroren;; = ;frxDBRelatorio4.;numeroren;; then;; MasterData9.Visible:=True;; else;; MasterData9.Visible:=False;;;;;end;;;;;;;procedure Memo40OnBeforePrint(Sender: TfrxComponent);;;begin;; if ;DadosRelatorio.;vlrdesctoped;; ; 0 then;; Memo40.Visible:=True;; else;; Memo40.Visible:=False;;;end;;;;;begin;; Page1.Visible:= ;frxDBRelatorio2.;tiporel;; in [1];;; Page2.Visible:= ;frxDBRelatorio2.;tiporel;; in [2];;; Page3.Visible:= ;frxDBRelatorio2.;tiporel;; in [3];;; Page4.Visible:= ;frxDBRelatorio2.;tiporel;; in [4];;; Page5.Visible:= ;frxDBRelatorio2.;tiporel;; in [5];;; Page6.Visible:= ;frxDBRelatorio2.;tiporel;; in [6];;; Page7.Visible:= ;frxDBRelatorio2.;tiporel;; in [6];;;end.">


    OLD
    <TfrxReport Version="5.5" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Padr??o" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="40137,4756620949" ReportOptions.Description.Text="" ReportOptions.LastChange="42521,5861578704" ScriptLanguage="PascalScript" ScriptText.Text="var
    numrelacao: integer;

    procedure Child2OnBeforePrint(Sender: TfrxComponent);
    begin
    Child2.Visible := <frxDBRelatorio3."observped"> <> '';
    end;

    procedure Child6OnBeforePrint(Sender: TfrxComponent);
    begin
    Child6.Visible := ((<DadosRelatorio."observped"> <> '') or (<DadosRelatorio."obscredped"> <> ''));
    end;

    procedure GroupHeader14OnBeforePrint(Sender: TfrxComponent);
    begin
    numrelacao:=<frxDBRelatorio7."numeroren">;
    end;

    procedure GroupHeader20OnBeforePrint(Sender: TfrxComponent);
    begin
    if <frxDBRelatorio8."numeroren"> <> numrelacao then
    begin
    GroupHeader20.Visible:=False;
    GroupHeader19.Visible:=False;
    MasterData8.Visible:=False;
    GroupHeader17.Visible:=False;
    GroupHeader16.Visible:=False;
    Memo335.Visible:=False;
    end
    else
    begin
    GroupHeader20.Visible:=True;
    GroupHeader19.Visible:=True;
    MasterData8.Visible:=True;
    GroupHeader17.Visible:=True;
    GroupHeader16.Visible:=True;
    Memo335.Visible:=True;
    end;
    end;

    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
    if <DadosRelatorio."natopeitp"> = '6910' then
    Memo348.color := Clyellow
    else
    Memo348.color :=clnone;
    if (<DadosRelatorio."preuniitp">-<DadosRelatorio."vlrfreteunitp">)> <DadosRelatorio."precotbp"> then
    Memo358.color := Cllime
    else
    Memo358.color := clnone;
    end;


    procedure MasterData9OnBeforePrint(Sender: TfrxComponent);
    begin
    if <frxDBRelatorio9."numeroren"> = <frxDBRelatorio4."numeroren"> then
    MasterData9.Visible:=True
    else
    MasterData9.Visible:=False;

    end;


    procedure Memo40OnBeforePrint(Sender: TfrxComponent);
    begin
    if <DadosRelatorio."vlrdesctoped"> > 0 then
    Memo40.Visible:=True
    else
    Memo40.Visible:=False;
    end;

    begin
    Page1.Visible:= <frxDBRelatorio2."tiporel"> in [1];
    Page2.Visible:= <frxDBRelatorio2."tiporel"> in [2];
    Page3.Visible:= <frxDBRelatorio2."tiporel"> in [3];
    Page4.Visible:= <frxDBRelatorio2."tiporel"> in [4];
    Page5.Visible:= <frxDBRelatorio2."tiporel"> in [5];
    Page6.Visible:= <frxDBRelatorio2."tiporel"> in [6];
    Page7.Visible:= <frxDBRelatorio2."tiporel"> in [6];
    end.">


    lXml := TStringList.Create;
    frxReport1.SaveToFile('temp.fr3');
    lXml.LoadFromFile('temp.fr3');


    The error was not the fast , was to save the file xml. Thank you

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.