Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

How to create a statistic dashboard ? Topic is solved

Questions related to using nuBuilder Forte.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to create a statistic dashboard ?

Unread post by yvesf »

If I use a display object, I can retrieve a value per day per month, per year ( 1 display object per request). Is it the right way to do that ? The request behind each display object will be refreshed at which moment ? Many thx for your help.
Display.PNG
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to create a statistic dashboard ?

Unread post by kev1n »

yvesf wrote: Mon Jun 05, 2023 11:44 pm If I use a display object, I can retrieve a value per day per month, per year ( 1 display object per request). Is it the right way to do that ? The request behind each display object will be refreshed at which moment ? Many thx for your help.
Display.PNG
It depends on what and how many values you want to display. If you only need to display one or a few values in a single row, the display object is an appropriate choice. On the other hand, if you require multiple columns and rows for displaying data, a browse form (embedded iframe) would be more suitable.

The display object is refreshed when the form is initially opened or when it is refreshed with nuRefreshSelectObject() function.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to create a statistic dashboard ?

Unread post by kev1n »

yvesf wrote: Mon Jun 05, 2023 8:48 pm Do you mean with run(iframe) based on report and not based on form ?
A Run iframe object is nothing else then an embedded Browse form.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to create a statistic dashboard ?

Unread post by yvesf »

A run iframe object is a method to embed the related browse form anywhere. I have only one browse form per form not as many as I want.
You mention I can have as many requests as I want based on one form ? Could you explain me how you do that ?. Many thanks again and sorry for this long thread. I don't see how to build a statistic dashboard with nubuilder as it is certainly easy to do so.

Yves
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to create a statistic dashboard ?

Unread post by kev1n »

It is not entirely clear to me from which data you want to display the dashboard. Could you please clarify whether you intend to display statistics for a single record or for all data within a table? This will help me provide you with more accurate information and assistance.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to create a statistic dashboard ?

Unread post by yvesf »

Hello Kev1n,

Thx for your reply. Let me try to expose what I would like to have.
I have a simple table invoice with the related fields :
1.- Invoice form
id, customer, price, date, status
represented like this in the browse form.

2.-Request of the form

Code: Select all

select fact.fact_id, fact.customer, fact.price, fact.date, fact.status from fact
I would like to have the turnover by day, week, month and year in a dedicated launch form.

Request 1 : turnover per day

Code: Select all

select sum(price) from fact group by DATE_FORMAT(fact_date, '%Y-%m-%d') ASC
Request 2 : turnover per month

Code: Select all

select  sum(price) from fact group by DATE_FORMAT(fact_date, '%Y-%m') ASC
Request 3 : turnover per year

Code: Select all

select  sum(price) from fact group by DATE_FORMAT(fact_date, '%Y) ASC
I would like to represent that in a dedicated launch form statistics in which I will have as nicest as possible :
-------------------------------------------------------------------------
turnover per day :
2023-06-01 - € 1520
2023-06-02 - € 1640
2023-06-03 - € 0
2023-06-02 - € 4820

turnover per month :
2023-04 - € 0
2023-05 - € 0
2023-06 - € 7980 ( 1 520 +1 640+0+4 820)

turnover per year :
2023 - € 7980
-------------------------------------------------------------------------------------
Of course, numbers should be extracted from the same form fact.


What is the best method to do that ?
Thx

Yves
Last edited by yvesf on Tue Jun 06, 2023 10:18 am, edited 2 times in total.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to create a statistic dashboard ?

Unread post by kev1n »

yvesf wrote: Tue Jun 06, 2023 9:52 am
What is the best method to do that ?
This is what I suggested:
kev1n wrote: Mon Jun 05, 2023 6:15 pm Use a launch form and place on it as many run (iframe) objects as you want?
or use charts.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to create a statistic dashboard ?

Unread post by yvesf »

Thx Kev1n.
But run(iframe) object on form works only with 1 request, the one behind browse form. As I have only 1 form, how can I use this run(iframe) with 4 different requests ?
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to create a statistic dashboard ?

Unread post by yvesf »

I have attached a basic database in which I have a launch form statistics in which I have tried to use your recommended approach. (run (iframe) object.)
Could you please take a look and make recommandations based on this example ?
06-06-2023_075736_647ef500095cf_nuBuilder_backup.sql.gzip
Many thx

Yves
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to create a statistic dashboard ?

Unread post by kev1n »

Is it supposed to look like this?
2023-06-06_110706.png
You do not have the required permissions to view the files attached to this post.
Post Reply