herni
Aug 12 2005, 11:20 PM
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
Andrew_Sh
Aug 28 2005, 11:50 AM
| QUOTE (herni @ Aug 12 2005, 11:20 PM) |
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.
| CODE |
[SUM(<YourDataSet."SOME_FIELD">,MasterData1,1)]
|
Then declare global variable in report script
| CODE |
var ShowMasterDataBand: boolean;
|
and write code for OnBefore event of report page
| CODE |
begin MasterData1.Visible := ShowMasterDataBand; end;
|
Add checkbox cbShowmasterData with caption 'Show Master Data' on your dialog page and write
| CODE |
ShowMasterDataBand := cbShowmasterData.Checked;
|
in script for button which close dialog and run report.