How can I count registers from a Data Source?

Stimulsoft Reports.JS discussion
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Hello,

I did a report with count registers, but de function not working.

I used:

Code: Select all

{Totals.Count(root_retorno_livros.lancamentos)}
How can I count the registers from my Data Source?

In the attachments I show how my data structure is and how I am using the count
Attachments
I use {Totals.Count(root_retorno_livros.lancamentos)}
I use {Totals.Count(root_retorno_livros.lancamentos)}
Screenshot_5.png (30.23 KiB) Viewed 3360 times
My Designer Preview
My Designer Preview
Screenshot_4.png (17.55 KiB) Viewed 3360 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: How can I count registers from a Data Source?

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data which reproduces the issue for analysis.

Thank you.
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Basically I want to show the databand when there is no record, and when there is more than one record do not show the databand.
Attachments
Screenshot_7.png
Screenshot_7.png (14.04 KiB) Viewed 3356 times
Screenshot_6.png
Screenshot_6.png (59.59 KiB) Viewed 3356 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Follow the example of the report in attachment.

Thank you.
Attachments
ReportLivroDiarioComAbertEncer.mrt
Report
(69.23 KiB) Downloaded 232 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: How can I count registers from a Data Source?

Post by Lech Kulikowski »

Hello,

Sorry for the delay with the response.
Please send us a test data for your report.

Thank you.
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Hello,

Follow my test data for report.

Thank you
Attachments
test_data.json
(4.89 KiB) Downloaded 213 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: How can I count registers from a Data Source?

Post by Lech Kulikowski »

Hello,

Please check
SEM MOVIMENTO - {Totals.Count(root_retorno_livros)}

Thank you.
Attachments
Annotation 2020-09-03 115825.png
Annotation 2020-09-03 115825.png (42.43 KiB) Viewed 3321 times
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Hello,

I tested the Totals.Count function in a conditions in my DataBand but it seems not worked fine.

I want the DataBand3 from Page 1(Second page in order) from my report appears when dosen't has registers of root_retorno_livros_lancamentos.

I am working with the 'Conditions' property because of the topic viewtopic.php?f=27&t=57943&p=155143

Follow my report, test data and 3 images explaining in attachments.

Thank you.
Attachments
Explaining what I tried to do to make DataBand3 appear or not. (<br />I am working with the Conditions property because of the topic https://forum.stimulsoft.com/viewtopic.php?f=27&amp;t=57943&amp;p=155143)
Explaining what I tried to do to make DataBand3 appear or not. (
I am working with the Conditions property because of the topic https://forum.stimulsoft.com/viewtopic.php?f=27&t=57943&p=155143)
Screenshot_3.png (89.45 KiB) Viewed 3314 times
In this case I don't want display the DataBand3
In this case I don't want display the DataBand3
Screenshot_2.png (13.38 KiB) Viewed 3314 times
In this case I want display the DataBand3
In this case I want display the DataBand3
Screenshot_1.png (7.12 KiB) Viewed 3314 times
testdata.json
Test Data
(4.89 KiB) Downloaded 159 times
ReportLivroDiarioComAbertEncer.mrt
My Report
(69.17 KiB) Downloaded 152 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: How can I count registers from a Data Source?

Post by Lech Kulikowski »

Hello,

In that case, please check the following expression
{Totals.Count(DataBand2)}

Thank you.
Attachments
ReportLivroDiarioComAbertEncer_modified.mrt
(70.68 KiB) Downloaded 161 times
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: How can I count registers from a Data Source?

Post by Mateus Garrido Kern »

Hello,

Thank you, it's worked very well.
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Post Reply