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 requiring a DBA to write the SQL code for you.</p>
27 <form action="/cgi-bin/koha/reports/guided_reports.pl">
28 <h3>Build and Run existing 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"/> -->
33 <h3>Define Custom Criteria</h3>
34 <p>Use the reports dictionary to define custom criteria to use in your
36 <input type="submit" name="phase" value="View Dictionary"/>
40 <!-- TMPL_IF NAME="saved1" -->
41 <h1>Load Saved Reports</h1>
42 Choose the report from the list
43 <form action="/cgi-bin/koha/reports/guided_reports.pl">
44 <select name="reports">
45 <!-- TMPL_LOOP NAME="savedreports" -->
46 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
49 <input type="submit" name="phase" value="Run this report">
54 <!-- TMPL_IF NAME="build1" -->
55 <h1>Build A Report</h1>
56 <h3>Step 1 of 6: Choose a Module to Report on</h3>
57 <form action="/cgi-bin/koha/reports/guided_reports.pl">
59 <!-- TMPL_LOOP NAME="areas" -->
60 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
64 <input type=button value="Back" onClick="history.go(-1)">
65 <input type="submit" name="phase" value="Report on this Area">
70 <!-- TMPL_IF NAME="build2" -->
71 <h1>Build A Report</h1>
72 <h3>Step 2 of 6: Pick a Report Type</h3>
73 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
74 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
76 <!-- TMPL_LOOP NAME="types" -->
77 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
81 <input type=button value="Back" onClick="history.go(-1)">
82 <input type="submit" name="phase" value="Choose this type">
86 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
88 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
90 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />
93 <!-- TMPL_IF NAME="build3" -->
94 <h3>Step 3 of 6: Select Columns for Display</h3>
95 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
96 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
97 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
98 <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
99 <!-- TMPL_LOOP NAME="columns" -->
100 <!-- TMPL_IF NAME="table" -->
102 <!-- TMPL_IF NAME="__first__" -->
107 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
109 <option value="<!-- TMPL_VAR NAME="name" -->">
110 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
112 <!-- TMPL_VAR NAME="name" -->
118 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
119 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
120 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
122 <input type=button value="Back" onClick="history.go(-1)">
123 <input type="submit" name="phase" value="Choose these columns">
127 <!-- TMPL_IF NAME="build4" -->
128 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
130 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
131 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
132 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
133 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
135 <!-- TMPL_LOOP NAME="criteria" -->
136 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
137 NAME="name" -->"> <!-- TMPL_VAR NAME="description" -->
139 <!-- TMPL_IF NAME="date" -->
140 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
141 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
142 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
143 <script type="text/javascript">
145 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
146 ifFormat : "%Y-%m-%d",
147 button : "buttonfrom1",
153 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
154 <!-- TMPL_LOOP NAME="values" -->
155 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
162 <!-- TMPL_IF NAME="definitions" -->
163 Dictionary Definitions <br />
165 <!-- TMPL_LOOP NAME="definitions" -->
167 <tr><td><input type=checkbox name="definition" value="<!--
168 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
173 <input type=button value="Back" onClick="history.go(-1)">
174 <input type="submit" name="phase" value="Choose these criteria">
179 <!-- TMPL_IF NAME="build5" -->
180 <h3>Step 5 of 6: Pick which columns to total</h3>
181 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
182 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
183 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
184 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
185 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
186 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
188 <!-- TMPL_LOOP NAME="total_by" -->
189 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
190 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
191 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
193 <!-- TMPL_LOOP NAME="select" -->
194 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
201 <input type=button value="Back" onClick="history.go(-1)">
202 <input type="submit" name="phase" value="Choose These Operations">
207 <!-- TMPL_IF NAME="build6" -->
208 <h3>Step 6 of 6: Select the ordering</h3>
209 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
210 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
211 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
212 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
213 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
214 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
215 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
216 <table><!-- TMPL_LOOP NAME="order_by" -->
217 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
218 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
219 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
221 <!-- TMPL_LOOP NAME="select" -->
222 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
230 <input type=button value="Back" onClick="history.go(-1)">
231 <input type="submit" name="phase" value="Build Report">
236 <!-- TMPL_IF NAME="showreport" -->
237 <!-- TMPL_VAR NAME="sql" -->
240 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
241 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
242 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
243 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
247 <!-- TMPL_IF NAME="save" -->
248 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
249 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
250 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
251 Report Name: <input type="text" name="reportname"> <br />
252 Notes: <textarea name="notes"></textarea><br />
253 <input type="submit" name="phase" value="Save Report">
257 <!-- TMPL_IF NAME="execute" -->
258 <h1>Show results</h1>
260 <p>Report description</p>
262 <!-- TMPL_LOOP NAME="results" -->
263 <!-- TMPL_VAR NAME="row" -->
266 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
267 <select name="format">
268 <option value="csv">Comma Separated Text</option>
269 <option value="tab">Tab Separated Text</option>
271 <input type="submit" name="phase" value="Export">
272 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
276 <!-- TMPL_IF NAME="create" -->
277 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
278 Report Name: <input type="text" name="reportname"> <br />
280 <select name="types">
281 <!-- TMPL_LOOP NAME="types" -->
282 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
286 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
287 <input type="submit" name="phase" value="Save Report">
291 <!-- TMPL_IF NAME="compound" -->
292 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
293 Master: <select name="master">
294 <!-- TMPL_LOOP NAME="savedreports" -->
295 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
299 Sub report:<select name="subreport">
300 <!-- TMPL_LOOP NAME="savedreports" -->
301 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
305 <input type="submit" name="phase" value="Save Compound">
309 <!-- TMPL_IF NAME="save_compound" -->
310 <!-- TMPL_VAR NAME="master" --> <br />
311 <!-- TMPL_VAR NAME="subsql" -->
317 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
320 <script type="text/javascript">
321 function setObjects() {
322 selectedColumnsObj=document.getElementById('selectedColumns');
323 availableColumnsObj=document.getElementById('availableColumns');
327 function addColumn() {
328 for (i=0;i<availableColumnsObj.length;i++) {
329 if (availableColumnsObj.options[i].selected==true) {
330 var newColumnObj=document.createElement("OPTION");
331 newColumnObj.value=availableColumnsObj.options[i].value;
332 newColumnObj.text=availableColumnsObj.options[i].text;
333 selectedColumnsObj.appendChild(newColumnObj);
334 newColumnObj.selected=true;
339 function delColumn() {
340 for (i=0;i<=selectedColumnsObj.options.length;i++) {
341 if (selectedColumnsObj.options.selectedIndex>=0)
342 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
346 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->