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' },
25 { relation=> 'circ-id-mb',
26 column => { transform => sum => colname => 'amount' },
27 alias => 'total bills',
31 table => 'action.circulation',
36 alias => 'circ-circ_staff-au',
40 table => 'actor.card',
41 alias => 'circ-circ_staff-au-card-ac',
47 table => 'actor.org_unit',
48 alias => 'circ-checkin_lib-aou',
52 table => 'money.billing',
53 alias => 'circ-id-mb',
59 { relation => 'circ-checkin_lib-aou',
61 condition => { 'in' => '::PARAM1' },
64 column => { transform => month_trunc => colname => 'checkin_time' },
65 condition => { 'in' => '::PARAM2' },
67 { relation => 'circ-id-mb',
69 condition => { '=' => '::PARAM7' },
74 column => { transform => count => colname => 'id' },
75 condition => { 'between' => '::PARAM5' },
80 column => { transform => count => colname => 'id' },
81 direction => 'descending',
83 { relation=> 'circ-checkin_lib-aou',
84 column => { colname => 'shortname', transform => 'Bare' },
87 column => { transform => month_trunc => colname => 'checkin_time' },
88 direction => 'descending'
90 { relation=> 'circ-circ_staff-au-card-ac',
97 PARAM1 => [ 18, 19, 20, 21, 22, 23 ],
98 #PARAM2 => ['2006-07','2006-08','2006-09'],
99 PARAM2 => [{transform => 'relative_month', params => [-2]},{transform => 'relative_month', params => [-3]}],
100 PARAM3 => 'Circ Count',
101 PARAM4 => 'Checkin Date',
102 PARAM5 => [{ transform => 'Bare', params => [10] },{ transform => 'Bare', params => [100] }],
107 my $r = OpenILS::Reporter::SQLBuilder->new;
109 $r->register_params( $params );
110 my $rs = $r->parse_report( $report );
112 print "Column Labels: " . join(', ', $rs->column_label_list) . "\n";