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="submit" name="phase" value="Report on this Area">
69 <!-- TMPL_IF NAME="build2" -->
70 <h1>Build A Report</h1>
71 <h3>Step 2 of 6: Pick a Report Type</h3>
72 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
73 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
75 <!-- TMPL_LOOP NAME="types" -->
76 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
80 <input type="submit" name="phase" value="Choose this type">
84 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
86 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
88 <img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />
91 <!-- TMPL_IF NAME="build3" -->
92 <h3>Step 3 of 6: Select Columns for Display</h3>
93 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
94 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
95 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
96 <select id="availableColumns" name="oldcolumns2" multiple size="25" style="width:200px;height:300px;">
97 <!-- TMPL_LOOP NAME="columns" -->
98 <!-- TMPL_IF NAME="table" -->
100 <!-- TMPL_IF NAME="__first__" -->
105 <optgroup label="<!-- TMPL_VAR NAME="table"-->">
107 <option value="<!-- TMPL_VAR NAME="name" -->">
108 <!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
110 <!-- TMPL_VAR NAME="name" -->
116 <input type="button" name="Add" value="Add" class="button" onClick="addColumn()"/>
117 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
118 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
120 <input type="submit" name="phase" value="Choose these columns">
124 <!-- TMPL_IF NAME="build4" -->
125 <h3>Step 4 of 6: Select Criteria to Limit on </h3>
127 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" >
128 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
129 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
130 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
132 <!-- TMPL_LOOP NAME="criteria" -->
133 <tr><td><input type=checkbox name="criteria_column" value="<!-- TMPL_VAR
134 NAME="name" -->"> <!-- TMPL_VAR NAME="description" -->
136 <!-- TMPL_IF NAME="date" -->
137 <input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value="" >
138 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
139 <script type="text/javascript">
141 inputField : "<!-- TMPL_VAR NAME="name" -->_value",
142 ifFormat : "%Y-%m-%d",
143 button : "buttonfrom1",
149 <td><select name="<!-- TMPL_VAR NAME="name" -->_value">
150 <!-- TMPL_LOOP NAME="values" -->
151 <option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
157 </td></tr></table><br />
158 <!-- TMPL_IF NAME="definitions" -->
159 Dictionary Definitions <br />
161 <!-- TMPL_LOOP NAME="definitions" -->
163 <tr><td><input type=checkbox name="definition" value="<!--
164 TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
169 <input type="submit" name="phase" value="Choose these criteria">
174 <!-- TMPL_IF NAME="build5" -->
175 <h3>Step 5 of 6: Pick which columns to total</h3>
176 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
177 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
178 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
179 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
180 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
181 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
183 <!-- TMPL_LOOP NAME="total_by" -->
184 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
185 NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
186 <select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
188 <!-- TMPL_LOOP NAME="select" -->
189 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
196 <input type="submit" name="phase" value="Choose Totals">
201 <!-- TMPL_IF NAME="build6" -->
202 <h3>Step 6 of 6: Select the ordering</h3>
203 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
204 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
205 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
206 <input type="hidden" name="column" value="<!-- TMPL_VAR NAME="column" -->">
207 <input type="hidden" name="criteria" value="<!-- TMPL_VAR NAME="criteriastring" -->">
208 <input type="hidden" name="definition" value="<!-- TMPL_VAR NAME="definition" -->">
209 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
210 <table><!-- TMPL_LOOP NAME="order_by" -->
211 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
212 NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
213 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
215 <!-- TMPL_LOOP NAME="select" -->
216 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
224 <input type="submit" name="phase" value="Build Report">
229 <!-- TMPL_IF NAME="showreport" -->
230 <!-- TMPL_VAR NAME="sql" -->
233 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
234 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
235 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
236 <input type="submit" name="phase" value="Save"> <input type="submit" name="phase" value="Execute">
240 <!-- TMPL_IF NAME="save" -->
241 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
242 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
243 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
244 Report Name: <input type="text" name="reportname"> <br />
245 Notes: <textarea name="notes"></textarea><br />
246 <input type="submit" name="phase" value="Save Report">
250 <!-- TMPL_IF NAME="execute" -->
251 <h1>Show results</h1>
253 <p>Report description</p>
255 <!-- TMPL_LOOP NAME="results" -->
256 <!-- TMPL_VAR NAME="row" -->
259 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
260 <select name="format">
261 <option value="csv">Comma Separated Text</option>
262 <option value="tab">Tab Separated Text</option>
264 <input type="submit" name="phase" value="Export">
265 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
269 <!-- TMPL_IF NAME="create" -->
270 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
271 Report Name: <input type="text" name="reportname"> <br />
273 <select name="types">
274 <!-- TMPL_LOOP NAME="types" -->
275 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
279 SQl: <textarea name="sql" cols=30 rows=10></textarea><br />
280 <input type="submit" name="phase" value="Save Report">
284 <!-- TMPL_IF NAME="compound" -->
285 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
286 Master: <select name="master">
287 <!-- TMPL_LOOP NAME="savedreports" -->
288 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
292 Sub report:<select name="subreport">
293 <!-- TMPL_LOOP NAME="savedreports" -->
294 <option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
298 <input type="submit" name="phase" value="Save Compound">
302 <!-- TMPL_IF NAME="save_compound" -->
303 <!-- TMPL_VAR NAME="master" --> <br />
304 <!-- TMPL_VAR NAME="subsql" -->
310 <!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
313 <script type="text/javascript">
314 function setObjects() {
315 selectedColumnsObj=document.getElementById('selectedColumns');
316 availableColumnsObj=document.getElementById('availableColumns');
320 function addColumn() {
321 for (i=0;i<availableColumnsObj.length;i++) {
322 if (availableColumnsObj.options[i].selected==true) {
323 var newColumnObj=document.createElement("OPTION");
324 newColumnObj.value=availableColumnsObj.options[i].value;
325 newColumnObj.text=availableColumnsObj.options[i].text;
326 selectedColumnsObj.appendChild(newColumnObj);
327 newColumnObj.selected=true;
332 function delColumn() {
333 for (i=0;i<=selectedColumnsObj.options.length;i++) {
334 if (selectedColumnsObj.options.selectedIndex>=0)
335 selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
339 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->