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
User input date range
Re: User input date range
Nothing. That's unusual in this forum...
Re: User input date range
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.
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.
Re: User input date range
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.
I'd like to give the user more control of the length of the look back.
Thank you,
Ray
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);
Thank you,
Ray