1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha -- Reports</title>
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
8 <!-- TMPL_INCLUDE NAME="header.inc" -->
9 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
11 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation.pl">Reports</a> › <strong>Guided Reports Wizard </strong></div>
13 <div id="doc3" class="yui-t2">
21 <!-- TMPL_IF NAME="start" -->
22 <h2>Guided Reports</h2>
23 <p>Use the guided reports engine to create non standard reports.
24 This feature aims to provide some middle ground between the built in
25 canned reports and requiring a DBA to write the SQL code for you.</p>
26 <form action="/cgi-bin/koha/reports/guided_reports.pl">
27 <h3>Build and Run existing Reports</h3>
28 <input type="submit" name="phase" value="Build new"/>
29 <input type="submit" name="phase" value="Used saved"/>
30 <input type="submit" name="phase" value="Create report from SQL"/>
31 <!-- <input type="submit" name="phase" value="Create Compound Report"/> -->
32 <h3>Define Custom Criteria</h3>
33 <p>Use the reports dictionary to define custom criteria to use in your
35 <input type="submit" name="phase" value="View Dictionary"/>
39 <!-- TMPL_IF NAME="saved1" -->
40 <h1>Load Saved Reports<h1>
41 Choose the report from the list
42 <form action="/cgi-bin/koha/reports/guided_reports.pl">
43 <select name="reports">
44 <!-- TMPL_LOOP NAME="savedreports" -->
45 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
48 <input type="submit" name="phase" value="Run this report">
53 <!-- TMPL_IF NAME="build1" -->
54 <h1>Build A Report</h1>
55 <h3>Step 1 of 6: Choose a Module to Report on</h3>
56 <form action="/cgi-bin/koha/reports/guided_reports.pl">
58 <!-- TMPL_LOOP NAME="areas" -->
59 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
63 <input type="submit" name="phase" value="Report on this Area">
68 <!-- TMPL_IF NAME="build2" -->
69 <h1>Build A Report</h1>
70 <h3>Step 2 of 6: Pick a Report Type</h3>
71 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
72 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
74 <!-- TMPL_LOOP NAME="types" -->
75 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
79 <input type="submit" name="phase" value="Choose this type">
83 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
85 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
87 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />
90 <!-- TMPL_IF NAME="build3" -->
91 <h3>Step 3 of 6: Select Columns for Display</h3>
92 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
93 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
94 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
95 <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
96 <!-- TMPL_LOOP NAME="columns" -->
97 <!-- TMPL_IF NAME="table" -->
99 <!-- TMPL_IF NAME="__first__" -->
104 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
106 <option value="<!-- TMPL_VAR NAME="name" -->">
107 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
109 <!-- TMPL_VAR NAME="name" -->
115 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
116 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
117 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
119 <input type="submit" name="phase" value="Choose these columns">
123 <!-- TMPL_IF NAME="build4" -->
124 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
126 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
127 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
128 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
129 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
131 <tr><td><!-- TMPL_LOOP NAME="criteria" -->
132 <input type=checkbox name="criteria_column" value="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="description" --> =
134 <!-- TMPL_IF NAME="date" -->
135 <input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value="" >
136 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
137 <script type="text/javascript">
139 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
140 ifFormat : "%Y-%m-%d",
141 button : "buttonfrom1",
147 </td><td><select name="<!-- TMPL_VAR NAME="name" -->_value"></td>
148 <!-- TMPL_LOOP NAME="values" -->
149 <td><option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
157 <!-- TMPL_IF NAME="definitions" -->
158 Dictionary Definitions <br />
159 <!-- TMPL_LOOP NAME="definitions" -->
160 <input type=checkbox name="definition" value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name" --><br />
163 <input type="submit" name="phase" value="Choose these criteria">
168 <!-- TMPL_IF NAME="build5" -->
169 <h3>Step 5 of 6: Pick which columns to total</h3>
170 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
171 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
172 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
173 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
174 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
175 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
176 <!-- TMPL_LOOP NAME="total_by" -->
177 <input type=checkbox name="total_by" value="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="name"-->
178 <select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
180 <!-- TMPL_LOOP NAME="select" -->
181 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
188 <input type="submit" name="phase" value="Choose Totals">
193 <!-- TMPL_IF NAME="build6" -->
194 <h3>Step 6 of 6: Select the ordering</h3>
195 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
196 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
197 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
198 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
199 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
200 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
201 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
202 <!-- TMPL_LOOP NAME="order_by" -->
203 <input type=checkbox name="order_by" value="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="name"-->
204 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
206 <!-- TMPL_LOOP NAME="select" -->
207 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
214 <input type="submit" name="phase" value="Build Report">
219 <!-- TMPL_IF NAME="showreport" -->
220 <!-- TMPL_VAR NAME="sql" -->
223 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
224 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
225 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
226 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
230 <!-- TMPL_IF NAME="save" -->
231 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
232 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
233 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
234 Report Name: <input type="text" name="reportname"> <br />
235 Notes: <textarea name="notes"></textarea><br />
236 <input type="submit" name="phase" value="Save Report">
240 <!-- TMPL_IF NAME="execute" -->
243 <!-- TMPL_LOOP NAME="results" -->
244 <!-- TMPL_VAR NAME="row" -->
247 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
248 <select name="format">
249 <option value="csv">Comma Separated Text</option>
250 <option value="tab">Tab Separated Text</option>
252 <input type="submit" name="phase" value="Export">
253 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
257 <!-- TMPL_IF NAME="create" -->
258 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
259 Report Name: <input type="text" name="reportname"> <br />
261 <select name="types">
262 <!-- TMPL_LOOP NAME="types" -->
263 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
267 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
268 <input type="submit" name="phase" value="Save Report">
272 <!-- TMPL_IF NAME="compound" -->
273 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
274 Master: <select name="master">
275 <!-- TMPL_LOOP NAME="savedreports" -->
276 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
280 Sub report:<select name="subreport">
281 <!-- TMPL_LOOP NAME="savedreports" -->
282 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
286 <input type="submit" name="phase" value="Save Compound">
290 <!-- TMPL_IF NAME="save_compound" -->
291 <!-- TMPL_VAR NAME="master" --> <br />
292 <!-- TMPL_VAR NAME="subsql" -->
298 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
301 <script type="text/javascript">
302 function setObjects() {
303 selectedColumnsObj=document.getElementById('selectedColumns');
304 availableColumnsObj=document.getElementById('availableColumns');
308 function addColumn() {
309 for (i=0;i<availableColumnsObj.length;i++) {
310 if (availableColumnsObj.options[i].selected==true) {
311 var newColumnObj=document.createElement("OPTION");
312 newColumnObj.value=availableColumnsObj.options[i].value;
313 newColumnObj.text=availableColumnsObj.options[i].text;
314 selectedColumnsObj.appendChild(newColumnObj);
315 newColumnObj.selected=true;
320 function delColumn() {
321 for (i=0;i<=selectedColumnsObj.options.length;i++) {
322 if (selectedColumnsObj.options.selectedIndex>=0)
323 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
327 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->