Creating custom reports

New reports can be created in Admin > System Setup > Reports. A ResourceSpace report is simply an SQL query - those with knowledge of SQL should be able to write new reports given an understanding of the ResourceSpace database. You can view and edit existing reports within the system from the same location.

Example: Create report for pending submissions

The following line of SQL would create a report that showed all the resources pending submission.

select * from resource where archive=-2;

Note: Allowing date range selection

The following lines of SQL would allow a report to recieve a date range input from the front end.

# --- date ranges
# Make sure date is greater than FROM date
where 
(
d.year>[from-y]
or 
(d.year=[from-y] and d.month>[from-m])
or
(d.year=[from-y] and d.month=[from-m] and d.day>=[from-d])
)
# Make sure date is less than TO date
and
(
d.year<[to-y]
or 
(d.year=[to-y] and d.month<[to-m])
or
(d.year=[to-y] and d.month=[to-m] and d.day<=[to-d])
)