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',
48 table => 'money.billing',
49 alias => 'circ-id-mb',
55 { relation => 'circ-checkin_lib-aou',
57 condition => { 'in' => '::PARAM1' },
60 column => { transform => month_trunc => colname => 'checkin_time' },
61 condition => { 'in' => '::PARAM2' },
63 { relation => 'circ-id-mb',
65 condition => { '=' => '::PARAM7' },
70 column => { transform => count => colname => 'id' },
71 condition => { 'between' => '::PARAM5' },
76 column => { transform => count => colname => 'id' },
77 direction => 'descending',
79 { relation=> 'circ-checkin_lib-aou',
80 column => { colname => 'shortname', transform => 'Bare' },
83 column => { transform => month_trunc => colname => 'checkin_time' },
84 direction => 'descending'
86 { relation=> 'circ-circ_staff-au-card-ac',
96 PARAM1 => [ 18, 19, 20, 21, 22, 23 ],
97 #PARAM2 => ['2006-07','2006-08','2006-09'],
98 PARAM2 => [{transform => 'relative_month', params => [-2]},{transform => 'relative_month', params => [-3]}],
99 PARAM3 => 'Circ Count',
100 PARAM4 => 'Checkin Date',
101 PARAM5 => [{ transform => 'Bare', params => [10] },{ transform => 'Bare', params => [100] }],
106 my $r = OpenILS::Reporter::SQLBuilder->new;
108 $r->register_params( $params );
109 my $rs = $r->parse_report( $report );
110 $rs->relative_time('2006-10-01T00:00:00-4');
112 print "Column Labels: " . join(', ', $rs->column_label_list) . "\n";