[filter_by_date] in Report Designer

Post Reply
enishemed
Posts: 651
Joined: 30 Oct 2017, 11:24
Name: Enis Hemedoglu
Location: Istanbul, Turkey
Company Name: SCORE DANISMANLIK
Contact:

[filter_by_date] in Report Designer

Post by enishemed »

Dear Sergey,

I have a problem with '[filter_by_date]' parameter in Report Designer.

As you know, in report designer, there are "PHP code", "Table MySQL query" and "HTML Code" types. If I use the following code inside "PHP Code", everthing works well.

Code: Select all

$query = db_query("select sum(e.field_800) as tutar from app_entity_64 e where FROM_UNIXTIME(e.field_826, '%Y-%m-%d') = '[filter_by_date]'");

$info = db_fetch_array($query);
$tutar = $info['tutar'];

$output_value = $tutar;
But, there is also "php code" column inside the "Table (MySQL query)" type. If I use the code here, '[filter_by_date]' is not working. If I use, for example, '2022-08-04' instead of '[filter_by_date]', it works.
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: [filter_by_date] in Report Designer

Post by support »

Fixed. File from archive replace to plugins\ext\classes\report_page\
Let me know if it works ok now.
Attachments
blocks_table.zip
(4.13 KiB) Downloaded 34 times
enishemed
Posts: 651
Joined: 30 Oct 2017, 11:24
Name: Enis Hemedoglu
Location: Istanbul, Turkey
Company Name: SCORE DANISMANLIK
Contact:

Re: [filter_by_date] in Report Designer

Post by enishemed »

It works, thanks.
timbios
Posts: 1
Joined: 20 Aug 2022, 00:37
Name: Anton Velychko
Location: Estonia, Tallinn

Re: [filter_by_date] in Report Designer

Post by timbios »

Hello, dear Sergey!
How can i use date fetch in report designer? That function already have in report design? Or what i need to do to use this?
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: [filter_by_date] in Report Designer

Post by support »

How can i use date fetch in report designer?
Not clear what do you mean. Can you explain more.
Post Reply