How to clear a report

BJLBJL Brussels, Belgium
edited 7:12AM in FastReport 3.0
BCB6 and FR3

The user makes some choices and sets parameters to run a report.
After viewing the report, he may change some parameters to get another view.
Unfortunately, after the changes, it is always the first report which displays.
After the new choices of the user, I have a
frxReport->Clear()

and, of course, a modified dataset. I even reload the FRF file.
What else is necessary to get rid of the first report?

Thanks for helping.

BJL

Comments

  • edited 7:12AM
    I never trust a CLEAR object and avoid Clear() whenever possible because you never know exactly what they do. Best way when you finish with a report is delete MyReport. You do have to rebuild your report with a MyReport = new but you definitely have everything reset.

    The advantage is that if what Clear() does or you have to migrate to a new Reporting Tool you won't be stuck on what "you hope" Clear() does. The advantage in creating an inherited component if if you do change you only have to upgrade your component and you don't have to change your well tested business logic. Cost more up front but reduces your maintenance costs.

    Wayne

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.