Aggregate function Count in event code

Stimulsoft Reports.NET discussion
Post Reply
dkfoto
Posts: 3
Joined: Wed Oct 11, 2006 8:25 am

Aggregate function Count in event code

Post by dkfoto »

Hi

I have a report were I need to enable/disable some databands according to the count of datarows in a databand. But when I use the aggregte function Count in the event I get an error. there are no problem in using the "Count" in a textbox.

How can I solve this, or id there another solution.

The code I try to use in the event:

Code: Select all

if (Count(DataBand2) == 0) {
   ChildBand1.Enabled  = false;
} else {
   ChildBand1.Enabled  = true;
}
The Error:
The name 'Count' does not exists in the class or namespace Reports.Report
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Aggregate function Count in event code

Post by Vital »

In current version of StimulReport.Net you can use aggregate functions in events.
In latest builds we added new data source - "Datasource from other datasource".
You can create totals on your data and use this data in events.

Thank you.
Post Reply