1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Reports <!-- TMPL_IF NAME="start" --> › Guided Reports Wizard <!-- /TMPL_IF --><!-- TMPL_IF NAME="saved1" --> › Guided Reports Wizard › Saved Reports<!-- /TMPL_IF --><!-- TMPL_IF NAME="create" --> › Guided Reports Wizard › Create from SQL<!-- /TMPL_IF --><!-- TMPL_IF NAME="showsql" -->
3 › Guided Reports Wizard › Saved Reports › SQL View<!-- /TMPL_IF --><!-- TMPL_IF NAME="execute" --> › Guided Reports Wizard › Saved Reports › <!-- TMPL_VAR NAME="name" --> Report<!-- /TMPL_IF --><!-- TMPL_IF NAME="build1" -->› Guided Reports Wizard › Build A Report, Step 1: Choose a Module<!-- /TMPL_IF --><!-- TMPL_IF NAME="build2" -->› Guided Reports Wizard › Build A Report, Step 2: Pick a Report Type<!-- /TMPL_IF --><!-- TMPL_IF NAME="build3" -->› Guided Reports Wizard › Build A Report, Step 3 of 6: Select Columns for Display<!-- /TMPL_IF --><!-- TMPL_IF NAME="build4" --> › Guided Reports Wizard › Build A Report, Step 4 of 6: Select Criteria to Limit on<!-- /TMPL_IF --><!-- TMPL_IF NAME="build5" --> › Guided Reports Wizard › Build A Report, Step 5 of 6: Pick which columns to total<!-- /TMPL_IF --><!-- TMPL_IF NAME="build6" -->› Guided Reports Wizard › Build A Report, Step 6 of 6: Select how you want the report ordered<!-- /TMPL_IF --></title>
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
6 <!-- TMPL_IF NAME="saved1" -->
7 <script type="text/javascript">
9 $(document).ready(function(){
10 $(".confirmdelete").click(function(){
11 $(this).parents('tr').attr("class","warn");
12 if(confirm("Are you sure you want to "+$(this).attr("title")+"?")){
15 $(this).parents('tr').attr("class","");
23 <!-- TMPL_IF NAME="showsql" -->
24 <style type="text/css">
25 #sql { width: 90%; height: 9em; border: 1px solid #EEE; }
28 <script type="text/javascript">
29 $(document).ready(function() {
30 $("#sql").focus(function() {
34 </script><!-- /TMPL_IF -->
37 <!-- TMPL_INCLUDE NAME="header.inc" -->
38 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
40 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
41 › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a><!-- TMPL_IF NAME="start" --> › <strong>Guided Reports Wizard </strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="saved1" --> › <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <strong>Saved Reports</strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="create" --> › <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <strong>Create from SQL</strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="showsql" -->
42 › <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Saved Reports</a> › <strong>SQL View</strong><!-- /TMPL_IF --><!-- TMPL_IF NAME="execute" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Saved Reports</a> › <em><!-- TMPL_VAR NAME="name" --></em> Report<!-- /TMPL_IF --><!-- TMPL_IF NAME="build1" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › Build A Report, Step 1: Choose a Module<!-- /TMPL_IF --><!-- TMPL_IF NAME="build2" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 2: Pick a Report Type<!-- /TMPL_IF --><!-- TMPL_IF NAME="build3" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 3 of 6: Select Columns for Display<!-- /TMPL_IF --><!-- TMPL_IF NAME="build4" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 4 of 6: Select Criteria to Limit on<!-- /TMPL_IF --><!-- TMPL_IF NAME="build5" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 5 of 6: Pick which columns to total<!-- /TMPL_IF --><!-- TMPL_IF NAME="build6" -->› <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a>, Step 6 of 6: Select how you want the report ordered<!-- /TMPL_IF --></div>
44 <div id="doc3" class="yui-t1">
52 <!-- TMPL_IF NAME="start" -->
53 <h2>Guided Reports</h2>
54 <p>Use the guided reports engine to create non standard reports.
55 This feature aims to provide some middle ground between the built in
56 canned reports and writing custom SQL reports.</p>
58 <h3>Build And Run Reports</h3>
59 <form action="/cgi-bin/koha/reports/guided_reports.pl">
60 <input type="hidden" name="phase" value="Build new" />
61 <input type="submit" name="submit" value="Build new"/>
63 <form action="/cgi-bin/koha/reports/guided_reports.pl">
64 <input type="hidden" name="phase" value="Used saved"/>
65 <input type="submit" name="submit" value="Used saved"/>
67 <form action="/cgi-bin/koha/reports/guided_reports.pl">
68 <input type="hidden" name="phase" value="Create report from SQL"/>
69 <input type="submit" name="submit" value="Create report from SQL"/>
72 <h3>Reports Dictionary</h3>
73 <p>Use the reports dictionary to define custom criteria to use in your
75 <form action="/cgi-bin/koha/reports/dictionary.pl">
76 <input type="hidden" name="phase" value="View Dictionary"/>
77 <input type="submit" name="submit" value="View Dictionary"/>
81 <!-- TMPL_IF NAME="saved1" -->
82 <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1>
83 <p>Choose the report to run from the list</p>
85 <form action="/cgi-bin/koha/reports/guided_reports.pl">
86 <th>Report Name</th><th>Type</th><th>Notes</th><th>Saved Results</th><th>Saved SQL</th><th>Delete</th>
87 <!-- TMPL_LOOP NAME="savedreports" -->
88 <tr><td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report"><!-- TMPL_VAR NAME="report_name" --></td>
89 <td><!-- TMPL_VAR NAME="type" --></td>
90 <td><!-- TMPL_VAR NAME="notes" --></td>
91 <td><!-- TMPL_IF NAME="date_run" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=retrieve%20results&id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="date_run" --></a><!-- /TMPL_IF -->
93 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a></td>
94 <td><a class="confirmdelete" title="delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Delete%20Saved">Delete</a></td></tr>
97 </table><!-- TMPL_ELSE --><h4>There are no saved reports. <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build new?</a></h4><!-- /TMPL_IF -->
101 <!-- TMPL_IF NAME="build1" -->
102 <h1>Build A Report</h1>
103 <form action="/cgi-bin/koha/reports/guided_reports.pl">
104 <fieldset class="rows">
105 <legend>Step 1 of 6: Choose a Module to Report on</legend>
106 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
107 <!-- TMPL_LOOP NAME="areas" -->
108 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
112 <fieldset class="action">
113 <input type="hidden" name="phase" value="Report on this Area">
114 <input type="submit" name="submit" value="Next >>">
121 <!-- TMPL_IF NAME="build2" -->
122 <h1>Build A Report</h1>
123 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
124 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
125 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
126 <ol><li><label for="types">Choose: </label><select name="types" id="types">
127 <!-- TMPL_LOOP NAME="types" -->
128 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
130 </select></li></ol></fieldset>
132 <fieldset class="action">
133 <input type="hidden" name="phase" value="Choose this type" />
134 <input type="submit" name="submit" value="Next >>"></fieldset>
137 <div class="yui-gb"><div class="yui-u first">Tabular:
138 <img src="/intranet-tmpl/prog/img/reports-tabular-graphic.gif" /></div>
140 <!--- Summary and Matrix reports have not yet been implemented-->
141 <!--<div class="yui-u">Summary:
142 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
143 <div class="yui-u">Matrix:
144 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
148 <!-- TMPL_IF NAME="build3" -->
149 <h3>Step 3 of 6: Select Columns for Display</h3>
150 <p>Note: Be careful selecting when selecting columns. If your choice is too broad it could result in a very large report that will either not complete, or slow your system down.</p>
153 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
154 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
155 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
158 <div class="yui-u first"> <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
159 <!-- TMPL_LOOP NAME="columns" -->
160 <!-- TMPL_IF NAME="table" -->
162 <!-- TMPL_IF NAME="__first__" -->
167 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
169 <option value="<!-- TMPL_VAR NAME="name" -->">
170 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
172 <!-- TMPL_VAR NAME="name" -->
178 <div style="width: 6.3em; float: right; margin-top: 100px"><input type="button" name="Add" value="Add >>" class="button" style="width:6em;" onclick="addColumn()" /><br />
179 <input type="button" name="delete" value="<< Remove" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
183 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
188 <fieldset class="action">
189 <input type="hidden" name="phase" value="Choose these columns" />
190 <input type="submit" name="submit" value="Next >>" />
196 <!-- TMPL_IF NAME="build4" -->
197 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
198 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
199 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
200 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
201 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend><table>
202 <!-- TMPL_LOOP NAME="criteria" -->
203 <tr><td><input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR
204 NAME="name" -->" value="<!-- TMPL_VAR
205 NAME="name" -->" /> <label for="<!-- TMPL_VAR
206 NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
208 <!-- TMPL_IF NAME="date" -->
209 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
210 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
211 /><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
212 <script type="text/javascript">
214 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
215 ifFormat : "%Y-%m-%d",
216 button : "buttonfrom1",
222 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
223 <!-- TMPL_LOOP NAME="values" -->
224 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
232 <!-- TMPL_IF NAME="definitions" -->
233 <fieldset><legend>Dictionary Definitions</legend><table>
234 <!-- TMPL_LOOP NAME="definitions" -->
235 <tr><td><input type="checkbox" name="definition" value="<!--
236 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
241 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
242 <input type="submit" name="submit" value="Next >>" /> </fieldset>
247 <!-- TMPL_IF NAME="build5" -->
248 <h3>Step 5 of 6: Pick which columns to total</h3>
249 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
250 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
251 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
252 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
253 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
254 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
256 <!-- TMPL_LOOP NAME="total_by" -->
257 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
258 NAME="name" -->" value="<!-- TMPL_VAR
259 NAME="name" -->" /> <label for="<!-- TMPL_VAR
260 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td>
261 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
263 <!-- TMPL_LOOP NAME="select" -->
264 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
272 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
273 <input type="submit" name="submit" value="Next >>" /></fieldset>
278 <!-- TMPL_IF NAME="build6" -->
279 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
280 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
281 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
282 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
283 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
284 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
285 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
286 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
287 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
288 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
289 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
290 NAME="name" -->" /> <label for="<!-- TMPL_VAR
291 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
292 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
294 <!-- TMPL_LOOP NAME="select" -->
295 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
303 <fieldset class="action">
304 <input type="hidden" name="phase" value="Build Report" />
305 <input type="submit" name="submit" value="Finish" /></fieldset>
310 <!-- TMPL_IF NAME="showreport" -->
311 <h1>Confirm Custom Report</h1>
312 <p>Your report will be generated with the following SQL statement.</p>
314 <!-- TMPL_VAR NAME="sql" -->
317 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
318 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
319 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
320 <p>You will need to save the report before you can execute it</p>
321 <fieldset class="action"><input type="hidden" name="phase" value="Save" />
322 <input type="submit" name="submit" value="Save" /> </fieldset>
326 <!-- TMPL_IF NAME="save" -->
327 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
328 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
329 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
330 <fieldset class="rows">
331 <legend>Save Your Custom Report</legend>
333 <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
334 <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
336 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
337 <input type="submit" name="submit" value="Save Report" /></fieldset>
341 <!-- TMPL_IF NAME="execute" -->
342 <h1><!-- TMPL_VAR NAME="name" --></h1>
343 <p><!-- TMPL_VAR NAME="notes" --></p>
345 <!-- TMPL_LOOP NAME="results" -->
346 <!-- TMPL_VAR NAME="row" -->
349 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
350 <fieldset class="action">
351 <label for="format">Download the report: </label>
352 <select name="format" id="format">
353 <option value="csv">Comma Separated Text</option>
354 <option value="tab">Tab Separated Text</option>
356 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
357 <input type="hidden" name="phase" value="Export" />
358 <input type="submit" name="submit" value="Download" /></fieldset>
362 <!-- TMPL_IF NAME="create" -->
363 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
364 <fieldset class="rows">
365 <legend>Create Report From SQL</legend>
367 <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname" /> </li>
368 <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2"></textarea></li>
369 <li><label for="types">Type:</label><select id="types" name="types"><!-- TMPL_LOOP NAME="types" --><option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option><!-- /TMPL_LOOP --></select></li>
370 <li><label for="sql">SQL: </label><textarea id="sql" name="sql" cols="50" rows="10"></textarea></li>
374 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
375 <input type="submit" name="submit" value="Save Report" /></fieldset>
379 <!-- TMPL_IF NAME="compound" -->
380 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
381 Master: <select name="master">
382 <!-- TMPL_LOOP NAME="savedreports" -->
383 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
387 Sub report:<select name="subreport">
388 <!-- TMPL_LOOP NAME="savedreports" -->
389 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
393 <input type="hidden" name="phase" value="Save Compound" />
394 <input type="submit" name="submit" value="Save Compound" />
398 <!-- TMPL_IF NAME="save_compound" -->
399 <!-- TMPL_VAR NAME="master" --> <br />
400 <!-- TMPL_VAR NAME="subsql" -->
404 <!-- TMPL_IF NAME="retresults" -->
405 <h1>Saved Report Results</h1>
406 <h2><!-- TMPL_VAR NAME="name" --></h2>
407 <p><!-- TMPL_VAR NAME="notes" --></p>
409 <!-- TMPL_LOOP NAME="results" -->
410 <!-- TMPL_VAR NAME = "row" -->
416 <!-- TMPL_IF NAME="showsql" -->
417 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
420 <!-- TMPL_IF NAME="save_successful" -->
421 <h2>Your report has been saved</h2>
422 <p>The report you have created has now been saved. You can now</p>
424 <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Saved Reports Page</a></li>
425 <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
426 <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Guided Reports</a></li>
437 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
440 <script type="text/javascript">
442 function setObjects() {
443 selectedColumnsObj=document.getElementById('selectedColumns');
444 availableColumnsObj=document.getElementById('availableColumns');
448 function addColumn() {
449 for (i=0;i<availableColumnsObj.length;i++) {
450 if (availableColumnsObj.options[i].selected==true) {
451 var newColumnObj=document.createElement("OPTION");
452 newColumnObj.value=availableColumnsObj.options[i].value;
453 newColumnObj.text=availableColumnsObj.options[i].text;
454 selectedColumnsObj.appendChild(newColumnObj);
455 newColumnObj.selected=true;
460 function delColumn() {
461 for (i=0;i<=selectedColumnsObj.options.length;i++) {
462 if (selectedColumnsObj.options.selectedIndex>=0)
463 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
468 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->