Number of values in rendered cross-data columns

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Number of values in rendered cross-data columns

Post by Jennypi »

Hello,

I need to get the number of values contained in the rendered cross-data columns. I will use this number in a calculation.

In the attached report, I need to count the number of LabRequest.LabSamples.LabTraits.TraitRequested values that are displayed in CrossDataBand2.

How can I do that?

Thank you.
Report.mrt
(30.31 KiB) Downloaded 102 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Number of values in rendered cross-data columns

Post by HighAley »

Hello.

You could get the CrossDataBand2.Count value.


Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Number of values in rendered cross-data columns

Post by Jennypi »

Hello,

Thank you for your reply.
It seems that CrossDataBand2.Count returns the numbers of columns, not the number of values inside these columns.
See my example:
Screenshot_2.png
Screenshot_2.png (4.57 KiB) Viewed 1653 times
CrossDataBand2.Count returns "3" while there are much more values in my columns.

How can I count them?

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Number of values in rendered cross-data columns

Post by HighAley »

Hello,

Sorry, maybe I don't understand you right.
Do you need to calculate the sum?
You could do it like with the regular data bands.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Number of values in rendered cross-data columns

Post by Jennypi »

Hi,

Sorry if I'm not clear.
Yes, the sum would work. The sum of all the cells, meaning 10, in my example.
I tried with regular sum calculations but couln't get the total sum for the entire report :(

Thank you for your help.
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Number of values in rendered cross-data columns

Post by Lech Kulikowski »

Hello,

> I tried with regular sum calculations but couln't get the total sum for the entire report :(

You can sue the Totals.Sum() function:
Totals.Sum(datasource, column)

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Number of values in rendered cross-data columns

Post by Jennypi »

Hi

Thank you for your help. I managed to get the total sum :)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Number of values in rendered cross-data columns

Post by HighAley »

Hello.

We are always glad to help you.

Thank you.
Post Reply