Dates from " & strStartDate & " to " &strEndDate & "
") '*** Assign the report column headers and field formatting for Instance and Field level reports If blnReservoirFlag = False Then arrColumnNames = Array("Date","Oil (BBLS)","Gas (MCF)", "Gas Sales (MCFS)",_ "Water (BBLS)","Daily Avg Oil (BBLS)", "Daily Avg Gas (MCF)",_ "Daily Avg Water (BBLS)","OCum (BBLS)", "GCum (MCF)","WCum (BBLS)","BSW (%)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM_1DP,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT) Else arrColumnNames = Array("Date","Reservoir","Oil (BBLS)","Gas (MCF)", _ "Gas Sales (MCFS)","Water (BBLS)","Daily Avg Oil (BBLS)","Daily Avg Gas (MCF)",_ "Daily Avg Water (BBLS)","OCum (BBLS)","GCum (MCF)","WCum (BBLS)","BSW (%)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NONE,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM_1DP,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT) End If '*** Default charting to True blnCharting = True '*** Determine which type of report to run - assign the report header '*** and generate the report recordset using the appropriate method '*** "Monthly Production By Well Report" category selected If gstrWellUwi <> "" Then Set objBizObject = Server.CreateObject("ChvCITCeDaad.clsWellsRO") '*** If we came in from the search by well uwi or name function then fetch the field, property and platform for the well If blnCameFromSearch = True Then arrFieldPlatNames = Split(objBizObject.strGetPropertyAndFieldAndPlatNamesForWell(gstrAppInstAbbr, _ gstrWellUwi),"|") If Err.Number <> 0 Then HandleError Err.Number, Err.source, Err.description, strPageName If arrFieldPlatNames(1) <> "" Then gstrFieldName = arrFieldPlatNames(1) Else gstrFieldName = gstrCLEAR_STATE End If If arrFieldPlatNames(2) <> "" Then gstrPlatName = arrFieldPlatNames(2) Else gstrPlatName = gstrCLEAR_STATE End If End If '*** "Monthly Production By Well Report" selected If blnReservoirFlag = False Then arrRptTitle(0) = "Monthly Production (Warehouse): " & gstrAppInstName & ", " & objBizObject.strGetWellNameForWellUwi(gstrAppInstAbbr, gstrWellUwi) & " Well
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrWellUwi, _ strStartDate, strEndDate, gblnNOT_RESERVOIR_REPORT) '*** Assign the report column headers and field formatting for well level report arrColumnNames = Array("Date","Oil (BBLS)","Gas (MCF)","Water (BBLS)", _ "Daily Avg Oil (BBLS)", "Daily Avg Gas (MCF)","Daily Avg Water (BBLS)", _ "Watercut (%)","GOR (MSCF/BBL)","OCum (BBLS)", "GCum (MCF)","WCum (BBLS)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT,gstrFMT_NUM_3DP,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM) '*** Else "Monthly Production By Reservoir By Well Report" selected Else arrRptTitle(0) = "Monthly Production By Reservoir (Warehouse): " & gstrAppInstName & ", " & objBizObject.strGetWellNameForWellUwi(gstrAppInstAbbr, gstrWellUwi) & " Well
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrWellUwi, _ strStartDate, strEndDate, gblnIS_RESERVOIR_REPORT) '*** Assign the report column headers and field formatting for well level report arrColumnNames = Array("Date","Reservoir","Oil (BBLS)","Gas (MCF)","Water (BBLS)", _ "Daily Avg Oil (BBLS)", "Daily Avg Gas (MCF)","Daily Avg Water (BBLS)", _ "Watercut (%)","GOR (MSCF/BBL)","OCum (BBLS)", "GCum (MCF)","WCum (BBLS)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NONE,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT,gstrFMT_NUM_3DP,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM) End If '*** Else "Monthly Production By Platform Report" category selected ElseIf gstrPlatName <> "" Then Set objBizObject = Server.CreateObject("ChvCITCeDaad.clsPlatformsRO") '*** If the FieldName is empty then fetch it (we came in from the search by platform function) If gstrFieldName = "" Then arrFieldPlatNames = Split(objBizObject.strGetPropertyAndFieldNamesForPlatform(gstrAppInstAbbr, , _ gstrPlatName),"|") If Err.Number <> 0 Then HandleError Err.Number, Err.source, Err.description, strPageName If arrFieldPlatNames(1) <> "" Then gstrFieldName = arrFieldPlatNames(1) Else gstrFieldName = gstrCLEAR_STATE End If End If '*** "Monthly Production By Platform Report" selected If blnReservoirFlag = False Then arrRptTitle(0) = "Monthly Production (Warehouse): " & gstrAppInstName & ", " & gstrPlatName & " Platform
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrAppInstName, _ gstrFieldName, gstrPlatName, strStartDate, strEndDate, gblnNOT_RESERVOIR_REPORT) '*** Assign the report column headers and field formatting for platform level report arrColumnNames = Array("Date","Oil (BBLS)","Gas (MCF)","Water (BBLS)", _ "Daily Avg Oil (BBLS)", "Daily Avg Gas (MCF)","Daily Avg Water (BBLS)", _ "OCum (BBLS)", "GCum (MCF)","WCum (BBLS)","BSW (%)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT) '*** Else "Monthly Production By Reservoir By Platform Report" selected Else arrRptTitle(0) = "Monthly Production By Reservoir (Warehouse): " & gstrAppInstName & ", " & gstrPlatName & " Platform
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrAppInstName, _ gstrFieldName, gstrPlatName, strStartDate, strEndDate, gblnIS_RESERVOIR_REPORT) '*** Assign the report column headers and field formatting for platform level report arrColumnNames = Array("Date","Reservoir","Oil (BBLS)","Gas (MCF)","Water (BBLS)", _ "Daily Avg Oil (BBLS)", "Daily Avg Gas (MCF)","Daily Avg Water (BBLS)", _ "OCum (BBLS)", "GCum (MCF)","WCum (BBLS)","BSW (%)") arrFieldFormats = Array(gstrFMT_DT,gstrFMT_NONE,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_NUM,gstrFMT_PCT) End If '*** Else "Monthly Production By Field Report" category selected ElseIf gstrFieldName <> "" Then Set objBizObject = Server.CreateObject("ChvCITCeDaad.clsFieldsRO") '*** "Monthly Production By Field Report" selected If blnReservoirFlag = False Then arrRptTitle(0) = "Monthly Production (Warehouse): " & gstrAppInstName & ", " & gstrFieldName & " Field
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrAppInstName, _ gstrFieldName, strStartDate, strEndDate, gblnNOT_RESERVOIR_REPORT) '*** Else "Monthly Production By Reservoir By Field Report" selected Else arrRptTitle(0) = "Monthly Production By Reservoir (Warehouse): " & gstrAppInstName & ", " & gstrFieldName & " Field
" Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrAppInstName, _ gstrFieldName, strStartDate, strEndDate, gblnIS_RESERVOIR_REPORT) End If '*** "Monthly Production By Instance Report" selected Else arrRptTitle(0) = "Monthly Production (Warehouse): " & gstrAppInstName & "
" Set objBizObject = Server.CreateObject("ChvCITCeDaad.clsCountriesRO") Set rsQueryResults = objBizObject.rsGetMonthlyProd(gstrAppInstAbbr, gstrAppInstName, _ strStartDate, strEndDate) End If If Err.Number <> 0 Then HandleError Err.Number, Err.source, Err.description, strPageName '*** If not reservoir reports then define charts to be displayed If blnReservoirFlag <> True Then arrChartNames = arrCharts() '*** Else not... Else arrChartNames = "" End If '*** Display standard report controls used for filtering, export and charting WriteStandardControls strPageName, gstrMONTHLY_REPORT, strStartDate, strEndDate, _ arrChartNames, blnNavigationLevelChanged, gstrNULL_PARM '*** Write report titles WriteArrayToPage(arrRptTitle) '*** Generate and display an HTML table to display the query results If Not (rsQueryResults.EOF And rsQueryResults.BOF) Then WriteTable rsQueryResults,arrColumnNames,arrFieldFormats,gintPAGE_SIZE,_ gblnDISPLAY_ALT_ROW_COLOR,gstrNULL_PARM,gstrNULL_PARM, _ gstrNULL_PARM,gstrNULL_PARM Else Response.Write ("" & gstrNO_RECORDS_MESSAGE & "
") End If '*** Process additional tasks required for the current form event '*** (actions are additionally processed through client-side event script: (body_onLoad()) ProcessFormEvents strCurrActionFlag, arrColumnNames, arrFieldFormats, rsQueryResults, _ arrRptTitle, gstrMONTHLY_REPORT If Err.Number <> 0 Then HandleError Err.Number, Err.source, Err.description, strPageName '*** Save the page state SaveDAADState strPageName, gstrFieldName, gstrPlatName, gstrWellUwi PutState "blnReservoirFlag", blnReservoirFlag Response.Write("") If Err.Number <> 0 Then HandleError Err.Number, Err.source, Err.description, strPageName '*** End form object created by DisplayStandardControls Response.Write ( "" ) '*** Destroy all objects If Not (objBizObject Is Nothing) Then Set objBizObject = Nothing If Not (rsQueryResults Is Nothing) Then Set rsQueryResults = Nothing Function arrCharts() Dim arrChartsList ReDim arrChartsList(1,1) arrChartsList(0,0) = "cmdOilGasWaterChart" arrChartsList(0,1) = "Chart Production" arrChartsList(1,0) = "cmdOilGasWaterDailyChart" arrChartsList(1,1) = "Chart Daily Average" arrCharts = arrChartsList End Function %> <%'Footer include file closes the BODY & HTML tags %>