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 »

yes exactly,
I am at this stage, blocked by this unique request supporting a form. I see in your example that we can do that. How do you perform that ? I am impressed. :o
run iframe.PNG
You do not have the required permissions to view the files attached to this post.
Last edited by yvesf on Tue Jun 06, 2023 11:17 am, edited 1 time 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 »

First, I created two Browse Forms, one for the daily and one for the monthly turnaround.
Next, I created a Launch form called "Dashboard" and placed two run (iframe) objects on that form.

I used the initial SQL dump file you provided and I have attached the updated dump containing the dashboard.
fact.zip
You do not have the required permissions to view the files attached to this post.
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 »

wonderfull, you have to create browse form first, the number you want and that's it. Sorry for not having taken the ball before.
Thx again for your precious help. Browser form wasn't part of my learning path, it is now.
Yves
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 now a dashboard presenting turn-over per day, per month and per year.
Is it possible to do the same beetween 2 dates defined by the end-user. Is it possible to leverage the same approach (browse form) ? How Can you pass the dates as parameter of the browse SQL request ?
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 »

Add two text objects of Type Date to the form, where users can enter dates.
Add a button to the Launch form: This button will trigger the filtering when clicked.

Add two text objects of Type Date and a button to the Launch form.

Add an onclick event to the button: This step involves attaching a JavaScript event handler to the button's onclick event. When the button is clicked, the code specified in the event handler will be executed.

Code: Select all

var f = $("#id_of_your_browse_iframe_here")[0].contentWindow;
f.nuSetProperty('date_start', $('#id_of_date_start').val().nuRemoveFormatting());
f.nuSetProperty('date_end', $('#id_of_date_end').val().nuRemoveFormatting());
f.nuGetBreadcrumb();

In the Browse SQL, add a WHERE clause:

Code: Select all

WHERE (date_start_column BETWEEN #date_start# AND #date_end# OR '#date_start#' like '#%') 
Post Reply