Variables and BCB6

BJLBJL Brussels, Belgium
edited 3:34AM in FastReport 3.0
Working with FR3 and BCB6

I am moving a report from Fr2 to FR3. The converted FRF into FR3 has the following script
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
       with Page1, Engine do
       begin
               TOTREPD := 0;
               TOTREPC := 0;
               TOTPERD := 0;
               TOTPERC := 0;
               TOTGEND := 0;
               TOTGENC := 0;
       end
end;

procedure GroupHeaderOnBeforePrint(Sender: TfrxComponent);
begin
   with GroupHeader, Engine do
   begin
       if FreeSpace * 5/18 < 10 then NewPage;
       GROUPD := [GLPRD];
       GROUPC := [GLPRC];
       TOTREPD := [TOTREPD] + [GLPRD];
       TOTREPC := [TOTREPC] + [GLPRC];
   end
end;

procedure GroupFooterOnBeforePrint(Sender: TfrxComponent);
begin
       with GroupFooter, Engine do
       begin
               TOTPERD := [TOTPERD] + [GROUPD] - [GLPRD];
               TOTPERC := [TOTPERC] + [GROUPC] - [GLPRC];
               TOTGEND := [TOTGEND] + [GROUPD];
               TOTGENC := [TOTGENC] + [GROUPC];
       end
end;

procedure DetailData1OnBeforePrint(Sender: TfrxComponent);
begin
       with DetailData1, Engine do
       begin
               Mt := <SetGLdet."MT">;
               if (Mt > 0) then
               begin
                       GROUPD := [GROUPD] + Mt;
               end
               else
               begin
                       GROUPC := [GROUPC] - Mt;
               end
       end
end;

procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
begin
       with ReportSummary1, Engine do
       begin
               if FinalPass then
               NEWLASTPAGE := [[OLDLASTPAGE] + <TotalPages>];
       end
end;

begin
end.

When preparing the report, I get the message saying that the variables TOTREPD, ... were not declared. However there are declared into the Edit Variables window.

I also need a way to read NEWLASTPAGE into the BCB6 code.

Thanks for helping.

Leave a Comment