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>
45 <form action="/cgi-bin/koha/reports/guided_reports.pl">
46 <select name="reports">
47 <!-- TMPL_LOOP NAME="savedreports" -->
48 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
51 <input type="submit" name="phase" value="Run this report">
56 <!-- TMPL_IF NAME="build1" -->
57 <h1>Build A Report</h1>
58 <h3>Step 1 of 6: Choose a Module to Report on</h3>
59 <form action="/cgi-bin/koha/reports/guided_reports.pl">
61 <!-- TMPL_LOOP NAME="areas" -->
62 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
66 <input type=button value="Back" onClick="history.go(-1)">
67 <input type="submit" name="phase" value="Report on this Area">
72 <!-- TMPL_IF NAME="build2" -->
73 <h1>Build A Report</h1>
74 <h3>Step 2 of 6: Pick a Report Type</h3>
75 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
76 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
78 <!-- TMPL_LOOP NAME="types" -->
79 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
83 <input type=button value="Back" onClick="history.go(-1)">
84 <input type="submit" name="phase" value="Choose this type">
88 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
89 <!--- Summary and Matrix reports have not yet been implemented-->
91 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
93 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />-->
97 <!-- TMPL_IF NAME="build3" -->
98 <h3>Step 3 of 6: Select Columns for Display</h3>
99 <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>
100 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
101 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
102 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
103 <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
104 <!-- TMPL_LOOP NAME="columns" -->
105 <!-- TMPL_IF NAME="table" -->
107 <!-- TMPL_IF NAME="__first__" -->
112 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
114 <option value="<!-- TMPL_VAR NAME="name" -->">
115 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
117 <!-- TMPL_VAR NAME="name" -->
123 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
124 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
125 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
127 <input type=button value="Back" onClick="history.go(-1)">
128 <input type="submit" name="phase" value="Choose these columns">
132 <!-- TMPL_IF NAME="build4" -->
133 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
135 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
136 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
137 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
138 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
140 <!-- TMPL_LOOP NAME="criteria" -->
141 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
142 NAME="name" -->"> <!-- TMPL_VAR NAME="description" -->
144 <!-- TMPL_IF NAME="date" -->
145 <td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
146 -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value=""
147 ><img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
148 <script type="text/javascript">
150 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
151 ifFormat : "%Y-%m-%d",
152 button : "buttonfrom1",
158 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
159 <!-- TMPL_LOOP NAME="values" -->
160 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
167 <!-- TMPL_IF NAME="definitions" -->
168 <h4>Dictionary Definitions</h4> <br />
170 <!-- TMPL_LOOP NAME="definitions" -->
172 <tr><td><input type=checkbox name="definition" value="<!--
173 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
178 <input type=button value="Back" onClick="history.go(-1)">
179 <input type="submit" name="phase" value="Choose these criteria">
184 <!-- TMPL_IF NAME="build5" -->
185 <h3>Step 5 of 6: Pick which columns to total</h3>
186 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
187 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
188 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
189 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
190 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
191 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
193 <!-- TMPL_LOOP NAME="total_by" -->
194 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
195 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
196 <td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
198 <!-- TMPL_LOOP NAME="select" -->
199 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
206 <input type=button value="Back" onClick="history.go(-1)">
207 <input type="submit" name="phase" value="Choose These Operations">
212 <!-- TMPL_IF NAME="build6" -->
213 <h3>Step 6 of 6: Select how you want the report ordered</h3>
214 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
215 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
216 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
217 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
218 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
219 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
220 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
221 <table><!-- TMPL_LOOP NAME="order_by" -->
222 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
223 NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
224 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
226 <!-- TMPL_LOOP NAME="select" -->
227 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
235 <input type=button value="Back" onClick="history.go(-1)">
236 <input type="submit" name="phase" value="Build Report">
241 <!-- TMPL_IF NAME="showreport" -->
242 <!-- TMPL_VAR NAME="sql" -->
245 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
246 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
247 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
248 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
252 <!-- TMPL_IF NAME="save" -->
253 <h1>Save Your Custom Report</h1>
254 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
255 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
256 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
257 Report Name: <input type="text" name="reportname"> <br />
258 Notes: <textarea name="notes"></textarea><br />
259 <input type="submit" name="phase" value="Save Report">
263 <!-- TMPL_IF NAME="execute" -->
264 <h1>Show results</h1>
266 <p>Report description</p>
268 <!-- TMPL_LOOP NAME="results" -->
269 <!-- TMPL_VAR NAME="row" -->
271 <p>Download the report</p>
273 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
274 <select name="format">
275 <option value="csv">Comma Separated Text</option>
276 <option value="tab">Tab Separated Text</option>
278 <input type="submit" name="phase" value="Export">
279 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
283 <!-- TMPL_IF NAME="create" -->
284 <h1>Create Report From SQL</h1>
285 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
286 Report Name: <input type="text" name="reportname"> <br />
288 <select name="types">
289 <!-- TMPL_LOOP NAME="types" -->
290 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
294 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
295 <input type="submit" name="phase" value="Save Report">
299 <!-- TMPL_IF NAME="compound" -->
300 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
301 Master: <select name="master">
302 <!-- TMPL_LOOP NAME="savedreports" -->
303 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
307 Sub report:<select name="subreport">
308 <!-- TMPL_LOOP NAME="savedreports" -->
309 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
313 <input type="submit" name="phase" value="Save Compound">
317 <!-- TMPL_IF NAME="save_compound" -->
318 <!-- TMPL_VAR NAME="master" --> <br />
319 <!-- TMPL_VAR NAME="subsql" -->
325 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
328 <script type="text/javascript">
329 function setObjects() {
330 selectedColumnsObj=document.getElementById('selectedColumns');
331 availableColumnsObj=document.getElementById('availableColumns');
335 function addColumn() {
336 for (i=0;i<availableColumnsObj.length;i++) {
337 if (availableColumnsObj.options[i].selected==true) {
338 var newColumnObj=document.createElement("OPTION");
339 newColumnObj.value=availableColumnsObj.options[i].value;
340 newColumnObj.text=availableColumnsObj.options[i].text;
341 selectedColumnsObj.appendChild(newColumnObj);
342 newColumnObj.selected=true;
347 function delColumn() {
348 for (i=0;i<=selectedColumnsObj.options.length;i++) {
349 if (selectedColumnsObj.options.selectedIndex>=0)
350 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
354 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->