Help with reporting function
Posted: August 23rd, 2018, 4:40 pm
Hi, I'm having trouble with the report and setreportdata functions. I created a report template and tried running a report, but I just get a blank web page. This is my template.
I try to run it in my menu app with this code
I would like to end up with a report that basically lists each case in ENUMERATIONREPORT_REC. How do I accomplish that?
Code: Select all
<div id="cspro_report"></div>
<script type="application/vnd.cspro.report-template" id=cspro_report_template">
<h2>Continuous Labour Force Sample Survey Field Officer Enumeration Report<h2>
<h3>Name of field officer: {{ERFIELD_OFFICER}}</h3>
<h3>Week ending: {{WEEK_ENDING}}</h3>
<h3>ED No: {{ERED_NO}}</h3>
<h3>Parish: {{ERPARISH}}</h3>
<table>
<tr><th>Unit No</th><th>Serial No</th><th>Head of Household Last name</th><th>Head of Household First Name</th><th>Address of Head of Household</th><th>Date Started</th><th>Date Completed</th><th>Remarks</th></tr>
{{#ENUMERATIONREPORT_REC}}
<tr><td>{{ERUNIT_NO}}</td><td>{{ERSERIAL_NO}}</td><td>{{ERLAST_NAME}}</td><td>{{ERFIRST_NAME}}</td><td>{{ERADDRESS}}</td><td>{{ERSTART}}</td><td>{{EREND}}</td><td>{{ERREMARKS}}</td></tr>
{{/ENUMERATIONREPORT_REC}}
</table>
</script>
Code: Select all
//fills enumeration report and opens for editing
function enumerationRpt()
setreportdata(ENUMERATIONREPORT_REC);
report("../Reports/enumeratorrpt.html");
end;