from datetime import datetime, timedelta

from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.db import connection

from tools.utils import dictfetchall
import logging
logger = logging.getLogger(__name__)

# If manually pasting from ReportBro and you have test data, search and replace \" with \\"
template = """{
  "docElements": [
    {
      "elementType": "text",
      "id": 3,
      "containerId": "0_header",
      "x": 120,
      "y": 0,
      "width": 575,
      "height": 40,
      "content": "Policy Primary Operational Indicators",
      "richText": false,
      "richTextContent": null,
      "richTextHtml": "",
      "eval": false,
      "styleId": "",
      "bold": true,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "center",
      "verticalAlignment": "middle",
      "textColor": "#006273",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": "24",
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": 1,
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": 2,
      "paddingTop": 2,
      "paddingRight": 2,
      "paddingBottom": 2,
      "printIf": "",
      "removeEmptyElement": false,
      "alwaysPrintOnSamePage": true,
      "pattern": "",
      "link": "",
      "cs_condition": "",
      "cs_styleId": "",
      "cs_bold": false,
      "cs_italic": false,
      "cs_underline": false,
      "cs_strikethrough": false,
      "cs_horizontalAlignment": "left",
      "cs_verticalAlignment": "top",
      "cs_textColor": "#000000",
      "cs_backgroundColor": "",
      "cs_font": "helvetica",
      "cs_fontSize": 12,
      "cs_lineSpacing": 1,
      "cs_borderColor": "#000000",
      "cs_borderWidth": "1",
      "cs_borderAll": false,
      "cs_borderLeft": false,
      "cs_borderTop": false,
      "cs_borderRight": false,
      "cs_borderBottom": false,
      "cs_paddingLeft": 2,
      "cs_paddingTop": 2,
      "cs_paddingRight": 2,
      "cs_paddingBottom": 2,
      "spreadsheet_hide": false,
      "spreadsheet_column": "",
      "spreadsheet_colspan": "",
      "spreadsheet_addEmptyRow": false,
      "spreadsheet_textWrap": false
    },
    {
      "elementType": "line",
      "id": 158,
      "containerId": "0_content",
      "x": 0,
      "y": 0,
      "width": 820,
      "height": 1,
      "color": "#000000",
      "printIf": ""
    },
    {
      "elementType": "text",
      "id": 193,
      "containerId": "0_content",
      "x": 0,
      "y": 10,
      "width": 575,
      "height": 20,
      "content": "Date: ${yearMonth}",
      "richText": false,
      "richTextContent": null,
      "richTextHtml": "",
      "eval": false,
      "styleId": "",
      "bold": true,
      "italic": false,
      "underline": true,
      "strikethrough": false,
      "horizontalAlignment": "left",
      "verticalAlignment": "top",
      "textColor": "#000000",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": 12,
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": 1,
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": 2,
      "paddingTop": 2,
      "paddingRight": 2,
      "paddingBottom": 2,
      "printIf": "",
      "removeEmptyElement": false,
      "alwaysPrintOnSamePage": true,
      "pattern": "",
      "link": "",
      "cs_condition": "",
      "cs_styleId": "",
      "cs_bold": false,
      "cs_italic": false,
      "cs_underline": false,
      "cs_strikethrough": false,
      "cs_horizontalAlignment": "left",
      "cs_verticalAlignment": "top",
      "cs_textColor": "#000000",
      "cs_backgroundColor": "",
      "cs_font": "helvetica",
      "cs_fontSize": 12,
      "cs_lineSpacing": 1,
      "cs_borderColor": "#000000",
      "cs_borderWidth": "1",
      "cs_borderAll": false,
      "cs_borderLeft": false,
      "cs_borderTop": false,
      "cs_borderRight": false,
      "cs_borderBottom": false,
      "cs_paddingLeft": 2,
      "cs_paddingTop": 2,
      "cs_paddingRight": 2,
      "cs_paddingBottom": 2,
      "spreadsheet_hide": false,
      "spreadsheet_column": "",
      "spreadsheet_colspan": "",
      "spreadsheet_addEmptyRow": false,
      "spreadsheet_textWrap": false
    },
    {
      "elementType": "table",
      "id": 195,
      "containerId": "0_content",
      "width": 745,
      "x": 0,
      "y": 40,
      "dataSource": "${data}",
      "columns": 18,
      "header": true,
      "contentRows": 2,
      "footer": false,
      "border": "grid",
      "borderColor": "#000000",
      "borderWidth": "1",
      "printIf": "",
      "removeEmptyElement": false,
      "spreadsheet_hide": false,
      "spreadsheet_column": "",
      "spreadsheet_addEmptyRow": false,
      "headerData": {
        "elementType": "none",
        "id": 196,
        "height": 36,
        "backgroundColor": "",
        "repeatHeader": true,
        "columnData": [
          {
            "elementType": "table_text",
            "id": 197,
            "width": 84,
            "content": "Product Code",
            "eval": false,
            "colspan": "",
            "styleId": "33",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 205,
            "width": 36,
            "content": "Total Active Insurees",
            "eval": false,
            "colspan": "3",
            "styleId": "",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "center",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 302,
            "width": 36,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 305,
            "width": 36,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 206,
            "width": 35,
            "content": "New insurees",
            "eval": false,
            "colspan": "3",
            "styleId": "",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "center",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 308,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 311,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 239,
            "width": 35,
            "content": "Suspended Insurees",
            "eval": false,
            "colspan": "3",
            "styleId": "",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "center",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 326,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 330,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 283,
            "width": 35,
            "content": "Expired Insurees",
            "eval": false,
            "colspan": "3",
            "styleId": "",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "center",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 334,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 338,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 289,
            "width": 35,
            "content": "Renewed Insurees",
            "eval": false,
            "colspan": "3",
            "styleId": "",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "center",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 342,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 346,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 292,
            "width": 65,
            "content": "Total Premium Paid",
            "eval": false,
            "colspan": "",
            "styleId": "33",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          },
          {
            "elementType": "table_text",
            "id": 352,
            "width": 68,
            "content": "Allocated",
            "eval": false,
            "colspan": "",
            "styleId": "33",
            "bold": true,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "middle",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": "10",
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "printIf": "",
            "growWeight": 0,
            "borderWidth": 1
          }
        ]
      },
      "contentDataRows": [
        {
          "elementType": "none",
          "id": 314,
          "height": 20,
          "backgroundColor": "",
          "alternateBackgroundColor": "",
          "groupExpression": "",
          "printIf": "${row_number}==1",
          "alwaysPrintOnSamePage": true,
          "pageBreak": false,
          "repeatGroupHeader": false,
          "columnData": [
            {
              "elementType": "table_text",
              "id": 315,
              "width": 84,
              "content": "",
              "eval": false,
              "colspan": "",
              "styleId": "33",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 316,
              "width": 36,
              "content": "M",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 317,
              "width": 36,
              "content": "F",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 318,
              "width": 36,
              "content": "O",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 319,
              "width": 35,
              "content": "M",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 320,
              "width": 35,
              "content": "F",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 321,
              "width": 35,
              "content": "O",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 322,
              "width": 35,
              "content": "M",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 327,
              "width": 35,
              "content": "F",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 331,
              "width": 35,
              "content": "O",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 323,
              "width": 35,
              "content": "M",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 335,
              "width": 35,
              "content": "F",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 339,
              "width": 35,
              "content": "O",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 324,
              "width": 35,
              "content": "M",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 343,
              "width": 35,
              "content": "F",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 347,
              "width": 35,
              "content": "O",
              "eval": false,
              "colspan": "",
              "styleId": "350",
              "bold": true,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "center",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "10",
              "lineSpacing": 1,
              "paddingLeft": 0,
              "paddingTop": 0,
              "paddingRight": 0,
              "paddingBottom": 0,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 325,
              "width": 65,
              "content": "",
              "eval": false,
              "colspan": "",
              "styleId": "",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "top",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": 12,
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 353,
              "width": 68,
              "content": "",
              "eval": false,
              "colspan": "",
              "styleId": "",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "top",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": 12,
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            }
          ]
        },
        {
          "elementType": "none",
          "id": 199,
          "height": 20,
          "backgroundColor": "",
          "alternateBackgroundColor": "#eeeeee",
          "groupExpression": "",
          "printIf": "",
          "alwaysPrintOnSamePage": false,
          "pageBreak": false,
          "repeatGroupHeader": false,
          "columnData": [
            {
              "elementType": "table_text",
              "id": 200,
              "width": 84,
              "content": "${ProductCode}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 208,
              "width": 36,
              "content": "${TotalMaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 303,
              "width": 36,
              "content": "${TotalFemaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 306,
              "width": 36,
              "content": "${TotalOtherInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 209,
              "width": 35,
              "content": "${NewMaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 309,
              "width": 35,
              "content": "${NewFemaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 312,
              "width": 35,
              "content": "${NewOtherInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 240,
              "width": 35,
              "content": "${SuspendedMaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 328,
              "width": 35,
              "content": "${SuspendedFemaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 332,
              "width": 35,
              "content": "${SuspendedOtherInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 284,
              "width": 35,
              "content": "${ExpiredMaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 336,
              "width": 35,
              "content": "${ExpiredFemaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 340,
              "width": 35,
              "content": "${ExpiredOtherInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 290,
              "width": 35,
              "content": "${RenewMaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 344,
              "width": 35,
              "content": "${RenewFemaleInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 348,
              "width": 35,
              "content": "${RenewOtherInsurees}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 293,
              "width": 65,
              "content": "${TotalPremiumPaid}",
              "eval": false,
              "colspan": "",
              "styleId": "34",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "middle",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": "9",
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            },
            {
              "elementType": "table_text",
              "id": 354,
              "width": 68,
              "content": "${AvailablePremium}",
              "eval": false,
              "colspan": "",
              "styleId": "",
              "bold": false,
              "italic": false,
              "underline": false,
              "strikethrough": false,
              "horizontalAlignment": "left",
              "verticalAlignment": "top",
              "textColor": "#000000",
              "backgroundColor": "",
              "font": "helvetica",
              "fontSize": 12,
              "lineSpacing": 1,
              "paddingLeft": 2,
              "paddingTop": 2,
              "paddingRight": 2,
              "paddingBottom": 2,
              "pattern": "",
              "link": "",
              "cs_condition": "",
              "cs_styleId": "",
              "cs_bold": false,
              "cs_italic": false,
              "cs_underline": false,
              "cs_strikethrough": false,
              "cs_horizontalAlignment": "left",
              "cs_verticalAlignment": "top",
              "cs_textColor": "#000000",
              "cs_backgroundColor": "",
              "cs_font": "helvetica",
              "cs_fontSize": 12,
              "cs_lineSpacing": 1,
              "cs_paddingLeft": 2,
              "cs_paddingTop": 2,
              "cs_paddingRight": 2,
              "cs_paddingBottom": 2,
              "spreadsheet_textWrap": false,
              "borderWidth": 1,
              "growWeight": 0
            }
          ]
        }
      ],
      "footerData": {
        "elementType": "none",
        "id": 202,
        "height": 20,
        "backgroundColor": "",
        "columnData": [
          {
            "elementType": "table_text",
            "id": 203,
            "width": 84,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 211,
            "width": 36,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 304,
            "width": 36,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 307,
            "width": 36,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 285,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 310,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 313,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 291,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 329,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 333,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 294,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 337,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 341,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 298,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 345,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 349,
            "width": 35,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 301,
            "width": 65,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          },
          {
            "elementType": "table_text",
            "id": 355,
            "width": 68,
            "content": "",
            "eval": false,
            "colspan": "",
            "styleId": "",
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "horizontalAlignment": "left",
            "verticalAlignment": "top",
            "textColor": "#000000",
            "backgroundColor": "",
            "font": "helvetica",
            "fontSize": 12,
            "lineSpacing": 1,
            "paddingLeft": 2,
            "paddingTop": 2,
            "paddingRight": 2,
            "paddingBottom": 2,
            "pattern": "",
            "link": "",
            "cs_condition": "",
            "cs_styleId": "",
            "cs_bold": false,
            "cs_italic": false,
            "cs_underline": false,
            "cs_strikethrough": false,
            "cs_horizontalAlignment": "left",
            "cs_verticalAlignment": "top",
            "cs_textColor": "#000000",
            "cs_backgroundColor": "",
            "cs_font": "helvetica",
            "cs_fontSize": 12,
            "cs_lineSpacing": 1,
            "cs_paddingLeft": 2,
            "cs_paddingTop": 2,
            "cs_paddingRight": 2,
            "cs_paddingBottom": 2,
            "spreadsheet_textWrap": false,
            "borderWidth": 1,
            "growWeight": 0
          }
        ]
      }
    },
    {
      "elementType": "text",
      "id": 7,
      "containerId": "0_footer",
      "x": 320,
      "y": 0,
      "width": 255,
      "height": 30,
      "content": "Page ${page_number} / ${page_count}",
      "richText": false,
      "richTextContent": null,
      "richTextHtml": "",
      "eval": false,
      "styleId": "",
      "bold": false,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "right",
      "verticalAlignment": "middle",
      "textColor": "#666666",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": 12,
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": 1,
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": 2,
      "paddingTop": 2,
      "paddingRight": 2,
      "paddingBottom": 2,
      "printIf": "",
      "removeEmptyElement": false,
      "alwaysPrintOnSamePage": true,
      "pattern": "",
      "link": "",
      "cs_condition": "",
      "cs_styleId": "",
      "cs_bold": false,
      "cs_italic": false,
      "cs_underline": false,
      "cs_strikethrough": false,
      "cs_horizontalAlignment": "left",
      "cs_verticalAlignment": "top",
      "cs_textColor": "#000000",
      "cs_backgroundColor": "",
      "cs_font": "helvetica",
      "cs_fontSize": 12,
      "cs_lineSpacing": 1,
      "cs_borderColor": "#000000",
      "cs_borderWidth": "1",
      "cs_borderAll": false,
      "cs_borderLeft": false,
      "cs_borderTop": false,
      "cs_borderRight": false,
      "cs_borderBottom": false,
      "cs_paddingLeft": 2,
      "cs_paddingTop": 2,
      "cs_paddingRight": 2,
      "cs_paddingBottom": 2,
      "spreadsheet_hide": false,
      "spreadsheet_column": "",
      "spreadsheet_colspan": "",
      "spreadsheet_addEmptyRow": false,
      "spreadsheet_textWrap": false
    },
    {
      "elementType": "text",
      "id": 8,
      "containerId": "0_footer",
      "x": 0,
      "y": 0,
      "width": 290,
      "height": 30,
      "content": "Created on ${current_date}",
      "richText": false,
      "richTextContent": null,
      "richTextHtml": "",
      "eval": false,
      "styleId": "",
      "bold": false,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "left",
      "verticalAlignment": "middle",
      "textColor": "#666666",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": 12,
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": 1,
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": 2,
      "paddingTop": 2,
      "paddingRight": 2,
      "paddingBottom": 2,
      "printIf": "",
      "removeEmptyElement": false,
      "alwaysPrintOnSamePage": true,
      "pattern": "",
      "link": "",
      "cs_condition": "",
      "cs_styleId": "",
      "cs_bold": false,
      "cs_italic": false,
      "cs_underline": false,
      "cs_strikethrough": false,
      "cs_horizontalAlignment": "left",
      "cs_verticalAlignment": "top",
      "cs_textColor": "#000000",
      "cs_backgroundColor": "",
      "cs_font": "helvetica",
      "cs_fontSize": 12,
      "cs_lineSpacing": 1,
      "cs_borderColor": "#000000",
      "cs_borderWidth": "1",
      "cs_borderAll": false,
      "cs_borderLeft": false,
      "cs_borderTop": false,
      "cs_borderRight": false,
      "cs_borderBottom": false,
      "cs_paddingLeft": 2,
      "cs_paddingTop": 2,
      "cs_paddingRight": 2,
      "cs_paddingBottom": 2,
      "spreadsheet_hide": false,
      "spreadsheet_column": "",
      "spreadsheet_colspan": "",
      "spreadsheet_addEmptyRow": false,
      "spreadsheet_textWrap": false
    }
  ],
  "parameters": [
    {
      "id": 1,
      "name": "page_count",
      "type": "number",
      "arrayItemType": "string",
      "eval": false,
      "nullable": false,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": true,
      "testData": ""
    },
    {
      "id": 2,
      "name": "page_number",
      "type": "number",
      "arrayItemType": "string",
      "eval": false,
      "nullable": false,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": true,
      "testData": ""
    },
    {
      "id": 9,
      "name": "current_date",
      "type": "date",
      "arrayItemType": "string",
      "eval": false,
      "nullable": false,
      "pattern": "d/M/yyyy H:mm",
      "expression": "",
      "showOnlyNameType": false,
      "testData": ""
    },
    {
      "id": 233,
      "name": "data",
      "type": "array",
      "arrayItemType": "string",
      "eval": false,
      "nullable": false,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": false,
      "testData": "",
      "children": [
        {
          "id": 234,
          "name": "row_number",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": false,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": true,
          "testData": ""
        },
        {
          "id": 263,
          "name": "ProdID",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 269,
          "name": "TotalMaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 271,
          "name": "TotalFemaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 270,
          "name": "TotalOtherInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 272,
          "name": "ProductCode",
          "type": "string",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 273,
          "name": "NewMaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 274,
          "name": "NewFemaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 275,
          "name": "NewOtherInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 277,
          "name": "SuspendedMaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 278,
          "name": "SuspendedFemaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 279,
          "name": "SuspendedOtherInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 280,
          "name": "ExpiredMaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 281,
          "name": "ExpiredFemaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 282,
          "name": "ExpiredOtherInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 286,
          "name": "RenewMaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 287,
          "name": "RenewFemaleInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 288,
          "name": "RenewOtherInsurees",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 295,
          "name": "TotalPremiumPaid",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "#,##0.00",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        },
        {
          "id": 351,
          "name": "AvailablePremium",
          "type": "number",
          "arrayItemType": "string",
          "eval": false,
          "nullable": true,
          "pattern": "",
          "expression": "",
          "showOnlyNameType": false,
          "testData": ""
        }
      ]
    },
    {
      "id": 265,
      "name": "yearMonth",
      "type": "string",
      "arrayItemType": "string",
      "eval": false,
      "nullable": true,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": false,
      "testData": "2019-08"
    },
    {
      "id": 266,
      "name": "productCode",
      "type": "string",
      "arrayItemType": "string",
      "eval": false,
      "nullable": true,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": false,
      "testData": ""
    },
    {
      "id": 267,
      "name": "productName",
      "type": "string",
      "arrayItemType": "string",
      "eval": false,
      "nullable": true,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": false,
      "testData": ""
    },
    {
      "id": 268,
      "name": "LocationName",
      "type": "string",
      "arrayItemType": "string",
      "eval": false,
      "nullable": true,
      "pattern": "",
      "expression": "",
      "showOnlyNameType": false,
      "testData": ""
    }
  ],
  "styles": [
    {
      "id": 33,
      "name": "Table Header",
      "bold": true,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "left",
      "verticalAlignment": "middle",
      "textColor": "#000000",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": "10",
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": "1",
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": "2",
      "paddingTop": "2",
      "paddingRight": "2",
      "paddingBottom": "2"
    },
    {
      "id": 34,
      "name": "Table Content",
      "bold": false,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "left",
      "verticalAlignment": "middle",
      "textColor": "#000000",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": "9",
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": "1",
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": "2",
      "paddingTop": "2",
      "paddingRight": "2",
      "paddingBottom": "2"
    },
    {
      "id": 35,
      "name": "Table Content Highlight",
      "bold": true,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "center",
      "verticalAlignment": "middle",
      "textColor": "#3d85c6",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": "9",
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": "1",
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": "2",
      "paddingTop": "2",
      "paddingRight": "2",
      "paddingBottom": "2"
    },
    {
      "id": 350,
      "name": "Table sub-header",
      "bold": true,
      "italic": false,
      "underline": false,
      "strikethrough": false,
      "horizontalAlignment": "center",
      "verticalAlignment": "middle",
      "textColor": "#000000",
      "backgroundColor": "",
      "font": "helvetica",
      "fontSize": "10",
      "lineSpacing": 1,
      "borderColor": "#000000",
      "borderWidth": "1",
      "borderAll": false,
      "borderLeft": false,
      "borderTop": false,
      "borderRight": false,
      "borderBottom": false,
      "paddingLeft": "",
      "paddingTop": "",
      "paddingRight": "",
      "paddingBottom": ""
    }
  ],
  "version": 3,
  "documentProperties": {
    "pageFormat": "A4",
    "pageWidth": "",
    "pageHeight": "",
    "unit": "mm",
    "orientation": "landscape",
    "contentHeight": "",
    "marginLeft": "10",
    "marginTop": "10",
    "marginRight": "10",
    "marginBottom": "10",
    "header": true,
    "headerSize": "50",
    "headerDisplay": "always",
    "footer": true,
    "footerSize": "30",
    "footerDisplay": "always",
    "patternLocale": "en",
    "patternCurrencySymbol": "$"
  }
}
"""

# the udfAvailablePremium function was written before GREATEST() was available in MS SQL and
# availablePremium could be simplified to:
available_premium_expression = """
CASE
WHEN MONTH(DATEADD_DAY(-1,PL."ExpiryDate")) = MONTH(%(LastDay)s) AND YEAR(DATEADD_DAY(-1,PL."ExpiryDate")) = YEAR(%(LastDay)s) AND extract(DAY from (PL."ExpiryDate")) > 1
    THEN GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", %(LastDay)s),PL."ExpiryDate"))
      * ((PR."Amount")
         /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),PL."ExpiryDate")))
WHEN MONTH(GREATEST(PR."PayDate", PL."EffectiveDate")) = MONTH(%(LastDay)s) AND YEAR(GREATEST(PR."PayDate", PL."EffectiveDate")) = YEAR(%(LastDay)s)
    THEN ((%(DaysInMonth)s + 1 - extract (DAY FROM GREATEST(PR."PayDate", PL."EffectiveDate")))
              * (PR."Amount"
                     /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),PL."ExpiryDate"))))
WHEN PL."EffectiveDate" < %(LastDay)s AND PL."ExpiryDate" > %(LastDay)s AND PR."PayDate" < %(LastDay)s
    THEN %(DaysInMonth)s
             * (PR."Amount"
                    /GREATEST(1, DATEDIFF_DAY(GREATEST(PR."PayDate", PL."EffectiveDate"),DATEADD_DAY(-1,PL."ExpiryDate"))))
END
"""

policies_primary_indicators_sql = f"""
    SELECT prod."ProdID" as "ProdID", prod."ProductCode" as "ProductCode",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'M'     
            AND pl."PolicyStatus" > 1
            AND pl."EffectiveDate" <= %(LastDay)s
            AND pl."ExpiryDate" > %(LastDay)s
        ) AS "TotalMaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'F'     
            AND pl."PolicyStatus" > 1
            AND pl."EffectiveDate" <= %(LastDay)s
            AND pl."ExpiryDate" > %(LastDay)s
        ) AS "TotalFemaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'O'     
            AND pl."PolicyStatus" > 1
            AND pl."EffectiveDate" <= %(LastDay)s
            AND pl."ExpiryDate" > %(LastDay)s
        ) AS "TotalOtherInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'M'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'N'
            AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s)
        ) AS "NewMaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'F'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'N'
            AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s)
        ) AS "NewFemaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'O'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'N'
            AND YEAR(pl."EffectiveDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EffectiveDate") = MONTH(%(LastDay)s)
        ) AS "NewOtherInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'M'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'R'
            AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s)
        ) AS "RenewMaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'F'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'R'
            AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s)
        ) AS "RenewFemaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'O'     
            AND pl."PolicyStatus" > 1
            AND pl."PolicyStage" = 'R'
            AND YEAR(pl."EnrollDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."EnrollDate") = MONTH(%(LastDay)s)
        ) AS "RenewOtherInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'M'     
            AND pl."PolicyStatus" = 4
            AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s)
            AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s)
        ) AS "SuspendedMaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'F'     
            AND pl."PolicyStatus" = 4
            AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s)
            AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s)
        ) AS "SuspendedFemaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'O'     
            AND pl."PolicyStatus" = 4
            AND YEAR(pl."ValidityFrom") = YEAR(%(LastDay)s)
            AND MONTH(pl."ValidityFrom") = MONTH(%(LastDay)s)
        ) AS "SuspendedOtherInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'M'     
            AND pl."PolicyStatus" > 1
            AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s)
        ) AS "ExpiredMaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'F'     
            AND pl."PolicyStatus" > 1
            AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s)
        ) AS "ExpiredFemaleInsurees",
        COUNT(ins."InsureeID") FILTER (
            WHERE Ins."Gender" = 'O'     
            AND pl."PolicyStatus" > 1
            AND YEAR(pl."ExpiryDate") = YEAR(%(LastDay)s)
            AND MONTH(pl."ExpiryDate") = MONTH(%(LastDay)s)
        ) AS "ExpiredOtherInsurees",
        sum(pr."Amount") FILTER (
            WHERE YEAR(pr."PayDate") = YEAR(%(LastDay)s)
            AND MONTH(pr."PayDate") = MONTH(%(LastDay)s)
        ) AS "TotalPremiumPaid",
        SUM({available_premium_expression}) AS "AvailablePremium"
    FROM "tblPolicy" pl
    INNER JOIN "tblProduct" prod ON prod."ProdID" = pl."ProdID"
    INNER JOIN "tblFamilies" fam ON fam."FamilyID" = pl."FamilyID"
    INNER JOIN "tblInsuree" ins ON ins."InsureeID" = fam."InsureeID"
    INNER JOIN "tblLocations" v ON v."LocationId" = fam."LocationId"
    INNER JOIN "tblLocations" w ON w."LocationId" = v."ParentLocationId"
    INNER JOIN "tblLocations" d ON d."LocationId" = w."ParentLocationId"
    INNER JOIN "tblLocations" r ON r."LocationId" = d."ParentLocationId"
    LEFT JOIN "tblPremium" pr ON pr."PolicyID" = pl."PolicyID"
    WHERE pl."ValidityTo" IS NULL
    AND prod."ValidityTo" IS NULL
    AND fam."ValidityTo" IS NULL
    AND ins."ValidityTo" IS NULL
    and pr."ValidityTo" IS NULL
    AND (prod."ProdID" = %(ProdId)s OR %(ProdId)s = 0)
    AND (r."LocationId" = %(LocationId)s OR d."LocationId" = %(LocationId)s OR COALESCE(%(LocationId)s, 0) = 0 OR %(LocationId)s = 0)
    GROUP BY prod."ProdID", prod."ProductCode";
"""


def policies_primary_indicators_query(user, yearMonth, locationId=0, prodId=0, **kwargs):
    first_day = datetime.strptime(yearMonth, "%Y-%m-%d").replace(day=1)
    last_day = first_day + relativedelta(months=1) - timedelta(days=1)
    days_in_month = last_day.day

    with connection.cursor() as cur:
        try:
            cur.execute(
                policies_primary_indicators_sql,
                {
                    "LastDay": last_day,
                    "LocationId": locationId,
                    "ProdId": prodId,
                    "DaysInMonth": days_in_month,
                },
            )
            return {
                "data": dictfetchall(cur)
            }
        except Exception as e:
            logger.exception("Error fetching policies primary indicators query")
            raise e

    logger.error("Policies primary indicators query arrived at end of function")
    return {"data": None}
