TfrxReport.OnManualBuild

Hello,
my problem:
I am your documentation information in FR4.6 Programmer Manual and in my Delphi code I create an event
procedure TDataModule1.frxReport_TabCodeManualBuild (Page: TfrxPage);
var
...
begin
...
frxReport_TabCode.Engine.ShowBand (LDataBand);
...
end;

in this code
frxReport_TabCode.Engine.ShowBand (LDataBand);

I always have an error, it seems that I do not have access to Engine here

Thank you for your help

Comments

  • PolomintPolomint Australia
    edited 2:01AM
    gpiriou wrote: »
    in this code
    frxReport_TabCode.Engine.ShowBand (LDataBand);

    I always have an error, it seems that I do not have access to Engine here

    Thank you for your help
    G'day,

    Where in your code have you initialised LDataBand? And how have you done it?

    Cheers, Paul
  • edited 2:01AM
    Hello,
    like this:
    wrote:
    LDataBand := TfrxMasterData.Create(LPage);
    and I also have
    wrote:
    LDataBand := frxReport_TabCode.FindObject('MasterData1') as TfrxMasterData;
    FastReport support informed me that I could not call frxReportManualBuild (Page: TfrxPage) directly from Delphi code because otherwise frxReport.engine causes delphi execption.
    I want to make a composite report with several reports of which one of them is totally written in frxReport1ManualBuild.
    I block on several things:
    if I call in my code delphi frxReport1ManualBuild my report is built well but I can not in this code to make a new page by Engine.newpage (exeption delphi) and therefore more support FR tell me not to make.
    if i am their information i try to make this code below without success:
    wrote:
    ...... // other composite reports
    frxReport1.PrepareReport(true);// this code calls frxReport1ManualBuild (Page: TfrxPage) by default
    LStreamTAB.Clear;
    frxReport1.SaveToStream(LStreamTAB);
    LStreamTAB.Position:= 0;
    frxReportcompil.LoadFromStream(LStreamTAB);
    frxReportcompil.PrepareReport(false);
    frxReportcompil.ShowPreparedReport;

Leave a Comment