Page 1 of 1

Cross tab - Relationship between values

Posted: Wed Nov 22, 2017 10:24 pm
by Fabio Pagano
Hi
I need your help with cross tab.
I have two value in summary field and I need to make relationship between values. I'll explain better: value1 / value2.
Value1 is a sum of field "minute", value2 is a count of field "person". So I'd like to have a relationship to obtain How many minutes employ a person for a given activity.

thanks in advance
best regards

Re: Cross tab - Relationship between values

Posted: Thu Nov 23, 2017 10:24 am
by HighAley
Hello.

You could use next code in the ProcessCell event of the cell.

Code: Select all

if (Cells[0,-1]> 0)
    e.Value = Cells[0,-2] / Cells[0, -1];
else
    e.Text = "NONE";
Please, look at the attached report template.

Thank you.

Re: Cross tab - Relationship between values

Posted: Thu Nov 23, 2017 3:44 pm
by Fabio Pagano
Good evening. Thank you for the answer, we have correctly populated the cell.

Anyway, we've seen that the cell's totals are not correctly calculated: we've used your report as example with the datasource "demo.xml" present in Stimulreport installation.

In the attached files we've put in square red the total cells not correctly calculated:
Image5.png
Image5.png (8.56 KiB) Viewed 5666 times
Image7.png
Image7.png (13.3 KiB) Viewed 5666 times
Thank you.

Re: Cross tab - Relationship between values

Posted: Fri Nov 24, 2017 11:32 am
by HighAley
Hello, Fabio.

It's possible to hide these Totals. Or you need to show something there.
Could you specify this moment?

Thank you.

Re: Cross tab - Relationship between values

Posted: Fri Nov 24, 2017 1:40 pm
by Fabio Pagano
Hello,
I'd like to see in column TOTAL the average of TOTAL.
thanks

Re: Cross tab - Relationship between values

Posted: Wed Nov 29, 2017 10:11 pm
by Alex K.
Hello,

We need some additional time to prepare a code for your task.

Thank you.

Re: Cross tab - Relationship between values

Posted: Sun May 02, 2021 9:12 am
by Alain25170
Hello

Did you get a response for this problem?

Thank you
D

Re: Cross tab - Relationship between values

Posted: Tue May 04, 2021 7:05 am
by Lech Kulikowski
Hello,

You can use the ProcessCell event of the cell for such tasks.

Thank you.