Personal tools
You are here: Home Documentation How-tos Create links in your custom report results
Document Actions

Create links in your custom report results

This How-to applies to: Any version.

Have important fields linked on the report results.

Purpose

I don't know if you are like me, but often I find it useful to get some links in the results of my miscellaneous SQL report.  This can be achieved using the SQL's CONCAT keyword.

Example

The following SQL report list all items in your catalog and the title is link to the biblio.

SELECT itemtypes.description, CONCAT( '<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblio.biblionumber, '\">',biblio.title,'</a>' ), items.itemcallnumber FROM biblio LEFT JOIN biblioitems on biblioitems.biblionumber = biblio.biblionumber LEFT JOIN itemtypes on biblioitems.itemtype = itemtypes.itemtype LEFT JOIN items on biblioitems.biblioitemnumber = items.biblioitemnumber

 

see also:

Is there a repository for reports?
Custom Reports
If the report you need is not already available, the 'Guided Reports' Wizard will walk anyone through creating a custom report.
Add Custom Report
If the report you need is not already available, the 'Guided Reports' Wizard will walk anyone through creating a custom report.