How can I count registers from a Data Source?

Stimulsoft Reports.JS discussion
Mateus Garrido Kern
Posts: 29
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 » Thu Aug 27, 2020 2:04 pm

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
Screenshot_5.png
I use {Totals.Count(root_retorno_livros.lancamentos)}
Screenshot_5.png (30.23 KiB) Viewed 815 times
Screenshot_4.png
My Designer Preview
Screenshot_4.png (17.55 KiB) Viewed 815 times
Mateus Garrido Kern
Email: desenv5.digibyte@outlook.com
Lech Kulikowski
Posts: 3451
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski » Thu Aug 27, 2020 2:07 pm

Hello,

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

Thank you.
Mateus Garrido Kern
Posts: 29
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 » Thu Aug 27, 2020 2:13 pm

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 811 times
Screenshot_6.png
Screenshot_6.png (59.59 KiB) Viewed 811 times
Mateus Garrido Kern
Email: desenv5.digibyte@outlook.com
Mateus Garrido Kern
Posts: 29
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 » Thu Aug 27, 2020 2:15 pm

Follow the example of the report in attachment.

Thank you.
Attachments
ReportLivroDiarioComAbertEncer.mrt
Report
(69.23 KiB) Downloaded 35 times
Mateus Garrido Kern
Email: desenv5.digibyte@outlook.com
Lech Kulikowski
Posts: 3451
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski » Tue Sep 01, 2020 9:16 am

Hello,

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

Thank you.
Mateus Garrido Kern
Posts: 29
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 » Wed Sep 02, 2020 12:00 pm

Hello,

Follow my test data for report.

Thank you
Attachments
test_data.json
(4.89 KiB) Downloaded 37 times
Mateus Garrido Kern
Email: desenv5.digibyte@outlook.com
Lech Kulikowski
Posts: 3451
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski » Thu Sep 03, 2020 9:59 am

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 776 times
Mateus Garrido Kern
Posts: 29
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 » Thu Sep 03, 2020 1:58 pm

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
Screenshot_3.png
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 769 times
Screenshot_2.png
In this case I don't want display the DataBand3
Screenshot_2.png (13.38 KiB) Viewed 769 times
Screenshot_1.png
In this case I want display the DataBand3
Screenshot_1.png (7.12 KiB) Viewed 769 times
testdata.json
Test Data
(4.89 KiB) Downloaded 33 times
ReportLivroDiarioComAbertEncer.mrt
My Report
(69.17 KiB) Downloaded 34 times
Mateus Garrido Kern
Email: desenv5.digibyte@outlook.com
Lech Kulikowski
Posts: 3451
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski » Sun Sep 06, 2020 6:40 pm

Hello,

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

Thank you.
Attachments
ReportLivroDiarioComAbertEncer_modified.mrt
(70.68 KiB) Downloaded 27 times
Mateus Garrido Kern
Posts: 29
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 » Wed Sep 09, 2020 7:10 pm

Hello,

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