.. include:: images.rst
+.. _reports-label:
+
Reports
=======
Step 1: Choose the module you want to report on. This will determine
what tables and fields are available for you to query.
-'Report is public' should be left to the default of 'No' in most cases
+'Report is public' should be left to the default of 'No' in most cases
especially if the report contains patron or other sensitive information.
-A public report can be accessed using the :ref:`JSON reports services
-<json-reports-services-label>` by anyone and without authentication.
+A public report can be accessed using the
+:ref:`JSON reports services <json-reports-services-label>` by anyone and without authentication.
|image881|
When you are finished you will be presented with the SQL generated by
the report wizard. From here you can choose to save the report by
-clicking 'Save' or copy the SQL and make edits to it by hand.
+clicking 'Finish' or copy the SQL and make edits to it by hand.
|image887|
subgroups are set in the `REPORT\_SUBGROUP <#reportsubgroup>`__
authorized value category or can be added on the fly when creating
the report by choosing the 'or create' radio button. Report subgroups
- are set up with unique values in 'Authorised value', and 'Description'.
- The 'Description (OPAC)'' field needs to contain the authorised value for
+ are set up with unique values in 'Authorised value', and 'Description'.
+ The 'Description (OPAC)'' field needs to contain the authorised value for
the report group that the subgroup falls under.
|image892|
you code should be fewer than 10 characters and should not
include special characters or spaces.
-- 'Report is public' should be left to the default of 'No' in most cases
+- 'Report is public' should be left to the default of 'No' in most cases
especially if the report contains patron or other sensitive information.
- A public report can be accessed using the :ref:`JSON reports services
- <json-reports-services-label>` by anyone and without authentication.
+ A public report can be accessed using the
+ :ref:`JSON reports services <json-reports-services-label>` by anyone and without authentication.
- 'Notes' will also appear on the saved reports page, this can be used
to provide more details about the report or tips on how to enter
**Runtime parameters**
-
If you feel that your report might be too resource intensive you
might want to consider using runtime parameters to your query.
Runtime parameters basically make a filter appear before the report
to enter.
- The authorized\_value can be omitted if not applicable. If it
- contains an authorized value category, 'branches', 'itemtype',
+ contains an authorized value category, 'branches', 'itemtype',
'categorycode', 'biblio\_framework', a list with the Koha authorized
values will be displayed instead of a free field.
You have to put "%" in a text box to 'leave it blank'. Otherwise,
it literally looks for "" (empty string) as the value for the
field.
- For example entering nothing for: "title=<<Enter title>>" will
+ For example entering nothing for: "title=<<Enter title>>" will
display results with title='' (no title).
- If you want to have to have something not mandatory, use
- "title like <<Enter title>>" and enter a % at run time instead
+ If you want to have to have something not mandatory, use
+ "title like <<Enter title>>" and enter a % at run time instead
of nothing.
**Note**
| Parameter | What the user sees | What gets inserted in query |
+-------------------------+---------------------------------------------------+------------------------------+
| date | date picker | validly formatted date |
-| branches | drop down of branch names | branch code |
+| branches | drop down of branch names | branch code |
| itemtypes | drop down of item type names | item type |
-| categorycode | drop down of patron category descriptions | borrower category code |
+| categorycode | drop down of patron category descriptions | borrower category code |
| biblio\_framework | drop down of MARC bibliographic frameworks | framework code |
| (auth-value-category) | drop down of auth-value descriptions in category | authorized value |
| (nothing) | text box | entered text |
- SELECT title, author FROM biblio WHERE frameworkcode=<<Enter the
frameworkcode\|biblio\_framework>>
+.. ****************************************
+.. ************** TODO **************
+.. ****************************************
+
+.. **Querying MARC**
+
+.. It is possible to query the MARC records with the ExtractValue function.
+
+.. **Links**
+
+.. **Runtime variables**
+
+.. **See more results**
+
+.. There is a limit of 10,000 records put on SQL statements entered in
+ Koha. To get around this you want to add 'LIMIT 100000' to the end
+ of your SQL statement (or any other number above 10,000).
+
+.. _mana-SQL-report-label:
+
+SQL report from Mana
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the "Create report from SQL", you can search Mana KB for pre-made reports
+by clicking on "New report" and choosing "New SQL from Mana".
+
+|image1428|
+
+ **Note**
+
+ This option will only appear if you've :ref:`configured Mana KB <share-with-mana-kb-label>` in the administration module.
+
+You will be prompted to enter keywords to search the knowledge base.
+
+|image1429|
+
+In the search results, you will see
+
+- the details of the report (name, notes and type)
+
+- how many people have used this entry (# of users)
+
+- when it was used for the last time (last import)
+
+- additional comments made by other Koha users (comments)
+
+|image1430|
+
+.. What does the orange mean??
+
+Click on "Import" to import a copy of the report in your own saved reports.
+
+You can then edit it, duplicate it, delete it, run it as you would any of
+your own reports.
+
.. _duplicate-report-label:
Duplicate report
- For a single day, an example would be: 11/15/2009 to 11/16/2009
to find what circulated on the 15th
-.. _tracking-in-house-use-label:
+.. _tracking-in-house-use-reports-label:
Tracking in house use
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^