Merge remote-tracking branch 'origin/new/bug_7408'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / help / reports / guided_reports.tt
1 [% INCLUDE 'help-top.inc' %]
2
3 <h1>Add a Custom Report</h1>
4
5 <p>If the report you need is not already available, the 'Guided Reports' Wizard will walk you through creating a custom report.</p>
6
7 <ul>
8 <li>Go to the 'Reports' module (usually under 'More' in your Global Nav)</li>
9 <li>Choose 'Guided Reports' under 'Guided Reports Wizard'</li>
10 </ul>
11
12 <p>Answer the 6 questions presented in order to create your report.</p>
13
14 <p><strong>Step 1: Choose a Module to Report on</strong></p>
15
16 <ul>
17 <li>Choose a Koha module to build a report on (patrons, circ, cataloging, etc)</li>
18 <li>Click 'Next'</li>
19 </ul>
20
21 <p><strong>Step 2: Pick a Report Type</strong></p>
22
23 <ul><li style="color: #990000">IMPORTANT: Only Tabular should be chosen with this option</li></ul>
24
25 <p><strong>Step 3: Select Columns for Display</strong></p>
26
27 <p><strong>Step 4: Select Criteria to Limit</strong></p>
28
29 <ul><li>This is optional, if you don't want to limit results by any one field, just leave this section blank.</li></ul>
30
31 <p><strong>Step 5: Pick which columns to perform mathmatical functions on</strong></p>
32
33 <ul><li>This is optional, if you don't want to do any math on the results, just leave this section blank.</li></ul>
34
35 <p><strong>Step 6: Choose how you want the report ordered</strong></p>
36
37 <ul><li>This is optional, if you want the results to come out as they are in the table, just leave this section blank.</li></ul>
38
39 <h1>Edit Reports</h1>
40
41 <p>Custom reports can be edited in their entirety from the Saved Guided Reports page.</p>
42
43 <ul><li><em>Get there:</em> More > Reports > Guided Reports > Use Saved</li></ul>
44
45 <ul>
46 <li>To edit a report click 'Edit SQL' beside the report</li>
47 <li>A page with editable fields will open so that you can change the title, notes and SQL related to the report</li>
48 </ul>
49
50 <h1>Questions</h1>
51
52 <p><strong>Is there a repository for reports?</strong></p>
53
54 <p>There is a page on the Koha Wiki: <a href="http://wiki.koha-community.org/wiki/SQL_Reports_Library" target="_new">http://wiki.koha-community.org/wiki/SQL_Reports_Library</a> with reports written by Koha libraries around the world.</p>
55
56 <p>NEKLS also has a great page (<a href="http://www.nexpresslibrary.org/training/reports-training/" target="_new">http://www.nexpresslibrary.org/training/reports-training/</a>) with a list of reports they have written.</p>
57
58 <p><strong>Can I have run-time defined parameters?</strong></p>
59
60 <p>Yes, you can: there is a specific syntax that Koha will understand as 'ask for values when running the report'. The syntax is &lt;&lt;Question to ask|authorised_value&gt;&gt;.</p>
61
62 <ul>
63 <li>The &lt;&lt; and &gt;&gt; are just delimiters. You must put &lt;&lt; at the beginning and &gt;&gt; at the end of your parameter</li>
64 <li>The <strong>Question to ask</strong> will be displayed on the left of the string to enter. 
65 <li>The <strong>authorised_value</strong> can be omitted if not applicable. If it contains an authorised value category, or <strong>branches</strong> or <strong>itemtype</strong> or <strong>categorycode</strong>, a list with the Koha authorised values will be displayed instead of a free field.  If the authorised value is <strong>date</strong>, a date selector button will be added after the input field</li>
66 </ul>
67
68 <p>Note that you can have more than one parameter in a given SQL</p>
69
70 <p>Note that entering nothing at run time won't probably work as you expect. It will be considered as "value empty" not as "ignore this parameter". For example entering nothing for : "title=&lt;&lt;Enter title&gt;&gt;" will display results with title='' (no title). If you want to have to have something not mandatory, use "title like &lt;&lt;Enter title&gt;&gt;" and enter a % at run time instead of nothing</p>
71
72 <p>Sample :</p>
73
74 <ul><li>SELECT surname,firstname FROM borrowers WHERE branchcode=&lt;&lt;Enter patrons library|branches&gt;&gt; AND surname like &lt;&lt;Enter filter for patron surname (% if none)&gt;&gt;</li></ul>
75
76 <p><strong>See the full documentation for Custom Reports in the <a href="http://manual.koha-community.org/3.6/en/reports.html#customreports">manual</a> (online).</strong></p>
77
78 [% INCLUDE 'help-bottom.inc' %]