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 -->
4 <!-- TMPL_IF NAME="execute" --> › Guided Reports Wizard › Saved Reports › <!-- TMPL_VAR NAME="name" --> Report<!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="build1" -->› Guided Reports Wizard › Build A Report, Step 1: Choose a Module<!-- /TMPL_IF -->
6 <!-- TMPL_IF NAME="build2" -->› Guided Reports Wizard › Build A Report, Step 2: Pick a Report Type<!-- /TMPL_IF -->
7 <!-- TMPL_IF NAME="build3" -->› Guided Reports Wizard › Build A Report, Step 3 of 6: Select Columns for Display<!-- /TMPL_IF -->
8 <!-- TMPL_IF NAME="build4" --> › Guided Reports Wizard › Build A Report, Step 4 of 6: Select Criteria to Limit on<!-- /TMPL_IF -->
9 <!-- TMPL_IF NAME="build5" --> › Guided Reports Wizard › Build A Report, Step 5 of 6: Pick which columns to total<!-- /TMPL_IF -->
10 <!-- TMPL_IF NAME="build6" -->› Guided Reports Wizard › Build A Report, Step 6 of 6: Select how you want the report ordered<!-- /TMPL_IF -->
12 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
13 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
14 <!-- TMPL_IF NAME="saved1" -->
15 <script type="text/javascript">
17 $(document).ready(function(){
18 $(".confirmdelete").click(function(){
19 $(this).parents('tr').attr("class","warn");
20 if(confirm("Are you sure you want to "+$(this).attr("title")+"?")){
23 $(this).parents('tr').attr("class","");
31 <!-- TMPL_IF NAME="showsql" -->
32 <style type="text/css">
33 #sql { width: 90%; height: 9em; border: 1px solid #EEE; }
36 <script type="text/javascript">
37 $(document).ready(function() {
38 $("#sql").focus(function() {
42 </script><!-- /TMPL_IF -->
45 <!-- TMPL_INCLUDE NAME="header.inc" -->
46 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
48 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
49 › <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" -->
50 › <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 -->
51 <!-- 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 -->
52 <!-- 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 -->
53 <!-- 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 -->
54 <!-- 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 -->
55 <!-- 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 -->
56 <!-- 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 -->
57 <!-- 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 -->
60 <div id="doc3" class="yui-t1">
68 <!-- TMPL_IF NAME="start" -->
69 <h2>Guided Reports</h2>
70 <p>Use the guided reports engine to create non standard reports.
71 This feature aims to provide some middle ground between the built in
72 canned reports and writing custom SQL reports.</p>
74 <h3>Build And Run Reports</h3>
75 <form action="/cgi-bin/koha/reports/guided_reports.pl">
76 <input type="hidden" name="phase" value="Build new" />
77 <input type="submit" name="submit" value="Build new"/>
79 <form action="/cgi-bin/koha/reports/guided_reports.pl">
80 <input type="hidden" name="phase" value="Used saved"/>
81 <input type="submit" name="submit" value="Used saved"/>
83 <form action="/cgi-bin/koha/reports/guided_reports.pl">
84 <input type="hidden" name="phase" value="Create report from SQL"/>
85 <input type="submit" name="submit" value="Create report from SQL"/>
87 <h3>Reports Dictionary</h3>
88 <p>Use the reports dictionary to define custom criteria to use in your
90 <form action="/cgi-bin/koha/reports/dictionary.pl">
91 <input type="hidden" name="phase" value="View Dictionary"/>
92 <input type="submit" name="submit" value="View Dictionary"/>
96 <!-- TMPL_IF NAME="saved1" -->
97 <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1>
98 <p>Choose the report to run from the list</p>
99 <form action="/cgi-bin/koha/reports/guided_reports.pl">
101 <tr><th>Report Name</th><th>Type</th><th>Notes</th><th>Saved Results</th><th>Saved SQL</th><th colspan="3"> </th></tr>
102 <!-- TMPL_LOOP NAME="savedreports" -->
103 <tr><td><!-- TMPL_VAR NAME="report_name" --></td>
104 <td><!-- TMPL_VAR NAME="type" --></td>
105 <td><!-- TMPL_VAR NAME="notes" --></td>
106 <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 -->
108 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a></td>
109 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report">Run this Report</a></td>
110 <td><a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule this Report</a></td>
111 <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>
115 <!-- 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 -->
119 <!-- TMPL_IF NAME="build1" -->
120 <h1>Build A Report</h1>
121 <form action="/cgi-bin/koha/reports/guided_reports.pl">
122 <fieldset class="rows">
123 <legend>Step 1 of 6: Choose a Module to Report on</legend>
124 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
125 <!-- TMPL_LOOP NAME="areas" -->
126 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
130 <fieldset class="action">
131 <input type="hidden" name="phase" value="Report on this Area" />
132 <input type="submit" name="submit" value="Next >>" />
139 <!-- TMPL_IF NAME="build2" -->
140 <h1>Build A Report</h1>
141 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
142 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
143 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
144 <ol><li><label for="types">Choose: </label><select name="types" id="types">
145 <!-- TMPL_LOOP NAME="types" -->
146 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
148 </select></li></ol></fieldset>
150 <fieldset class="action">
151 <input type="hidden" name="phase" value="Choose this type" />
152 <input type="submit" name="submit" value="Next >>" /></fieldset>
155 <div class="yui-gb"><div class="yui-u first"></div>
157 <!--- Summary and Matrix reports have not yet been implemented-->
158 <!--<div class="yui-u">Summary:
159 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
160 <div class="yui-u">Matrix:
161 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
165 <!-- TMPL_IF NAME="build3" -->
166 <h3>Step 3 of 6: Select Columns for Display</h3>
167 <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>
169 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
170 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
171 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
174 <div class="yui-u first"> <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple="multiple" size="25" style="min-width: 200px;height:300px;">
175 <!-- TMPL_LOOP NAME="columns" -->
176 <!-- TMPL_IF NAME="table" -->
178 <!-- TMPL_IF NAME="__first__" -->
183 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
185 <option value="<!-- TMPL_VAR NAME="name" -->">
186 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
188 <!-- TMPL_VAR NAME="name" -->
195 <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 />
196 <input type="button" name="delete" value="<< Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
200 <select id="selectedColumns" name="columns" multiple="multiple" size="25" style="min-width:200px;height:300px;"></select>
205 <fieldset class="action">
206 <input type="hidden" name="phase" value="Choose these columns" />
207 <input type="submit" name="submit" value="Next >>" />
214 <!-- TMPL_IF NAME="build4" -->
215 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
216 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
217 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
218 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
219 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend><table>
220 <!-- TMPL_LOOP NAME="criteria" -->
221 <tr><td><input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR
222 NAME="name" -->" value="<!-- TMPL_VAR
223 NAME="name" -->" /> <label for="<!-- TMPL_VAR
224 NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
226 <!-- TMPL_IF NAME="date" -->
227 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
228 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
229 /><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
230 <script type="text/javascript">
232 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
233 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
234 button : "buttonfrom<!-- TMPL_VAR NAME="name" -->",
240 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
241 <!-- TMPL_LOOP NAME="values" -->
242 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
250 <!-- TMPL_IF NAME="definitions" -->
251 <fieldset><legend>Dictionary Definitions</legend><table>
252 <!-- TMPL_LOOP NAME="definitions" -->
253 <tr><td><input type="checkbox" name="definition" value="<!--
254 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
259 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
260 <input type="submit" name="submit" value="Next >>" /> </fieldset>
265 <!-- TMPL_IF NAME="build5" -->
266 <h3>Step 5 of 6: Pick which columns to total</h3>
267 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
268 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
269 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
270 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
271 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
272 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
274 <!-- TMPL_LOOP NAME="total_by" -->
275 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
276 NAME="name" -->" value="<!-- TMPL_VAR
277 NAME="name" -->" /> <label for="<!-- TMPL_VAR
278 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td>
279 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
281 <!-- TMPL_LOOP NAME="select" -->
282 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
290 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
291 <input type="submit" name="submit" value="Next >>" /></fieldset>
296 <!-- TMPL_IF NAME="build6" -->
297 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
298 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
299 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
300 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
301 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
302 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
303 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
304 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
305 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
306 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
307 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
308 NAME="name" -->" /> <label for="<!-- TMPL_VAR
309 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
310 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
312 <!-- TMPL_LOOP NAME="select" -->
313 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
321 <fieldset class="action">
322 <input type="hidden" name="phase" value="Build Report" />
323 <input type="submit" name="submit" value="Finish" /></fieldset>
328 <!-- TMPL_IF NAME="showreport" -->
329 <h1>Confirm Custom Report</h1>
330 <p>Your report will be generated with the following SQL statement.</p>
332 <!-- TMPL_VAR NAME="sql" -->
335 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
336 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
337 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
338 <p>You will need to save the report before you can execute it</p>
339 <fieldset class="action"><input type="hidden" name="phase" value="Save" />
340 <input type="submit" name="submit" value="Save" /> </fieldset>
344 <!-- TMPL_IF NAME="save" -->
345 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
346 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
347 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
348 <fieldset class="rows">
349 <legend>Save Your Custom Report</legend>
351 <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
352 <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
354 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
355 <input type="submit" name="submit" value="Save Report" /></fieldset>
359 <!-- TMPL_IF NAME="execute" -->
360 <h1><!-- TMPL_VAR NAME="name" --></h1>
361 <!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
362 <!-- TMPL_IF name="pagination_bar" --><!-- TMPL_VAR name='pagination_bar'--><!-- /TMPL_IF -->
363 <!-- TMPL_UNLESS name="errors" -->
365 <!-- TMPL_LOOP NAME="results" -->
366 <!-- TMPL_VAR NAME="row" -->
369 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
370 <fieldset class="action">
371 <label for="format">Download the report: </label>
372 <select name="format" id="format">
373 <option value="csv">Comma Separated Text</option>
374 <option value="tab">Tab Separated Text</option>
376 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
377 <input type="hidden" name="phase" value="Export" />
378 <input type="submit" name="submit" value="Download" /></fieldset>
380 <!-- /TMPL_UNLESS -->
381 <!-- TMPL_IF NAME="errors" -->
382 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
383 <div class="dialog alert">
384 <b>The following error was encountered:</b><br />
385 <!-- TMPL_LOOP name="errors" -->
386 <!-- TMPL_IF NAME="sqlerr" -->This report contains the SQL keyword <!-- TMPL_VAR name="sqlerr" -->.<br />Use of this keyword is not allowed in Koha reports due to security and data integrity risks.<br />Please return to the "Saved Reports" screen and delete this report.
387 <!-- TMPL_ELSIF NAME="queryerr" -->The database returned the following error: <br /><!-- TMPL_VAR NAME="queryerr" --><br />Please check the log for further details.
391 <fieldset class="action"><input type="hidden" name="phase" value="Used saved" />
392 <input type="submit" name="submit" value="Saved Reports" /></fieldset>
397 <!-- TMPL_IF NAME="create" -->
398 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
399 <fieldset class="rows">
400 <legend>Create Report From SQL</legend>
402 <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname"<!--TMPL_IF NAME="reportname" --> value="<!-- TMPL_VAR NAME="reportname"-->"<!-- /TMPL_IF --> /> </li>
403 <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2"><!--TMPL_IF NAME="notes" --><!-- TMPL_VAR NAME="notes"--><!-- /TMPL_IF --></textarea></li>
404 <li><label for="types">Type:</label><select id="types" name="types"><!-- TMPL_LOOP NAME="types" --><option value="<!-- TMPL_VAR NAME="id" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="name"--></option><!-- /TMPL_LOOP --></select></li>
405 <li><label for="sql">SQL: </label><textarea id="sql" name="sql" cols="50" rows="10"><!--TMPL_IF NAME="sql" --><!-- TMPL_VAR NAME="sql"--><!-- /TMPL_IF --></textarea></li>
409 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
410 <input type="submit" name="submit" value="Save Report" /></fieldset>
414 <!-- TMPL_IF NAME="compound" -->
415 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
416 Master: <select name="master">
417 <!-- TMPL_LOOP NAME="savedreports" -->
418 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
422 Sub report:<select name="subreport">
423 <!-- TMPL_LOOP NAME="savedreports" -->
424 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
428 <input type="hidden" name="phase" value="Save Compound" />
429 <input type="submit" name="submit" value="Save Compound" />
433 <!-- TMPL_IF NAME="save_compound" -->
434 <!-- TMPL_VAR NAME="master" --> <br />
435 <!-- TMPL_VAR NAME="subsql" -->
439 <!-- TMPL_IF NAME="retresults" -->
440 <h1>Saved Report Results</h1>
441 <h2><!-- TMPL_VAR NAME="name" --></h2>
442 <p><!-- TMPL_VAR NAME="notes" --></p>
444 <!-- TMPL_LOOP NAME="results" -->
445 <!-- TMPL_VAR NAME = "row" -->
451 <!-- TMPL_IF NAME="showsql" -->
452 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
455 <!-- TMPL_IF NAME="save_successful" -->
456 <!-- TMPL_UNLESS NAME="errors" -->
457 <h2>Your report has been saved</h2>
458 <p>The report you have created has now been saved. You can now</p>
460 <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Saved Reports Page</a></li>
461 <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
462 <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used%20saved">Guided Reports</a></li>
464 <!-- /TMPL_UNLESS -->
465 <!-- TMPL_IF NAME="errors" -->
466 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
467 <div class="dialog alert">
468 <b>The following error was encountered:</b><br />
469 <!-- TMPL_LOOP name="errors" -->
470 <!-- TMPL_IF NAME="sqlerr" -->The SQL statement contains the keyword <!-- TMPL_VAR name="sqlerr" -->. Use of this keyword is not allowed in Koha reports due to security and data integrity risks.
471 <!-- TMPL_ELSIF NAME="queryerr" -->The SQL statment is missing the SELECT keyword.<br />Please check the SQL statement syntax.
475 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
476 <input type="hidden" name="reportname" value="<!-- TMPL_VAR NAME="reportname" -->" />
477 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
478 <input type="hidden" name="notes" value="<!-- TMPL_VAR NAME="notes" -->" />
479 <fieldset class="action"><input type="hidden" name="phase" value="Create report from SQL" />
480 <input type="submit" name="submit" value="Edit SQL" /></fieldset>
489 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
492 <script type="text/javascript">
494 function setObjects() {
495 selectedColumnsObj=document.getElementById('selectedColumns');
496 availableColumnsObj=document.getElementById('availableColumns');
500 function addColumn() {
501 for (i=0;i<availableColumnsObj.length;i++) {
502 if (availableColumnsObj.options[i].selected==true) {
503 var newColumnObj=document.createElement("OPTION");
504 newColumnObj.value=availableColumnsObj.options[i].value;
505 newColumnObj.text=availableColumnsObj.options[i].text;
506 selectedColumnsObj.appendChild(newColumnObj);
507 newColumnObj.selected=true;
512 function delColumn() {
513 for (i=0;i<=selectedColumnsObj.options.length;i++) {
514 if (selectedColumnsObj.options.selectedIndex>=0)
515 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
520 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->