1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Reports › Guided Reports Wizard
3 <!-- TMPL_IF NAME="saved1" -->› Saved Reports
4 <!-- TMPL_ELSIF NAME="create" -->› Create from SQL
5 <!-- TMPL_ELSIF NAME="showsql" -->› Saved Reports › SQL View
6 <!-- TMPL_ELSIF NAME="execute" -->› Saved Reports › <!-- TMPL_VAR NAME="name" --> Report
7 <!-- TMPL_ELSIF NAME="buildx" -->› Build A Report, Step <!-- TMPL_VAR NAME="buildx" --> of 6:
8 <!-- TMPL_IF NAME="build1" -->Choose a Module
9 <!-- TMPL_ELSIF NAME="build2" -->Pick a Report Type
10 <!-- TMPL_ELSIF NAME="build3" -->Select Columns for Display
11 <!-- TMPL_ELSIF NAME="build4" -->Select Criteria to Limit on
12 <!-- TMPL_ELSIF NAME="build5" -->Pick which columns to total
13 <!-- TMPL_ELSIF NAME="build6" -->Select how you want the report ordered
17 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
18 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
19 <style type="text/css">
20 #sql { width: 90%; height: 9em; border: 1px solid #EEE; }
22 <script type="text/javascript">
24 $(document).ready(function(){
25 <!-- TMPL_IF NAME="showsql" -->
26 $("#sql").focus(function() {
30 <!-- TMPL_IF NAME="saved1" -->
31 $(".confirmdelete").click(function(){
32 $(this).parents('tr').attr("class","warn");
33 if(confirm("Are you sure you want to "+$(this).attr("title")+"?")){
36 $(this).parents('tr').attr("class","");
46 <!-- TMPL_INCLUDE NAME="header.inc" -->
47 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
49 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
50 › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
51 › <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a>
53 <!-- TMPL_IF NAME="saved1" --><strong>Saved Reports</strong>
54 <!-- TMPL_ELSIF NAME="create" --><strong>Create from SQL</strong>
55 <!-- TMPL_ELSIF NAME="showsql" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports</a> › <strong>SQL View</strong>
56 <!-- TMPL_ELSIF NAME="execute" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports</a> › <em><!-- TMPL_VAR NAME="name" --></em> Report
57 <!-- TMPL_ELSIF NAME="buildx" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build A Report</a> › Step <!-- TMPL_VAR NAME="buildx" --> of 6:
58 <!-- TMPL_IF NAME="build1" -->Choose a Module
59 <!-- TMPL_ELSIF NAME="build2" -->Pick a Report Type
60 <!-- TMPL_ELSIF NAME="build3" -->Select Columns for Display
61 <!-- TMPL_ELSIF NAME="build4" -->Select Criteria to Limit on
62 <!-- TMPL_ELSIF NAME="build5" -->Pick which columns to total
63 <!-- TMPL_ELSIF NAME="build6" -->Select how you want the report ordered
68 <div id="doc3" class="yui-t1">
74 <!-- TMPL_IF NAME="start" -->
75 <h2>Guided Reports</h2>
76 <p>Use the guided reports engine to create non standard reports.
77 This feature aims to provide some middle ground between the built in
78 canned reports and writing custom SQL reports.</p>
80 <h3>Build And Run Reports</h3>
81 <!-- TMPL_IF NAME="CAN_user_reports_create_reports" -->
82 <form action="/cgi-bin/koha/reports/guided_reports.pl">
83 <input type="hidden" name="phase" value="Build new" />
84 <input type="submit" name="submit" value="Build new"/>
87 <!-- TMPL_IF NAME="CAN_user_reports_execute_reports" -->
88 <form action="/cgi-bin/koha/reports/guided_reports.pl">
89 <input type="hidden" name="phase" value="Use saved"/>
90 <input type="submit" name="submit" value="Use saved"/>
93 <!-- TMPL_IF NAME="CAN_user_reports_create_reports" -->
94 <form action="/cgi-bin/koha/reports/guided_reports.pl">
95 <input type="hidden" name="phase" value="Create report from SQL"/>
96 <input type="submit" name="submit" value="Create report from SQL"/>
99 <h3>Reports Dictionary</h3>
100 <p>Use the reports dictionary to define custom criteria to use in your reports</p>
101 <form action="/cgi-bin/koha/reports/dictionary.pl">
102 <input type="hidden" name="phase" value="View Dictionary"/>
103 <input type="submit" name="submit" value="View Dictionary"/>
107 <!-- TMPL_IF NAME="saved1" -->
108 <!-- TMPL_IF NAME="savedreports" --><h1>Saved Reports</h1>
109 <p>Choose the report to run from the list</p>
110 <form action="/cgi-bin/koha/reports/guided_reports.pl">
112 <tr><th>ID</th><th>Report Name</th><th>Type</th><th>Notes</th><th>Author</th><th>Creation Date</th><th>Saved Results</th><th>Saved SQL</th><th colspan="3"> </th></tr>
113 <!-- TMPL_LOOP NAME="savedreports" -->
114 <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
115 <td><!-- TMPL_VAR NAME="id" --></td>
116 <td><!-- TMPL_VAR NAME="report_name" --></td>
117 <td><!-- TMPL_VAR NAME="type" --></td>
118 <td><!-- TMPL_VAR NAME="notes" --></td>
119 <td><!-- TMPL_VAR NAME="borrowersurname" --><!-- TMPL_IF NAME="borrowerfirstname" -->, <!-- TMPL_VAR NAME="borrowerfirstname" --><!-- /TMPL_IF --> (<!-- TMPL_VAR NAME="borrowernumber" -->)</td>
120 <td><!-- TMPL_VAR NAME="date_created" --></td>
121 <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 -->
123 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a>
124 <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Edit%20SQL">Edit SQL</a></td>
125 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report">Run</a></td>
126 <td><a href="/cgi-bin/koha/tools/scheduler.pl?id=<!-- TMPL_VAR NAME="id" -->">Schedule</a></td>
127 <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>
131 <!-- 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 -->
135 <!-- TMPL_IF NAME="build1" -->
136 <h1>Build A Report</h1>
137 <form action="/cgi-bin/koha/reports/guided_reports.pl">
138 <fieldset class="rows">
139 <legend>Step 1 of 6: Choose a Module to Report on</legend>
140 <ol><li><label for="areas">Choose: </label><select name="areas" id="areas">
141 <!-- TMPL_LOOP NAME="areas" -->
142 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
146 <fieldset class="action">
147 <input type="hidden" name="phase" value="Report on this Area" />
148 <input type="submit" name="submit" value="Next >>" />
155 <!-- TMPL_IF NAME="build2" -->
156 <h1>Build A Report</h1>
157 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
158 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
159 <fieldset class="rows"><legend>Step 2 of 6: Pick a Report Type</legend>
160 <ol><li><label for="types">Choose: </label>
161 <select id="types" name="types">
162 <option value="1">Tabular</option>
163 <option value="2" disabled="disabled">Summary</option>
164 <option value="3" disabled="disabled">Matrix</option>
166 </li></ol></fieldset>
168 <fieldset class="action">
169 <input type="hidden" name="phase" value="Choose this type" />
170 <input type="button" name="back" value="<< Back" onclick="javascript:history.back()" />
171 <input type="submit" name="submit" value="Next >>" />
175 <div class="yui-gb"><div class="yui-u first"></div>
177 <!--- Summary and Matrix reports have not yet been implemented-->
178 <!--<div class="yui-u">Summary:
179 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
180 <div class="yui-u">Matrix:
181 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
185 <!-- TMPL_IF NAME="build3" -->
186 <h3>Step 3 of 6: Select Columns for Display</h3>
187 <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>
189 <form id="column_submit" action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
190 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
191 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
194 <div class="yui-u first"> <div style="float: left;"><select id="availableColumns" name="oldcolumns2" multiple="multiple" size="25" style="min-width: 200px;height:300px;">
195 <!-- TMPL_LOOP NAME="columns" -->
196 <!-- TMPL_IF NAME="table" -->
198 <!-- TMPL_IF NAME="__first__" -->
203 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
205 <option value="<!-- TMPL_VAR NAME="name" -->">
206 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
208 <!-- TMPL_VAR NAME="name" -->
215 <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 />
216 <input type="button" name="delete" value="<< Delete" class="button" style="width: 6em; margin: 1em 0;" onclick="delColumn()" /></div>
220 <select id="selectedColumns" name="columns" multiple="multiple" size="25" style="width:200px; height:300px;"></select>
225 <fieldset class="action">
226 <input type="hidden" name="phase" value="Choose these columns" />
227 <input type="button" name="back" value="<< Back" onclick="javascript:history.back()" />
228 <input type="submit" name="submit" value="Next >>" />
235 <!-- TMPL_IF NAME="build4" -->
236 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
237 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
238 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
239 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
240 <fieldset><legend>Step 4 of 6: Select Criteria to Limit on</legend>
242 <!-- TMPL_LOOP NAME="criteria" -->
245 <input type="checkbox" name="criteria_column" id="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="name" -->" />
246 <label for="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="description" --> </label>
248 <!-- TMPL_IF NAME="date" -->
250 <input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value="" />
251 <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" />
252 <script type="text/javascript">
254 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
255 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
256 button : "buttonfrom<!-- TMPL_VAR NAME="name" -->",
260 <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span>
264 <!-- TMPL_IF NAME="textrange" -->
266 <input type="text" size="10" id="<!-- TMPL_VAR NAME="from" -->_value" name="<!-- TMPL_VAR NAME="from" -->_value" value="" /> to
267 <input type="text" size="10" id="<!-- TMPL_VAR NAME="to" -->_value" name="<!-- TMPL_VAR NAME="to" -->_value" value="" />
271 <!-- TMPL_IF NAME="daterange" -->
273 <input type="text" size="10" id="from_<!-- TMPL_VAR NAME="name" -->_value" name="from_<!-- TMPL_VAR NAME="name" -->_value" value="" />
274 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfromfrom_<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
275 <script type="text/javascript">
277 inputField : "from_<!-- TMPL_VAR NAME="name" -->_value",
278 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
279 button : "buttonfromfrom_<!-- TMPL_VAR NAME="name" -->",
284 <input type="text" size="10" id="to_<!-- TMPL_VAR NAME="name" -->_value" name="to_<!-- TMPL_VAR NAME="name" -->_value" value="" />
285 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfromto_<!-- TMPL_VAR NAME="name" -->" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
286 <script type="text/javascript">
288 inputField : "to_<!-- TMPL_VAR NAME="name" -->_value",
289 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
290 button : "buttonfromto_<!-- TMPL_VAR NAME="name" -->",
294 <span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span>
299 <select name="<!-- TMPL_VAR NAME="name" -->_value">
300 <!-- TMPL_LOOP NAME="values" -->
301 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_IF name="default" -->Default<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="availablevalues" ESCAPE="HTML"--><!-- /TMPL_IF --></option>
313 <!-- TMPL_IF NAME="definitions" -->
314 <fieldset><legend>Dictionary Definitions</legend><table>
315 <!-- TMPL_LOOP NAME="definitions" -->
316 <tr><td><input type="checkbox" name="definition" value="<!--
317 TMPL_VAR NAME="id" -->" /> <!-- TMPL_VAR NAME="name" --></td></tr>
322 <fieldset class="action"><input type="hidden" name="phase" value="Choose these criteria" />
323 <input type="button" name="back" value="<< Back" onclick="javascript:history.back()" />
324 <input type="submit" name="submit" value="Next >>" /> </fieldset>
329 <!-- TMPL_IF NAME="build5" -->
330 <h3>Step 5 of 6: Pick which columns to total</h3>
331 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
332 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
333 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
334 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
335 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
336 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
338 <!-- TMPL_LOOP NAME="total_by" -->
339 <tr><td><input type="checkbox" name="total_by" id="<!-- TMPL_VAR
340 NAME="name" -->" value="<!-- TMPL_VAR
341 NAME="name" -->" /> <label for="<!-- TMPL_VAR
342 NAME="name" -->"><!-- TMPL_VAR NAME="name" --></label></td>
343 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
345 <!-- TMPL_LOOP NAME="select" -->
346 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
354 <fieldset class="action"><input type="hidden" name="phase" value="Choose These Operations" />
355 <input type="button" name="back" value="<< Back" onclick="javascript:history.back()" />
356 <input type="submit" name="submit" value="Next >>" /></fieldset>
361 <!-- TMPL_IF NAME="build6" -->
362 <h3>Step 6 of 6: Choose how you want the report ordered</h3>
363 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
364 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
365 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
366 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->" />
367 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->" />
368 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->" />
369 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->" />
370 <fieldset><table><!-- TMPL_LOOP NAME="order_by" -->
371 <tr><td><input type="checkbox" id="<!-- TMPL_VAR
372 NAME="name" -->" name="order_by" value="<!-- TMPL_VAR
373 NAME="name" -->" /> <label for="<!-- TMPL_VAR
374 NAME="name" -->"><!-- TMPL_VAR NAME="name"--></label></td><td>
375 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
377 <!-- TMPL_LOOP NAME="select" -->
378 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
386 <fieldset class="action">
387 <input type="hidden" name="phase" value="Build Report" />
388 <input type="submit" name="submit" value="Finish" /></fieldset>
393 <!-- TMPL_IF NAME="showreport" -->
394 <h1>Confirm Custom Report</h1>
395 <p>Your report will be generated with the following SQL statement.</p>
397 <!-- TMPL_VAR NAME="sql" ESCAPE="HTML" -->
400 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
401 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->" />
402 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
403 <p>You will need to save the report before you can execute it</p>
404 <fieldset class="action"><input type="hidden" name="phase" value="Save" />
405 <input type="submit" name="submit" value="Save" /> </fieldset>
409 <!-- TMPL_IF NAME="save" -->
410 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
411 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
412 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
413 <fieldset class="rows">
414 <legend>Save Your Custom Report</legend>
416 <li><label for="reportname">Report Name: </label><input type="text" id="reportname" name="reportname" /></li>
417 <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
419 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
420 <input type="submit" name="submit" value="Save Report" /></fieldset>
424 <!-- TMPL_IF name="enter_params" -->
425 <form action='/cgi-bin/koha/reports/guided_reports.pl'>
426 <input type='hidden' name='phase' value='Run this report' />
427 <input type='hidden' name='reports' value="<!--TMPL_VAR name='reports' -->" />
428 <h1>Enter parameters for report <!-- TMPL_VAR name="name" -->:</h1>
429 <!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
430 <!-- TMPL_LOOP name="sql_params" -->
431 <p><!-- TMPL_VAR name="entry" -->: <!-- TMPL_VAR name='input' --></p>
433 <input type='submit' value='Run the report'/>
437 <!-- TMPL_IF NAME="execute" -->
438 <h1><!-- TMPL_VAR NAME="name" --></h1>
439 <!-- TMPL_IF NAME="notes" --><p><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
440 <!-- TMPL_IF NAME="unlimited_total" --><p>Total number of rows matching the (unlimited) query is <!-- TMPL_VAR NAME="unlimited_total" -->.</p><!-- /TMPL_IF -->
441 <!-- TMPL_VAR name="sql" -->
442 <!-- TMPL_VAR NAME='pagination_bar' DEFAULT="" -->
443 <!-- TMPL_UNLESS name="errors" -->
445 <tr><!-- TMPL_LOOP NAME="header_row" --><th><!-- TMPL_VAR NAME="cell" --></th><!-- /TMPL_LOOP --></tr>
446 <!-- TMPL_LOOP NAME="results" -->
448 <!-- TMPL_LOOP NAME="cells" --><td><!-- TMPL_VAR NAME="cell" --></td><!-- /TMPL_LOOP -->
452 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
453 <fieldset class="action">
454 <label for="format">Download the report: </label>
455 <select name="format" id="format">
456 <option value="csv">Comma Separated Text</option>
457 <option value="tab">Tab Separated Text</option>
459 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" ESCAPE="html" -->" />
460 <input type="hidden" name="phase" value="Export" />
461 <input type="submit" name="submit" value="Download" /></fieldset>
463 <!-- /TMPL_UNLESS -->
466 <!-- TMPL_IF NAME="create" -->
467 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
468 <fieldset class="rows">
469 <legend>Create Report From SQL</legend>
471 <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>
472 <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2"><!-- TMPL_VAR NAME="notes" DEFAULT="" --></textarea></li>
473 <li><label for="types">Type:</label>
474 <select id="types" name="types">
475 <option value="1">Tabular</option>
476 <option value="2" disabled="disabled">Summary</option>
477 <option value="3" disabled="disabled">Matrix</option>
480 <li><label for="sql">SQL: </label><textarea id="sql" name="sql" cols="50" rows="10"><!-- TMPL_VAR NAME="sql" DEFAULT="" --></textarea></li>
484 <fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
485 <input type="submit" name="submit" value="Save Report" /></fieldset>
489 <!-- TMPL_IF NAME="compound" -->
490 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
491 Master: <select name="master">
492 <!-- TMPL_LOOP NAME="savedreports" -->
493 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
497 Sub report:<select name="subreport">
498 <!-- TMPL_LOOP NAME="savedreports" -->
499 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
503 <input type="hidden" name="phase" value="Save Compound" />
504 <input type="submit" name="submit" value="Save Compound" />
508 <!-- TMPL_IF NAME="save_compound" -->
509 <!-- TMPL_VAR NAME="master" --> <br />
510 <!-- TMPL_VAR NAME="subsql" -->
514 <!-- TMPL_IF NAME="retresults" -->
515 <h1>Saved Report Results</h1>
516 <h2><!-- TMPL_VAR NAME="name" --></h2>
517 <p><!-- TMPL_VAR NAME="notes" --></p>
519 <!-- TMPL_LOOP NAME="results" -->
520 <!-- TMPL_VAR NAME="row" -->
525 <!-- TMPL_IF NAME="showsql" -->
526 <textarea id="sql"><!-- TMPL_VAR NAME="sql" --></textarea>
529 <!-- TMPL_IF NAME="editsql" -->
530 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
531 <input type="hidden" name="phase" value="Update SQL" />
532 <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->"/>
533 <fieldset class="rows">
534 <legend>Edit SQL</legend>
536 <li><label for="reportname">Report Name:</label><input type="text" id="reportname" name="reportname" value="<!-- TMPL_VAR NAME="reportname" -->" /></li>
537 <li><label for="notes">Notes:</label><textarea id="notes" name="notes" cols="50" rows="2"><!-- TMPL_VAR NAME="notes" --></textarea></li>
538 <li><textarea id="sql" name="sql" rows="10" cols="60"><!-- TMPL_VAR NAME="sql" --></textarea></li>
542 <fieldset class="action">
543 <input type="submit" name="submit" value="Update SQL" /></fieldset>
549 <!-- TMPL_IF NAME="save_successful" -->
550 <!-- TMPL_UNLESS NAME="errors" -->
551 <h2>Your report has been saved</h2>
552 <p>The report you have created has now been saved. You can now</p>
554 <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved Reports Page</a></li>
555 <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
556 <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Guided Reports</a></li>
558 <!-- /TMPL_UNLESS -->
561 <!-- TMPL_IF NAME="errors" -->
562 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
563 <div class="dialog alert">
564 <b>The following error was encountered:</b><br />
565 <!-- TMPL_LOOP name="errors" -->
566 <!-- TMPL_IF NAME="sqlerr" -->This report contains the SQL keyword <b><!-- TMPL_VAR name="sqlerr" --></b>.
567 <br />Use of this keyword is not allowed in Koha reports due to security and data integrity risks. Only SELECT queries are allowed.
568 <br />Please return to the "Saved Reports" screen and delete this report or retry creating a new one.
569 <!-- TMPL_ELSIF NAME="queryerr" -->The database returned the following error: <br /><!-- TMPL_VAR NAME="queryerr" --><br />Please check the log for further details.
574 <fieldset class="action"><input type="hidden" name="phase" value="Use saved" />
575 <input type="submit" name="submit" value="Saved Reports" /></fieldset>
583 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
586 <script type="text/javascript">
588 function addColumn() {
589 $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
591 function delColumn() {
592 $("#selectedColumns option:selected").remove();
594 $("#column_submit").submit(function() {
595 if ($("#selectedColumns option").size() < 1) {
596 alert(_("No columns selected!"));
599 $("#selectedColumns option").attr("selected", "selected"); // Select everything still in #selectedColumns
604 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->