How can i take the MaxD() value from the SumD() values
Posted: Tue May 11, 2010 7:00 am
Hello all
I want take the max number of the complete column for example the table below:
Student Present Number
5
12
20
16
3
25
11
18
20
8
I want take the max number of the above column, put it in variable or any other way to use it in the next column, for example the max number of the above column is (25), so my report should be like this:
Percentage Present ----------------------------------------------------------- Student Present Number
(5/25) * 100% --> Just the result must be here ----------------------------------------- 5
(12/25) * 100% ------------------------------------------------------------------------------- 12
(20/25) * 100% ------------------------------------------------------------------------------- 20
(16/25) * 100% ------------------------------------------------------------------------------- 16
(3/25) * 100% ------------------------------------------------------------------------------- 3
(25/25) * 100% ------------------------------------------------------------------------------- 25
(11/25) * 100% ------------------------------------------------------------------------------- 11
(18/25) * 100% ------------------------------------------------------------------------------- 18
(20/25) * 100% ------------------------------------------------------------------------------- 20
(8/25) * 100% -------------------------------------------------------------------------------- -8
I got the (Student Present Number) column by sitmulsoft, after I created datasource, I wrote under the text component in the text expression this: {SumD(DataSource1.StudentStatus)} and the result now coming correct for that column.
I tried this code in the code page in stimulsoft environment:
int maxNum = {MaxD{SumD(DataSource1.StudentStatus)}}
And under the text component of the (Percentage present) column I wrote this:
({SumD(DataSource1.StudentStatus)}/maxNum) * 100%
But ofcourese this did not work.
Please help, Thank you.
I want take the max number of the complete column for example the table below:
Student Present Number
5
12
20
16
3
25
11
18
20
8
I want take the max number of the above column, put it in variable or any other way to use it in the next column, for example the max number of the above column is (25), so my report should be like this:
Percentage Present ----------------------------------------------------------- Student Present Number
(5/25) * 100% --> Just the result must be here ----------------------------------------- 5
(12/25) * 100% ------------------------------------------------------------------------------- 12
(20/25) * 100% ------------------------------------------------------------------------------- 20
(16/25) * 100% ------------------------------------------------------------------------------- 16
(3/25) * 100% ------------------------------------------------------------------------------- 3
(25/25) * 100% ------------------------------------------------------------------------------- 25
(11/25) * 100% ------------------------------------------------------------------------------- 11
(18/25) * 100% ------------------------------------------------------------------------------- 18
(20/25) * 100% ------------------------------------------------------------------------------- 20
(8/25) * 100% -------------------------------------------------------------------------------- -8
I got the (Student Present Number) column by sitmulsoft, after I created datasource, I wrote under the text component in the text expression this: {SumD(DataSource1.StudentStatus)} and the result now coming correct for that column.
I tried this code in the code page in stimulsoft environment:
int maxNum = {MaxD{SumD(DataSource1.StudentStatus)}}
And under the text component of the (Percentage present) column I wrote this:
({SumD(DataSource1.StudentStatus)}/maxNum) * 100%
But ofcourese this did not work.
Please help, Thank you.