Page 1 of 1

Hiding a groupheader if there's only one distinct record

Posted: Mon Feb 03, 2014 3:04 pm
by PJoyeux
Hi,

I need to be able to hide a group-header if the condition used for grouping returns just one record.

I have tried to use conditions and the enabled-property but had no success. The condition I used was

Code: Select all

Totals.CountDistinct ("Buchung.TerminNummer") > 1
But the Count always returns "1" even if I indeed have more than one group based on the datasource...

I have attached the report, I need to hide "GroupHeaderBand2" if there's only one different "Buchung.TerminNummer"

Thanks for your help!

Cheers,
Pascal

Re: Hiding a groupheader if there's only one distinct record

Posted: Tue Feb 04, 2014 11:18 am
by HighAley
Hello, Pascal.

Sorry, but we couldn't find CountDistinct() function in the attached report template.
Could you send us a sample project which reproduces the issue? The issue could be connected with used Business objects.

Thank you.

Re: Hiding a groupheader if there's only one distinct record

Posted: Tue Feb 04, 2014 1:14 pm
by PJoyeux
Hi, Aleksey

Yes, you are right... I had changed this report so may times, that I ended up uploading the one WITHOUT condition... :roll: I have now attached the proper report.

But my question was more general: how to hide this band if there's only one different "Buchung.TerminNummer"? Is using a condition the right way?

Cheers,
Pascal

Re: Hiding a groupheader if there's only one distinct record

Posted: Wed Feb 05, 2014 1:30 pm
by HighAley
Hello.

If there is only one row in the data source you could check if Buchung.Rows.Count > 1 and if this expression is false you could disable group header in the Conditions.

Thank you.