1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha -- Guided 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>
12 › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> › <strong>Guided Reports Wizard </strong></div>
14 <div id="doc3" class="yui-t2">
22 <!-- TMPL_IF NAME="start" -->
23 <h2>Guided Reports</h2>
24 <p>Use the guided reports engine to create non standard reports.
25 This feature aims to provide some middle ground between the built in
26 canned reports and writing custom SQL reports.</p>
27 <form action="/cgi-bin/koha/reports/guided_reports.pl">
28 <h3>Build And Run Reports</h3>
29 <input type="submit" name="phase" value="Build new"/>
30 <input type="submit" name="phase" value="Used saved"/>
31 <input type="submit" name="phase" value="Create report from SQL"/>
32 <!-- <input type="submit" name="phase" value="Create Compound Report"/> -->
34 <h3>Reports Dictionary</h3>
35 <p>Use the reports dictionary to define custom criteria to use in your
37 <form action="/cgi-bin/koha/reports/dictionary.pl">
38 <input type="submit" name="phase" value="View Dictionary"/>
42 <!-- TMPL_IF NAME="saved1" -->
43 <h1>Load Saved Reports</h1>
44 <p>Choose the report to run from the list</p>
46 <form action="/cgi-bin/koha/reports/guided_reports.pl">
47 <th>Report Name</th><th>Type</th><th>Notes</th><th>Saved Results</th><th>Saved SQL</th><th>Delete</th>
48 <!-- TMPL_LOOP NAME="savedreports" -->
49 <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>
50 <td><!-- TMPL_VAR NAME="type" --></td>
51 <td><!-- TMPL_VAR NAME="notes" --></td>
52 <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 -->
54 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a></td>
55 <td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Delete%20Saved">Delete</a></td></tr>
62 <!-- TMPL_IF NAME="build1" -->
63 <h1>Build A Report</h1>
64 <h3>Step 1 of 6: Choose a Module to Report on</h3>
65 <form action="/cgi-bin/koha/reports/guided_reports.pl">
67 <!-- TMPL_LOOP NAME="areas" -->
68 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
72 <input type=button value="Back" onClick="history.go(-1)">
73 <input type="submit" name="phase" value="Report on this Area">
78 <!-- TMPL_IF NAME="build2" -->
79 <h1>Build A Report</h1>
80 <h3>Step 2 of 6: Pick a Report Type</h3>
81 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
82 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
84 <!-- TMPL_LOOP NAME="types" -->
85 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
89 <input type=button value="Back" onClick="history.go(-1)">
90 <input type="submit" name="phase" value="Choose this type">
94 <img src="/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
95 <!--- Summary and Matrix reports have not yet been implemented-->
97 <img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
99 <img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />-->
103 <!-- TMPL_IF NAME="build3" -->
104 <h3>Step 3 of 6: Select Columns for Display</h3>
105 <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>
106 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
107 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
108 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
109 <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
110 <!-- TMPL_LOOP NAME="columns" -->
111 <!-- TMPL_IF NAME="table" -->
113 <!-- TMPL_IF NAME="__first__" -->
118 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
120 <option value="<!-- TMPL_VAR NAME="name" -->">
121 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
123 <!-- TMPL_VAR NAME="name" -->
129 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
130 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
131 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
133 <input type=button value="Back" onClick="history.go(-1)">
134 <input type="submit" name="phase" value="Choose these columns">
138 <!-- TMPL_IF NAME="build4" -->
139 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
141 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
142 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
143 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
144 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
146 <!-- TMPL_LOOP NAME="criteria" -->
147 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
148 NAME="name" -->"> <!-- TMPL_VAR NAME="description" -->
150 <!-- TMPL_IF NAME="date" -->
151 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
152 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
153 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
154 <script type="text/javascript">
156 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
157 ifFormat : "%Y-%m-%d",
158 button : "buttonfrom1",
164 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
165 <!-- TMPL_LOOP NAME="values" -->
166 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
173 <!-- TMPL_IF NAME="definitions" -->
174 <h4>Dictionary Definitions</h4> <br />
176 <!-- TMPL_LOOP NAME="definitions" -->
178 <tr><td><input type=checkbox name="definition" value="<!--
179 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
184 <input type=button value="Back" onClick="history.go(-1)">
185 <input type="submit" name="phase" value="Choose these criteria">
190 <!-- TMPL_IF NAME="build5" -->
191 <h3>Step 5 of 6: Pick which columns to total</h3>
192 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
193 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
194 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
195 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
196 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
197 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
199 <!-- TMPL_LOOP NAME="total_by" -->
200 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
201 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
202 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
204 <!-- TMPL_LOOP NAME="select" -->
205 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
212 <input type=button value="Back" onClick="history.go(-1)">
213 <input type="submit" name="phase" value="Choose These Operations">
218 <!-- TMPL_IF NAME="build6" -->
219 <h3>Step 6 of 6: Select how you want the report ordered</h3>
220 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
221 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
222 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
223 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
224 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
225 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
226 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
227 <table><!-- TMPL_LOOP NAME="order_by" -->
228 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
229 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
230 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
232 <!-- TMPL_LOOP NAME="select" -->
233 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
241 <input type=button value="Back" onClick="history.go(-1)">
242 <input type="submit" name="phase" value="Build Report">
247 <!-- TMPL_IF NAME="showreport" -->
248 <!-- TMPL_VAR NAME="sql" -->
251 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
252 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
253 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
254 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
258 <!-- TMPL_IF NAME="save" -->
259 <h1>Save Your Custom Report</h1>
260 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
261 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
262 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
263 Report Name: <input type="text" name="reportname"> <br />
264 Notes: <textarea name="notes"></textarea><br />
265 <input type="submit" name="phase" value="Save Report">
269 <!-- TMPL_IF NAME="execute" -->
270 <h1>Show results</h1>
271 <h2><!-- TMPL_VAR NAME="name" --></h2>
272 <p><!-- TMPL_VAR NAME="notes" --></p>
274 <!-- TMPL_LOOP NAME="results" -->
275 <!-- TMPL_VAR NAME="row" -->
277 <p>Download the report</p>
279 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
280 <select name="format">
281 <option value="csv">Comma Separated Text</option>
282 <option value="tab">Tab Separated Text</option>
284 <input type="submit" name="phase" value="Export">
285 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
289 <!-- TMPL_IF NAME="create" -->
290 <h1>Create Report From SQL</h1>
291 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
292 Report Name: <input type="text" name="reportname"> <br />
294 <select name="types">
295 <!-- TMPL_LOOP NAME="types" -->
296 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
300 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
301 <input type="submit" name="phase" value="Save Report">
305 <!-- TMPL_IF NAME="compound" -->
306 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
307 Master: <select name="master">
308 <!-- TMPL_LOOP NAME="savedreports" -->
309 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
313 Sub report:<select name="subreport">
314 <!-- TMPL_LOOP NAME="savedreports" -->
315 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
319 <input type="submit" name="phase" value="Save Compound">
323 <!-- TMPL_IF NAME="save_compound" -->
324 <!-- TMPL_VAR NAME="master" --> <br />
325 <!-- TMPL_VAR NAME="subsql" -->
329 <!-- TMPL_IF NAME="retresults" -->
331 <!-- TMPL_LOOP NAME="results" -->
332 <!-- TMPL_VAR NAME = "row" -->
337 <!-- TMPL_IF NAME="showsql" -->
338 <!-- TMPL_VAR NAME="sql" -->
345 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
348 <script type="text/javascript">
349 function setObjects() {
350 selectedColumnsObj=document.getElementById('selectedColumns');
351 availableColumnsObj=document.getElementById('availableColumns');
355 function addColumn() {
356 for (i=0;i<availableColumnsObj.length;i++) {
357 if (availableColumnsObj.options[i].selected==true) {
358 var newColumnObj=document.createElement("OPTION");
359 newColumnObj.value=availableColumnsObj.options[i].value;
360 newColumnObj.text=availableColumnsObj.options[i].text;
361 selectedColumnsObj.appendChild(newColumnObj);
362 newColumnObj.selected=true;
367 function delColumn() {
368 for (i=0;i<=selectedColumnsObj.options.length;i++) {
369 if (selectedColumnsObj.options.selectedIndex>=0)
370 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
374 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->