Hide data source but not group bands

Stimulsoft Reports.NET discussion
Post Reply
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Hide data source but not group bands

Post by beginner »

I'd like to hide `data source`, and only show group header and footer bands. I want to do that to show just summary to the user and avoid details.

I have tried the following code in the `Before Print` event of the group header band, but this gives me zero value in footer bands.

Code: Select all

DataDataSource1.Enabled = bool.Parse(condition2);
I'll be grateful if you could suggest a way to hide just data source (details), but use the summary in the footer bands (summary).
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Hide data source but not group bands

Post by MatthiasU »

Hi,

try it with CalcInvisible Property of DataBand.

Regards,
Matthias
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: Hide data source but not group bands

Post by beginner »

@MatthiasU, I tried `DataSource1.CalcInvisible = false`, and I'm still getting zeros.

Thanks for your replay, though.
MatthiasU
Posts: 68
Joined: Mon Sep 14, 2015 8:33 am

Re: Hide data source but not group bands

Post by MatthiasU »

Shouldn't it be "CalcInvisible = True" ? With this property, all not shown detail rows should be considered in summarize functions.

Edit: I have tested this case and it works great...
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Hide data source but not group bands

Post by Alex K. »

Hello,

Please try to the Totals.Sum() function on the footer.

Thank you.
Attachments
Capture.PNG
Capture.PNG (50.48 KiB) Viewed 3827 times
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: Hide data source but not group bands

Post by beginner »

Once again you saved my day, Aleksey. ;)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Hide data source but not group bands

Post by Alex K. »

Hello

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply