User input date range

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

User input date range

Post by rpierce » 2022-09-02 20:59

Hello all,

I have a report that queries data in a hardcoded date range. I wonder if there is a way to have a prompt that allows the end user to specify their own date range. In MS Access it's simple task but I can't seem to find a way to do it using MySQL.

As always, thank you for your great brains!!

Ray

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: User input date range

Post by rpierce » 2022-10-07 21:59

Nothing. That's unusual in this forum...

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: User input date range

Post by pbottcher » 2022-10-08 13:22

Hi,

maybe you make your request a bit more specifc. Is the report based on a table you have, or how did you create that report.
You could just a page that asks for your required date range and instead of inserting a record you just redirect to you report page with the date entries passed as variables.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: User input date range

Post by rpierce » 2022-10-14 15:57

Hi Pascal,

The report is based on several tables in my database. Currently the report is accessed by a button in DV of the parent table. What I'd like to figure out is how to have a prompt that asks the user for a date range they'd like to see in the report. The button is linked to a PHP file in hooks with the following query to obtain a one week look back.

Code: Select all

sql("select {$daily_summary_fields} from {$daily_summary_from} and project={$project_id} and daily_summary.date BETWEEN (NOW() - INTERVAL 7 DAY) AND NOW()", $eo);
I'd like to give the user more control of the length of the look back.

Thank you,

Ray

Post Reply