protected override void RunReport(DateTime period, int clientId)
        {
            if (clientId <= 0)
            {
                lblClientID.ForeColor = System.Drawing.Color.Red;
                lblClientID.Text      = "&larr; Required";
                return;
            }

            Session.Remove("UserUsageSummaryTables");
            Session.Remove("UserUsageSummaryTables20110701");

            //Because of this cutoff date, the stored procedure BillingTables_Select20110701 should always be used
            DateTime cutoff = new DateTime(2011, 10, 1);

            if (period < cutoff)
            {
                Response.Redirect($"~/IndUserUsageSummary20110401.aspx?p={period:yyyy-MM-dd}&cid={clientId}");
                return;
            }

            // 01) Billing Details: Room
            PopulateRoomDetailData(period, clientId);

            // 02) Billing Details: Tool
            PopulateToolDetailData(period, clientId);

            // 03) Billing Details: Store
            PopulateStoreDetailData(period, clientId);

            // 04) Aggregate by Organization: Room
            gvAggByOrgRoom.DataSource = RoomBillingByOrgBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvAggByOrgRoom.DataBind();

            // 05) Aggregate by Organization: Tool
            gvToolOrg20110701.DataSource = ToolBillingByOrgBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvToolOrg20110701.DataBind();
            gvToolOrg20110701.Visible = true;

            // 06) Aggregate by Organization: Store
            var dtStore = BillingTablesBL.GetMultipleTables(ContextBase, period.Year, period.Month, clientId, BillingTableType.StoreByOrg);

            gvStoreOrg.DataSource = dtStore;
            gvStoreOrg.DataBind();

            // 07) Aggregate by Organization: Subsidy
            var dtSubsidy = TieredSubsidyBillingBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);

            AddStoreChargesToSubsidyTable(dtStore, dtSubsidy);
            gvSubsidy.DataSource = dtSubsidy;
            gvSubsidy.DataBind();

            // 08) Aggregate by Accounts: Room
            gvRoomAccount.DataSource = RoomBillingByAccountBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvRoomAccount.DataBind();

            // 09) Aggregate by Accounts: Tool
            gvToolAccount20110701.DataSource = ToolBillingByAccountBL.GetDataByPeriodAndClientID20110701(ContextBase, period.Year, period.Month, clientId);
            gvToolAccount20110701.DataBind();
            gvToolAccount20110701.Visible = true;

            // 10) Aggregate by Accounts: Store
            gvStoreAccount.DataSource = StoreBillingByAccountBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvStoreAccount.DataBind();

            // 11) Billing Details: Misc
            gvMisc.DataSource = MiscBillingBL.GetMiscBillingByClientID(ContextBase, period.Year, period.Month, clientId);
            gvMisc.DataBind();

            PopulateReportInfo(divReportInfo, SelectedClientID, pp1.SelectedPeriod);

            HandlePageDisplay(period, clientId);
        }
        protected override void RunReport(DateTime period, int clientId)
        {
            Session.Remove("UserUsageSummaryTables");
            Session.Remove("UserUsageSummaryTables20110701");

            DateTime CutoffStart = new DateTime(2010, 7, 1);
            DateTime CutoffEnd   = new DateTime(2011, 4, 1);

            if (period < CutoffStart)
            {
                Response.Redirect(string.Format("~/IndUserUsageSummary.aspx?p={0:yyyy-MM-dd}&cid={1}", period, clientId));
                return;
            }

            if (period >= CutoffEnd)
            {
                Response.Redirect(string.Format("~/IndUserUsageSummary20110401.aspx?p={0:yyyy-MM-dd}&cid={1}", period, clientId));
                return;
            }

            if (period >= new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1))
            {
                divAggReports.Visible = false;
            }
            else
            {
                divAggReports.Visible = true;
            }

            PopulateRoomData(period, clientId);

            if (period < CutoffEnd)
            {
                PopulateToolData(period, clientId);
                divTool.Visible         = true;
                divTool20110401.Visible = false;
            }
            else
            {
                PopulateToolData20110401(period, clientId);
                divTool.Visible         = false;
                divTool20110401.Visible = true;
            }

            PopulateStoreData(period, clientId);

            divReportContent.Visible = true;
            lblClientID.Text         = clientId.ToString();

            gvRoomOrg.DataSource = RoomBillingByOrgBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvRoomOrg.DataBind();

            gvStoreOrg.DataSource = BillingTablesBL.GetMultipleTables(ContextBase, period.Year, period.Month, clientId, BillingTableType.StoreByOrg);
            gvStoreOrg.DataBind();

            gvSubsidy.DataSource = TieredSubsidyBillingBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvSubsidy.DataBind();

            gvRoomAccount.DataSource = RoomBillingByAccountBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvRoomAccount.DataBind();

            gvStoreAccount.DataSource = StoreBillingByAccountBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
            gvStoreAccount.DataBind();

            gvMisc.DataSource = MiscBillingBL.GetMiscBillingByClientID(ContextBase, period.Year, period.Month, clientId);
            gvMisc.DataBind();

            if (period < CutoffEnd)
            {
                gvToolOrg.DataSource = ToolBillingByOrgBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
                gvToolOrg.DataBind();
                gvToolOrg.Visible = true;

                gvToolAccount.DataSource = ToolBillingByAccountBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
                gvToolAccount.DataBind();
                gvToolAccount.Visible = true;

                gvToolOrg20110401.Visible     = false;
                gvToolAccount20110401.Visible = false;
            }
            else
            {
                gvToolOrg20110401.DataSource = ToolBillingByOrgBL.GetDataByPeriodAndClientID(ContextBase, period.Year, period.Month, clientId);
                gvToolOrg20110401.DataBind();
                gvToolOrg20110401.Visible = true;

                gvToolAccount20110401.DataSource = ToolBillingByAccountBL.GetDataByPeriodAndClientID20110401(ContextBase, period.Year, period.Month, clientId);
                gvToolAccount20110401.DataBind();
                gvToolAccount20110401.Visible = true;

                gvToolOrg.Visible     = false;
                gvToolAccount.Visible = false;
            }
        }