Internal Functions (Count, Min, Max...)

Stimulsoft Reports.PHP discussion
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »

Hi!

How should these functions be used...

For example, I have a table (lets say MachineStatus), in MachineStatus i have two columns (LogDt = Logdate (1 every minute), Status ("1" if up running)).

So now I would like to print in a report how many Minutes in a day the machine has been up running
(I know there is 1440 minuts per day so it would be simpel as Count(Status = 1)/60 + ":" + Count(Status = 1)%60)...

But I cant get the Count function to work, how shuold I implement this

And the Min/Max function I cant get to function as I expect them (the column holding the status varible is a charchar, so do I need to tryPrase it like {Max(TryParseDouble(A7A3_Drift.Status))})...???

Best Regards

Edmund
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »


Any working example?
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Internal Functions (Count, Min, Max...)

Post by Ivan »

Hello,

We need some additional time to check the issue.

Thank you.
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »

Any luck? :dreamer:
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »

Hi guys!

Have you had any time to check on my problem?

Any new build/realse scheduled?

Regards Edmund
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Internal Functions (Count, Min, Max...)

Post by Ivan »

Hello,

We have added a new conditional functions like CountIf, SumIf, AvgIf. Now you can use the following expression, for example:

Code: Select all

{(int)(CountIf(MachineStatus.Status = 1)/60) + ":" +  CountIf(MachineStatus.Status = 1)%60}
Another examples:

Code: Select all

{CountIf(DataBand1, DataSource1.Field == true)}
{SumIf(DataBand1, DataSource1.FieldForSum, DataSource1.FieldForCheck == 1)}
The patch will be available in the prerelease build from 1-Mar-2011.

Thank you.
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »

Thanks Ivan!

I´ll be looking foward to this...

Regards

Edmund
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Internal Functions (Count, Min, Max...)

Post by Andrew »

Hello,

Let us know if you have additional questions.

Thank you.
Edmund Andersson
Posts: 35
Joined: Thu May 20, 2010 11:26 am
Location: Sweden

Internal Functions (Count, Min, Max...)

Post by Edmund Andersson »

Have the function been added?

I´ve downloaded the prerelease from yesterday (2011.03.15) but I can´t see them in the function list or get it to work...

Regards Edmund
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Internal Functions (Count, Min, Max...)

Post by Vladimir »

Hello, Edmund

The specified functions should work in the latest prerelease build. At this moment did not added a list of functions in the expressions editor, we will add it in the next prerelease build.

Thank you.
Post Reply