5 use OpenILS::Reporter::SQLBuilder;
10 column => { transform => month_trunc => colname => 'checkin_time' },
13 { relation=> 'circ-checkin_lib-aou',
14 column => { colname => 'shortname', transform => 'Bare'},
15 alias => 'Library Short Name',
17 { relation=> 'circ-circ_staff-au-card-ac',
19 alias => 'User Barcode',
22 column => { transform => count => colname => 'id' },
27 table => 'action.circulation',
32 alias => 'circ-circ_staff-au',
36 table => 'actor.card',
37 alias => 'circ-circ_staff-au-card-ac',
43 table => 'actor.org_unit',
44 alias => 'circ-checkin_lib-aou',
50 { relation => 'circ-checkin_lib-aou',
52 condition => { 'in' => '::PARAM1' },
55 column => { transform => month_trunc => colname => 'checkin_time' },
56 condition => { 'in' => '::PARAM2' },
61 column => { transform => count => colname => 'id' },
62 condition => { 'between' => '::PARAM5' },
67 column => { transform => count => colname => 'id' },
68 direction => 'descending',
70 { relation=> 'circ-checkin_lib-aou',
71 column => { colname => 'shortname', transform => 'Bare' },
74 column => { transform => month_trunc => colname => 'checkin_time' },
75 direction => 'descending'
77 { relation=> 'circ-circ_staff-au-card-ac',
84 PARAM1 => [ 18, 19, 20, 21, 22, 23 ],
85 #PARAM2 => ['2006-07','2006-08','2006-09'],
86 PARAM2 => [{transform => 'relative_month', params => [-2]},{transform => 'relative_month', params => [-3]}],
87 PARAM3 => 'Circ Count',
88 PARAM4 => 'Checkin Date',
89 PARAM5 => [{ transform => 'Bare', params => [10] },{ transform => 'Bare', params => [100] }],
93 my $r = OpenILS::Reporter::SQLBuilder->new;
95 $r->register_params( $params );
96 my $rs = $r->parse_report( $report );
98 print "Column Labels: " . join(', ', $rs->column_label_list) . "\n";