Add a FORM to a specific report

1 view
Skip to first unread message

zineb

unread,
Jun 24, 2009, 3:35:48 AM6/24/09
to Trac Development
Hi all,

I am trying to add a FORM to a report where user have to insert two
date times
Example:

Choose delivery date between: DD/MM/YYY and DD/MM/
YYYY Submit

I would like to get those two values and insert them into the sql
query which permits to create the report.

I tryed using this condition in my query :
AND (c10.value between 'date_start' and '.date_end' ) ( c10.value is
my the delivery date)

But it doesn't work.

Please could you help me?????

Thanks,

Zineb

Noah Kantrowitz

unread,
Jun 25, 2009, 3:48:36 AM6/25/09
to trac...@googlegroups.com
You would have to make a custom plugin to do this.

--Noah

Erik Bray

unread,
Jun 25, 2009, 9:11:31 AM6/25/09
to trac...@googlegroups.com
It's not entirely clear what the OP's end goal is, but it might be
possible to just do with a custom report, especially since #7293.
Have two dynamic variables for the dates, and make sure that in the
SQL the variables are wrapped in the appropriate datetime formatting
function for the DB backend. Not clear if that's what he wants
though.

zineb

unread,
Jun 26, 2009, 3:54:39 AM6/26/09
to Trac Development
Thanks a lot, that's exactly what i wanted.
i have finally find a way to do it by only changing report_view file.
i created a form which allows to get the two dynamics variable and
pass them throught the URL.
now i have a small problem with the date format (years are not
considered into the comparaison)..
I will look into the tickets to make my solution more efficient.

Thanks again


On Jun 25, 3:11 pm, Erik Bray <hyugaricd...@gmail.com> wrote:
> It's not entirely clear what the OP's end goal is, but it might be
> possible to just do with a custom report, especially since #7293.
> Have two dynamic variables for the dates, and make sure that in the
> SQL the variables are wrapped in the appropriate datetime formatting
> function for the DB backend.  Not clear if that's what he wants
> though.
>
Reply all
Reply to author
Forward
0 new messages