While you create report template, you have to return the “NULL” value of substring in parameter setting menu.
Configuration is as follows.
PageParam=S_DAY, G_Width, G_Height, agent_id
PageParamName=search data(YYYYMMDD), Graph WIDTH, Graph HEIGHT, AGENT ID
S_DAY=${J_CURRENT_DATE}
DAY_DD=${S_DAY(6,8)} <- here
DAY_MMDD=${S_DAY(4,8)}
The SQL is as follows.
SELECT x.a, x.b, AVG
FROM
(SELECT log_dt || substr(log_tm,1,4) a, agent_id b, concurrent_user c
FROM perf_x_${DAY_DD}
WHERE log_dt =’${S_DAY}’
and agent_id=’${agent_id}’) x
GROUP BY x.a, x.b
ORDER BY 1
However, you may see “java.sql.SQLException: Table/View ‘PERF_X_NULL’ does not exist.” in the “jennifer.log” file. Then, set substring as ”${J_CURRENT_DATE(6,8)}” and the result value will be generated. Substring value for variables set as “NULL”.
One more strange point is that above result appears in the window displaying SQL data in the report item list
The JENNIFER version that I ‘m using is 3.2.
Thanks. |