This widget filters a column based on an exact string
match.
This widget filters a column based on an set of strings.
This widget filters a column based on an initial substring
match.
This widget filters a column based on an exact string match.
This widget filters a column based on multiple strings.
This widget allows the user to pick an arbitrary time range
on which to report.
$full_col = "CAST(DATE_TRUNC('month', $full_col) AS DATE)";
$where_clause =
"$full_col IN ( CAST(DATE_TRUNC('month', NOW() - CAST( ? || ' month' AS INTERVAL )) AS DATE), ".
" CAST(DATE_TRUNC('month', NOW() - CAST( ? || ' month' AS INTERVAL )) AS DATE))";
push @$bind_list, $$val{target}, $$val{target} + $$val{compare};
This widget allows the user to pick a specific date on which
to report.
$full_col = "DATE_TRUNC('day', $full_col)";
$where_clause = "$full_col = CAST(? AS DATE)";
push @$bind_list, sprintf('%d/%02d/%02d', @$val{qw/year month day/});
This widget allows the user to pick a specific week of the year
on which to report.
$where_clause =
"( EXTRACT('year' FROM $full_col) = ? ".
" AND EXTRACT('week' FROM $full_col) = ? )";
push @$bind_list, $$val{year}, $$val{week};
This widget allows the user to pick a range of weeks of the year
on which to report.
$where_clause =
"( EXTRACT('year' FROM $full_col) = ? ".
" AND EXTRACT('week' FROM $full_col) ".
"BETWEEN ? AND ? )";
push @$bind_list, $$val{year}, $$val{start}, $$val{end};
This widget allows the user to pick a specific year and month
on which to report.
$where_clause =
"( EXTRACT('year' FROM $full_col) = ? ".
" AND EXTRACT('month' FROM $full_col) = ? )";
push @$bind_list, $$val{'start-year'}, $$val{'start-month'};
This widget allows the user to pick a range of month on which to
report.
$where_clause =
"DATE_TRUNC('month', $full_col) ".
"BETWEEN CAST(? AS DATE) AND CAST(? AS DATE)";
push @$bind_list,
sprintf('%d/%02d/01', @$val{qw/start-year start-month/}),
sprintf('%d/%02d/01', @$val{qw/end-year end-month/});
This widget allows the user to pick a specific year on which to
report.
$where_clause = "EXTRACT('year' FROM $full_col) = ?";
push @$bind_list, $val;
This widget allows the user to pick a range of years on which to
report.
$where_clause = "EXTRACT('year' FROM $full_col) BETWEEN ? AND ?";
push @$bind_list, $$val{year}, $$val{year} + $$val{year-count};
This widget allows the user to pick a date relative to the
report runtime on which to report.
$where_clause =
"CAST($full_col AS DATE) = ".
"CAST((NOW() - CAST(? || ' day' AS INTERVAL)) AS DATE)";
push @$bind_list, $val;
This widget allows the user to pick a week (sun-sat) relative
to the report runtime on which to report.
$where_clause =
"( CAST(DATE_TRUNC('week', $full_col) AS DATE) = ".
" CAST(DATE_TRUNC('week', NOW() - CAST(? || ' weeks' AS INTERVAL) ) AS DATE) ";
push @$bind_list, $val;
This widget allows the user to pick a month relative to the
report runtime on which to report.
$where_clause =
"CAST(DATE_TRUNC('month', $full_col) AS DATE) = ".
"CAST(DATE_TRUNC('month', NOW()) - CAST(? || ' months' AS INTERVAL) AS DATE)";
push @$bind_list, $val;
This widget allows the user to pick a year relative to the
report runtime on which to report.
$where_clause =
"CAST(DATE_TRUNC('year', $full_col) AS DATE)= ".
"CAST(DATE_TRUNC('year', NOW()) - CAST(? || ' years' AS INTERVAL) AS DATE)";
push @$bind_list, $val;
This widget filters on an exact Library Name match.
This widget filters based on multiple Library names.