How can i take the MaxD() value from the SumD() values
How can i take the MaxD() value from the SumD() values
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.
How can i take the MaxD() value from the SumD() values
Hello,
Can you attach your report this topic (or send it to support@stimulsoft.com). We need it to better understand report structure.
Thank you.
Can you attach your report this topic (or send it to support@stimulsoft.com). We need it to better understand report structure.
Thank you.
How can i take the MaxD() value from the SumD() values
Hello Jan
My report in the attachment.
Thank you.
My report in the attachment.
Thank you.
- Attachments
-
- 412.AttPercentageReport.mrt
- (23.48 KiB) Downloaded 415 times
How can i take the MaxD() value from the SumD() values
Hello,
If i right understand you need use following expression:
Thank you.
If i right understand you need use following expression:
Code: Select all
{DataSource1.StudentStatus / MaxD(DataSource1.StudentStatus) * 100}%
How can i take the MaxD() value from the SumD() values
Hello Jan
Your code is close to what i want, but i exactly want something like this:
but i know this is not valid operation.
Because the Sum is not calculated in the (StudentStatus) column, and i calculate it in this line of code "SumD(DataSource1.StudentStatus)" and in the same time i want take the max value of this column after the sum operation.
Thank you.
Your code is close to what i want, but i exactly want something like this:
Code: Select all
{DataSource1.StudentStatus / MaxD(SumD(DataSource1.StudentStatus)) * 100}%
Because the Sum is not calculated in the (StudentStatus) column, and i calculate it in this line of code "SumD(DataSource1.StudentStatus)" and in the same time i want take the max value of this column after the sum operation.
Thank you.
How can i take the MaxD() value from the SumD() values
Hello,
In your report you have only one data source (and databand). So you receive only one result of calculation of SumD function. In this case MaxD function does not have sense.
Thank you.
In your report you have only one data source (and databand). So you receive only one result of calculation of SumD function. In this case MaxD function does not have sense.
Thank you.