| """ + to_xml(tools.ustr(ans.answer)) + """ | """
for mat_col in range(0, len(menu_choices)):
calc = 0
response = 0
@@ -328,19 +344,22 @@ class survey_analysis(report_rml):
if ans.id == per['answer_id'] and menu_choices[mat_col] == per['value_choice']:
calc = per['count']
percantage = 0.00
+
if calc and response:
percantage = round((float(calc)* 100) / response,2)
if calc:
- rml+="""""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """) | """
+ rml += """""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """) | """
else:
- rml+="""""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """) | """
+ rml += """""" +tools.ustr(percantage)+"% (" + tools.ustr(calc) + """) | """
+
response = 0
for res in res_count:
if res['answer_id'] == ans.id: response = res['count']
rml += """""" + tools.ustr(response) + """ |
"""
rml += """