Page 3 of 3

Re: How to create a statistic dashboard ?

Posted: Tue Jun 06, 2023 11:10 am
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

Re: How to create a statistic dashboard ?

Posted: Tue Jun 06, 2023 11:15 am
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

Re: How to create a statistic dashboard ?

Posted: Tue Jun 06, 2023 11:24 am
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

Re: How to create a statistic dashboard ?

Posted: Thu Jun 08, 2023 11:35 pm
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 ?

Re: How to create a statistic dashboard ?

Posted: Fri Jun 09, 2023 3:51 pm
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 '#%')