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 colspan="3"> </th>
87 <!-- TMPL_LOOP NAME="savedreports" -->
88 <tr><td><!-- 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 href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report">Run this Report</a></td>
95 <td><a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule this Report</a></td>
96 <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>
99 </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 -->
103 <!-- TMPL_IF NAME="build1" -->
104 <h1>Build A Report</h1>
105 <form action="/cgi-bin/koha/reports/guided_reports.pl">
106 <fieldset class="rows">
107 <legend>Step 1 of 6: Choose a Module to Report on</legend>
108 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
109 <!-- TMPL_LOOP NAME="areas" -->
110 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
114 <fieldset class="action">
115 <input type="hidden" name="phase" value="Report on this Area">
116 <input type="submit" name="submit" value="Next >>">
123 <!-- TMPL_IF NAME="build2" -->
124 <h1>Build A Report</h1>
125 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
126 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
127 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
128 <ol><li><label for="types">Choose: </label><select name="types" id="types">
129 <!-- TMPL_LOOP NAME="types" -->
130 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
132 </select></li></ol></fieldset>
134 <fieldset class="action">
135 <input type="hidden" name="phase" value="Choose this type" />
136 <input type="submit" name="submit" value="Next >>"></fieldset>
139 <div class="yui-gb"><div class="yui-u first">Tabular:
140 <img src="<!-- TMPL_VAR name="themelang" -->/../img/reports-tabular-graphic.gif" /></div>
142 <!--- Summary and Matrix reports have not yet been implemented-->
143 <!--<div class="yui-u">Summary:
144 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
145 <div class="yui-u">Matrix:
146 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
150 <!-- TMPL_IF NAME="build3" -->
151 <h3>Step 3 of 6: Select Columns for Display</h3>
152 <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>
155 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
156 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
157 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
160 <div class="yui-u first"> <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
161 <!-- TMPL_LOOP NAME="columns" -->
162 <!-- TMPL_IF NAME="table" -->
164 <!-- TMPL_IF NAME="__first__" -->
169 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
171 <option value="<!-- TMPL_VAR NAME="name" -->">
172 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
174 <!-- TMPL_VAR NAME="name" -->
180 <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 />
181 <input type="button" name="delete" value="<< Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
185 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
190 <fieldset class="action">
191 <input type="hidden" name="phase" value="Choose these columns" />
192 <input type="submit" name="submit" value="Next >>" />
198 <!-- TMPL_IF NAME="build4" -->
199 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
200 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
201 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
202 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
203 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend><table>
204 <!-- TMPL_LOOP NAME="criteria" -->
205 <tr><td><input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR
206 NAME="name" -->" value="<!-- TMPL_VAR
207 NAME="name" -->" /> <label for="<!-- TMPL_VAR
208 NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
210 <!-- TMPL_IF NAME="date" -->
211 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
212 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
213 /><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
214 <script type="text/javascript">
216 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
217 ifFormat : "%Y-%m-%d",
218 button : "buttonfrom1",
224 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
225 <!-- TMPL_LOOP NAME="values" -->
226 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
234 <!-- TMPL_IF NAME="definitions" -->
235 <fieldset><legend>Dictionary Definitions</legend><table>
236 <!-- TMPL_LOOP NAME="definitions" -->
237 <tr><td><input type="checkbox" name="definition" value="<!--
238 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
243 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
244 <input type="submit" name="submit" value="Next >>" /> </fieldset>
249 <!-- TMPL_IF NAME="build5" -->
250 <h3>Step 5 of 6: Pick which columns to total</h3>
251 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
252 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
253 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
254 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
255 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
256 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
258 <!-- TMPL_LOOP NAME="total_by" -->
259 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
260 NAME="name" -->" value="<!-- TMPL_VAR
261 NAME="name" -->" /> <label for="<!-- TMPL_VAR
262 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td>
263 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
265 <!-- TMPL_LOOP NAME="select" -->
266 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
274 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
275 <input type="submit" name="submit" value="Next >>" /></fieldset>
280 <!-- TMPL_IF NAME="build6" -->
281 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
282 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
283 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
284 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
285 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
286 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
287 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
288 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
289 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
290 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
291 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
292 NAME="name" -->" /> <label for="<!-- TMPL_VAR
293 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
294 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
296 <!-- TMPL_LOOP NAME="select" -->
297 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
305 <fieldset class="action">
306 <input type="hidden" name="phase" value="Build Report" />
307 <input type="submit" name="submit" value="Finish" /></fieldset>
312 <!-- TMPL_IF NAME="showreport" -->
313 <h1>Confirm Custom Report</h1>
314 <p>Your report will be generated with the following SQL statement.</p>
316 <!-- TMPL_VAR NAME="sql" -->
319 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
320 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
321 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
322 <p>You will need to save the report before you can execute it</p>
323 <fieldset class="action"><input type="hidden" name="phase" value="Save" />
324 <input type="submit" name="submit" value="Save" /> </fieldset>
328 <!-- TMPL_IF NAME="save" -->
329 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
330 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
331 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
332 <fieldset class="rows">
333 <legend>Save Your Custom Report</legend>
335 <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
336 <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
338 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
339 <input type="submit" name="submit" value="Save Report" /></fieldset>
343 <!-- TMPL_IF NAME="execute" -->
344 <h1><!-- TMPL_VAR NAME="name" --></h1>
345 <p><!-- TMPL_VAR NAME="notes" --></p>
347 <!-- TMPL_LOOP NAME="results" -->
348 <!-- TMPL_VAR NAME="row" -->
351 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
352 <fieldset class="action">
353 <label for="format">Download the report: </label>
354 <select name="format" id="format">
355 <option value="csv">Comma Separated Text</option>
356 <option value="tab">Tab Separated Text</option>
358 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
359 <input type="hidden" name="phase" value="Export" />
360 <input type="submit" name="submit" value="Download" /></fieldset>
364 <!-- TMPL_IF NAME="create" -->
365 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
366 <fieldset class="rows">
367 <legend>Create Report From SQL</legend>
369 <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname" /> </li>
370 <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2"></textarea></li>
371 <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>
372 <li><label for="sql">SQL: </label><textarea id="sql" name="sql" cols="50" rows="10"></textarea></li>
376 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
377 <input type="submit" name="submit" value="Save Report" /></fieldset>
381 <!-- TMPL_IF NAME="compound" -->
382 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
383 Master: <select name="master">
384 <!-- TMPL_LOOP NAME="savedreports" -->
385 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
389 Sub report:<select name="subreport">
390 <!-- TMPL_LOOP NAME="savedreports" -->
391 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
395 <input type="hidden" name="phase" value="Save Compound" />
396 <input type="submit" name="submit" value="Save Compound" />
400 <!-- TMPL_IF NAME="save_compound" -->
401 <!-- TMPL_VAR NAME="master" --> <br />
402 <!-- TMPL_VAR NAME="subsql" -->
406 <!-- TMPL_IF NAME="retresults" -->
407 <h1>Saved Report Results</h1>
408 <h2><!-- TMPL_VAR NAME="name" --></h2>
409 <p><!-- TMPL_VAR NAME="notes" --></p>
411 <!-- TMPL_LOOP NAME="results" -->
412 <!-- TMPL_VAR NAME = "row" -->
418 <!-- TMPL_IF NAME="showsql" -->
419 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
422 <!-- TMPL_IF NAME="save_successful" -->
423 <h2>Your report has been saved</h2>
424 <p>The report you have created has now been saved. You can now</p>
426 <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Saved Reports Page</a></li>
427 <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
428 <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Guided Reports</a></li>
439 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
442 <script type="text/javascript">
444 function setObjects() {
445 selectedColumnsObj=document.getElementById('selectedColumns');
446 availableColumnsObj=document.getElementById('availableColumns');
450 function addColumn() {
451 for (i=0;i<availableColumnsObj.length;i++) {
452 if (availableColumnsObj.options[i].selected==true) {
453 var newColumnObj=document.createElement("OPTION");
454 newColumnObj.value=availableColumnsObj.options[i].value;
455 newColumnObj.text=availableColumnsObj.options[i].text;
456 selectedColumnsObj.appendChild(newColumnObj);
457 newColumnObj.selected=true;
462 function delColumn() {
463 for (i=0;i<=selectedColumnsObj.options.length;i++) {
464 if (selectedColumnsObj.options.selectedIndex>=0)
465 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
470 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->