How to you change the Suppress Repeat property in code

edited 12:31PM 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 12:31PM
    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

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.