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="submit" name="phase" value="Choose these columns">
126 <!-- TMPL_IF NAME="build4" -->
127 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
129 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
130 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
131 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
132 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
134 <!-- TMPL_LOOP NAME="criteria" -->
135 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
136 NAME="name" -->"> <!-- TMPL_VAR NAME="description" -->
138 <!-- TMPL_IF NAME="date" -->
139 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
140 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
141 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
142 <script type="text/javascript">
144 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
145 ifFormat : "%Y-%m-%d",
146 button : "buttonfrom1",
152 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
153 <!-- TMPL_LOOP NAME="values" -->
154 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
161 <!-- TMPL_IF NAME="definitions" -->
162 Dictionary Definitions <br />
164 <!-- TMPL_LOOP NAME="definitions" -->
166 <tr><td><input type=checkbox name="definition" value="<!--
167 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
172 <input type="submit" name="phase" value="Choose these criteria">
177 <!-- TMPL_IF NAME="build5" -->
178 <h3>Step 5 of 6: Pick which columns to total</h3>
179 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
180 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
181 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
182 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
183 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
184 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
186 <!-- TMPL_LOOP NAME="total_by" -->
187 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
188 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
189 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
191 <!-- TMPL_LOOP NAME="select" -->
192 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
199 <input type="submit" name="phase" value="Choose Totals">
204 <!-- TMPL_IF NAME="build6" -->
205 <h3>Step 6 of 6: Select the ordering</h3>
206 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
207 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
208 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
209 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
210 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
211 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
212 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
213 <table><!-- TMPL_LOOP NAME="order_by" -->
214 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
215 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
216 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
218 <!-- TMPL_LOOP NAME="select" -->
219 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
227 <input type="submit" name="phase" value="Build Report">
232 <!-- TMPL_IF NAME="showreport" -->
233 <!-- TMPL_VAR NAME="sql" -->
236 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
237 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
238 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
239 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
243 <!-- TMPL_IF NAME="save" -->
244 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
245 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
246 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
247 Report Name: <input type="text" name="reportname"> <br />
248 Notes: <textarea name="notes"></textarea><br />
249 <input type="submit" name="phase" value="Save Report">
253 <!-- TMPL_IF NAME="execute" -->
254 <h1>Show results</h1>
256 <p>Report description</p>
258 <!-- TMPL_LOOP NAME="results" -->
259 <!-- TMPL_VAR NAME="row" -->
262 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
263 <select name="format">
264 <option value="csv">Comma Separated Text</option>
265 <option value="tab">Tab Separated Text</option>
267 <input type="submit" name="phase" value="Export">
268 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
272 <!-- TMPL_IF NAME="create" -->
273 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
274 Report Name: <input type="text" name="reportname"> <br />
276 <select name="types">
277 <!-- TMPL_LOOP NAME="types" -->
278 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
282 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
283 <input type="submit" name="phase" value="Save Report">
287 <!-- TMPL_IF NAME="compound" -->
288 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
289 Master: <select name="master">
290 <!-- TMPL_LOOP NAME="savedreports" -->
291 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
295 Sub report:<select name="subreport">
296 <!-- TMPL_LOOP NAME="savedreports" -->
297 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
301 <input type="submit" name="phase" value="Save Compound">
305 <!-- TMPL_IF NAME="save_compound" -->
306 <!-- TMPL_VAR NAME="master" --> <br />
307 <!-- TMPL_VAR NAME="subsql" -->
313 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
316 <script type="text/javascript">
317 function setObjects() {
318 selectedColumnsObj=document.getElementById('selectedColumns');
319 availableColumnsObj=document.getElementById('availableColumns');
323 function addColumn() {
324 for (i=0;i<availableColumnsObj.length;i++) {
325 if (availableColumnsObj.options[i].selected==true) {
326 var newColumnObj=document.createElement("OPTION");
327 newColumnObj.value=availableColumnsObj.options[i].value;
328 newColumnObj.text=availableColumnsObj.options[i].text;
329 selectedColumnsObj.appendChild(newColumnObj);
330 newColumnObj.selected=true;
335 function delColumn() {
336 for (i=0;i<=selectedColumnsObj.options.length;i++) {
337 if (selectedColumnsObj.options.selectedIndex>=0)
338 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
342 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->