FR equivalent for QR AddPrintable?

I am converting Quick Reports Delphi code to use Fast Reports, but I cannot find a substitute for the AddPrintable method. Does anyone have a suggestion?

Comments

  • Set object's Visibility property to [vsPrint]

  • That's a great answer if the object already exists, but I'm calling AddPrintable to add a printable object that doesn't already exist.

    I think the correct answer is InsertComponent, but I'm still testing that theory. So this Quick Reports line:

           TextCont:=TQRLabel(QRSubDetail1.AddPrintable(TQRLabel));

    becomes, for Fast Reports:

           TextCont := TfrxMemoView.Create(TextCont);

           GenericReport.GRrpt.Detail1.InsertComponent(TextCont);

    The Quick Reports code uses ControlCount and Controls[] to access the objects, while Fast Reports uses ComponentCount and Components to do the same thing. Interestingly, Fast Reports does use ControlCount and Controls[] in its ReportPage objects, but not in its Band objects.

    I found none of this in Fast Reports documentation. I spent hours comparing Quick Reports and Fast Reports source code to come up with it.

Leave a Comment