Hi,
I has a database whit a list of ticket with a field date. When I use a Graphic without static search, the graphics works ok. I put in dimension the date field, and in metrics count of registers and show the data in graphics… But when I put in it a static search (Maybe 30 days ago, or another) the grid not show anything.
I see that sql search don?t work with static search and dates, because parameters in WHERE clause are not reemplazed ({SC_TMP_DATE_1_fecha} and {SC_TMP_DATE_2_fecha} are not reemplazed with dates in SQL)
This is the sql that use the graphics with static search ( with 30 last days) and dont work:
"select count(*),a_cmp_1,a_cmp_2,a_cmp_3 from (select year( fecha) as a_cmp_1,month(fecha) as a_cmp_2,day(fecha) as a_cmp_3 from tb_ingresos where ((fecha between ‘{SC_TMP_DATE_1_fecha}’ and ‘{SC_TMP_DATE_2_fecha}’))) SC_sel1 INNER JOIN (select year( fecha) as b_cmp_1,month(fecha) as b_cmp_2,day(fecha) as b_cmp_3 from tb_ingresos where ((fecha between ‘{SC_TMP_DATE_1_fecha}’ and ‘{SC_TMP_DATE_2_fecha}’)) group by year( fecha),month(fecha),day(fecha)) SC_sel2 ON SC_sel1.a_cmp_1 = SC_sel2.b_cmp_1 and SC_sel1.a_cmp_2 = SC_sel2.b_cmp_2 and SC_sel1.a_cmp_3 = SC_sel2.b_cmp_3 group by a_cmp_1,a_cmp_2,a_cmp_3 order by a_cmp_1,a_cmp_2,a_cmp_3 "
You can see that SC_TMP_DATE_1_fecha and SC_TMP_DATE_2_fecha are in variables and not with dates…
Can anybody confirm this bug??
Regards