How to you change the Suppress Repeat property in code

edited 11:38AM in FastReport 4.0
Hi all

We have a problem exporting reports to Excel and having the headers repeat for every page making the data unusable. We need the headers repeated for printing so the report has to be altered in the code when the user selects Export to Excel.

I need to access the Text objects in report's header and alter the Suppress Repeat property of all of them to True. The problem I have come across is that when I call the TfrxReportClass function FindObject(string) the object which is returned is an interface TfrxDispatchableComponent and does not have a full list of the properties or the object including Suppress Repeat.

The object is actually a TfrxDMPMemoView which I try to cast it to but without success as it does not seem to exist.

Any suggestions?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:38AM
    it is not a property of the memo object it is a property of the band that contains the memo object.
    (reprintonnewpage) it can be set when the report is loaded using the findobjectmethod.
    you can not change this in the preview
    var
    head: tfrxheaderband;

    code to load report

    head := frxreport1.findobject('Header1');
    head.reprintonnewpage:=false;
    code to prepare report
    code to export report

Leave a Comment