Index: trunk/grails-app/controllers/ReportController.groovy
===================================================================
--- trunk/grails-app/controllers/ReportController.groovy	(revision 741)
+++ trunk/grails-app/controllers/ReportController.groovy	(revision 743)
@@ -285,14 +285,32 @@
 
         flash.errorMessage = g.message(code: result.error.code, args: result.error.args)
-        redirect(action: 'equipmentRegisterOhsGsp')
-
-//         render {
-//             p("DataList:")
-//             result.dataList?.each {
-//                 p("$it")
-//             }
-//         }
+        redirect(action: 'regulatoryRequirementsGsp')
 
     } // regulatoryRequirements
 
+    def mandatoryRequirementsGsp = {
+        render(view: 'mandatoryRequirements')
+    }
+
+    def mandatoryRequirements = {
+
+        def result = assetReportService.getMandatoryRequirements(params, RCU.getLocale(request))
+
+        params.reportTitle = "Asset Mandatory Requirements"
+        params.logoUrl = grailsApplication.mainContext.getResource('images/logo.png').getURL()
+        params.currentUser = authService.currentUser
+        params.startDateString = result.startDateString
+        params.endDateString = result.endDateString
+
+        if(!result.error) {
+            // Jasper plugin controller expects data to be a Collection.
+            chain(controller:'jasper', action:'index', model:[data: [result]], params:params)
+            return
+        }
+
+        flash.errorMessage = g.message(code: result.error.code, args: result.error.args)
+        redirect(action: 'mandatoryRequirementsGsp')
+
+    } // mandatoryRequirements
+
 } // end of class.
Index: trunk/grails-app/services/AssetReportService.groovy
===================================================================
--- trunk/grails-app/services/AssetReportService.groovy	(revision 741)
+++ trunk/grails-app/services/AssetReportService.groovy	(revision 743)
@@ -300,5 +300,4 @@
     } // getEquipmentRegister
 
-
     /**
     * Selects and returns assets regulatory requirements as specified in recurring regulatory tasks.
@@ -330,5 +329,5 @@
 
         result.summary = "This report only selects primary assets and not associated assets. \n"
-        result.summary += "Tasks must have a recurrence enabled and regulatory requirement set."
+        result.summary += "Tasks must have recurrence enabled and regulatory requirement set."
 
         // Subquery to count subTasks..
@@ -388,3 +387,90 @@
     } // getRegulatoryRequirements
 
+    /**
+    * Selects and returns assets mandatory requirements as specified in recurring mandatory tasks.
+    * @param params The request params, may contain params to specify the search.
+    * @param locale The locale to use when generating result.message.
+    */
+    def getMandatoryRequirements(params, locale) {
+        def result = [:]
+
+        def fail = { Map m ->
+            result.error = [ code: m.code, args: [] ]
+            return result
+        }
+
+        result.section = Section.get(params.section.id.toLong())
+        result.site = result.section.site
+
+        result.startDate = params.startDate ?: dateUtilService.oneWeekAgo
+        result.endDate = params.endDate ?: dateUtilService.today
+        // Auto swap date range.
+        if(result.startDate > result.endDate) {
+            def tempStartDate = result.startDate
+            result.startDate = result.endDate
+            result.endDate = tempStartDate
+        }
+
+        result.startDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: result.startDate)
+        result.endDateString = g.formatDate(format: "EEE, dd-MMM-yyyy", date: result.endDate)
+
+        result.summary = "This report only selects primary assets and not associated assets. \n"
+        result.summary += "Tasks must have recurrence enabled and mandatory requirement set."
+
+        // Subquery to count subTasks..
+        def subTaskQ = new HqlBuilder().query {
+            select 'count(subTask)'
+            from 'task.subTasks as subTask'
+            where 'subTask.trash = false'
+                and 'subTask.targetStartDate < :endDate'
+                and 'subTask.targetCompletionDate >= :startDate'
+        }
+        def subTaskTotalQ = subTaskQ.query
+
+        subTaskQ.and 'subTask.taskStatus.id = 3' // Complete.
+        def subTaskCompletedQ = subTaskQ.query
+
+        def mandatoryTaskQ = new HqlBuilder().query {
+            select 'new map(primaryAsset.name as assetName',
+                        'primaryAsset.description as assetDescription',
+                        'primaryAsset.isActive as assetIsActive',
+                        'task.id as taskId',
+                        'task.description as taskDescription',
+                        "($subTaskTotalQ) as subTaskTotalCount",
+                        "($subTaskCompletedQ) as subTaskCompletedCount)"
+                        namedParams.startDate = result.startDate
+                        namedParams.endDate = result.endDate
+            from 'Task task',
+                    'left join task.primaryAsset as primaryAsset',
+                    'left join task.taskRecurringSchedule as taskRecurringSchedule'
+            where 'task.mandatoryRequirement = true'
+                and 'taskRecurringSchedule.enabled = true'
+                and 'task.trash = false'
+                        namedParams.sectionId = result.section.id
+                and 'primaryAsset.section.id = :sectionId'
+        }
+        result.tasks = Task.executeQuery(mandatoryTaskQ.query, mandatoryTaskQ.namedParams)
+
+        // Build the report table row for each task.
+        result.tasks.each { task ->
+
+            // Caluculate percentages and build description.
+            def percentComplete
+            def completionFigures
+            if(task.subTaskTotalCount) {
+                percentComplete = (task.subTaskCompletedCount / task.subTaskTotalCount) * 100
+                task.completionFigures = "${percentComplete.toInteger()}% ($task.subTaskCompletedCount/$task.subTaskTotalCount)"
+            }
+            else
+                task.completionFigures = '0 sub tasks in date range'
+        } // tasks.each
+
+        result.dataList = result.tasks
+        result.dataList.sort { p1, p2 -> p1.assetName.compareToIgnoreCase(p2.assetName) }
+
+        // Success.
+        return result
+
+    } // getMandatoryRequirements
+
 } // end class
Index: trunk/grails-app/views/appCore/start.gsp
===================================================================
--- trunk/grails-app/views/appCore/start.gsp	(revision 741)
+++ trunk/grails-app/views/appCore/start.gsp	(revision 743)
@@ -171,5 +171,12 @@
                                             <br />
                                             <g:link controller="report" action="regulatoryRequirementsGsp">
+                                                <img  src="${resource(dir:'images/skin',file:'script_lightning.png')}" alt="Regulatory Requirement" title="Regulatory Requirement" />
                                                 Regulatory Requirements
+                                            </g:link>
+                                            <br />
+                                            <br />
+                                            <g:link controller="report" action="mandatoryRequirementsGsp">
+                                                <img  src="${resource(dir:'images/skin',file:'script.png')}" alt="Mandatory Requirement" title="Mandatory Requirement" />
+                                                Mandatory Requirements
                                             </g:link>
                                             <br />
Index: trunk/grails-app/views/report/mandatoryRequirements.gsp
===================================================================
--- trunk/grails-app/views/report/mandatoryRequirements.gsp	(revision 743)
+++ trunk/grails-app/views/report/mandatoryRequirements.gsp	(revision 743)
@@ -0,0 +1,64 @@
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="layout" content="main" />
+        <title>Mandatory Requirements Report</title>
+        <nav:resources override="true"/>
+        <resource:dateChooser />
+    </head>
+    <body>
+        <div class="nav">
+            <nav:renderSubItems group="nav"/>
+        </div>
+        <div class="body">
+            <h1>Mandatory Requirements Report</h1>
+            <g:render template="/shared/messages" />
+            <div class="dialog">
+                <table>
+                    <tbody>
+
+                        <g:jasperForm controller="report"
+                                                    action="mandatoryRequirements"
+                                                    jasper="mandatoryRequirements"
+                                                    name="Mandatory Requirements">
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label>Date:</label>
+                                </td>
+                                <td valign="top" class="value">
+                                    <richui:dateChooser name="startDate" id="startDate" format="dd-MM-yyyy" value="${new Date()-7}" />
+                                    to
+                                    <richui:dateChooser name="endDate" id="endDate" format="dd-MM-yyyy" value="${new Date()}" />
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label>Section:</label>
+                                </td>
+                                <td valign="top" class="value">
+                                    <g:select optionKey="id"
+                                                        from="${Section.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
+                                                        name="section.id">
+                                    </g:select>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label>Report:</label>
+                                </td>
+                                <td valign="top" class="value">
+                                    <custom:jasperButtons jasper="mandatoryRequirements" format="PDF, XLS" text="PDF" />
+                                </td>
+                            </tr>
+
+                        </g:jasperForm>
+
+                    </tbody>
+                </table>
+            </div> <!--End dialog-->
+        </div> <!--End body-->
+    </body>
+</html>
