groupfooter and hide masterdetail

edited 10:13PM 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 10:13PM
    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