groupfooter and hide masterdetail

edited 7:05AM in FastReport 3.0
hello,
i have report somethink like this.

group header for user 1
masterdata:
line 1
line 2
line n
group footer (sum for user 1)

everyth is OK.

and i want to have second report (same like first) but without masterdata band, only sums. is there any way to hide masterdata band?

best way for me is to have 1 report and changing some options.someth. like masterdataband.visible:=false;

thank you very much

Comments

  • edited 7:05AM
    herni wrote:
    and i want to have second report (same like first) but without masterdata band, only sums. is there any way to hide masterdata band?
    At first you should pass 1 as the third parameter into SUM.
    1 will force SUM to count invisible MasterData bands.
    [SUM(<YourDataSet."SOME_FIELD">,MasterData1,1)]
    

    Then declare global variable in report script
    var
      ShowMasterDataBand: boolean;
    
    and write code for OnBefore event of report page
    begin
      MasterData1.Visible := ShowMasterDataBand;
    end;
    
    Add checkbox cbShowmasterData with caption 'Show Master Data' on your dialog page and write
      ShowMasterDataBand := cbShowmasterData.Checked;
    
    in script for button which close dialog and run 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.