Author: hansbak
Date: Tue Feb 8 07:10:36 2011 New Revision: 1068279 URL: http://svn.apache.org/viewvc?rev=1068279&view=rev Log: remove log messages from image managment, correct sales report and popular categories Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/FactServices.xml ofbiz/trunk/applications/order/script/org/ofbiz/order/reports/SalesReportEvent.xml ofbiz/trunk/applications/order/servicedef/services_olap.xml ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReport.rptdesign ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReportMonth.rptdesign ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReportWeek.rptdesign ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml ofbiz/trunk/applications/product/servicedef/services.xml ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml Tue Feb 8 07:10:36 2011 @@ -91,6 +91,10 @@ under the License. <field name="GP" type="currency-precise"> <description>Gross Profit: Gross Merchandize Profit less Gross Shipping Profit.</description> </field> + + <field name="countOrder" type="fixed-point"> + <description>Count of order.</description> + </field> <prim-key field="orderId"/> <prim-key field="orderItemSeqId"/> Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/FactServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/FactServices.xml?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/FactServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/FactServices.xml Tue Feb 8 07:10:36 2011 @@ -120,11 +120,13 @@ under the License. </if-not-empty> <!-- conversion of the order date --> - <entity-and entity-name="OrderStatus" list="orderStatusList"> - <field-map field-name="orderId" from-field="orderHeader.orderId"/> - <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> - <field-map field-name="statusId" value="ITEM_APPROVED"/> - </entity-and> + <entity-condition entity-name="OrderStatus" list="orderStatusList"> + <condition-list combine="and"> + <condition-expr field-name="orderId" from-field="orderHeader.orderId"/> + <condition-expr field-name="statusId" value="ORDER_APPROVED"/> + </condition-list> + <order-by field-name="-statusDatetime"/> + </entity-condition> <first-from-list entry="orderStatus" list="orderStatusList"/> <if-not-empty field="orderStatus.statusDatetime"> <clear-field field="inMap"/> @@ -193,6 +195,7 @@ under the License. <!-- =============== --> <set field="fact.quantity" from-field="orderItem.quantity" type="BigDecimal"/> <set field="fact.extGrossAmount" value="0" type="BigDecimal"/> + <set field="fact.extGrossCost" value="0" type="BigDecimal"/> <set field="fact.extDiscountAmount" value="0" type="BigDecimal"/> <set field="fact.extNetAmount" value="0" type="BigDecimal"/> <set field="fact.extShippingAmount" value="0" type="BigDecimal"/> @@ -206,19 +209,20 @@ under the License. <set field="fact.GSP" value="0" type="BigDecimal"/> <set field="fact.GP" value="0" type="BigDecimal"/> + <set field="fact.countOrder" value="0" type="BigDecimal"/> + <!-- extGrossAmount --> - <entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> - <condition-list combine="and"> - <condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/> - <condition-expr field-name="uomIdTo" operator="equals" value="USD"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </entity-condition> - <if-not-empty field="UomConversionDatedList"> - <first-from-list entry="UomConversion" list="UomConversionDatedList"/> + <set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/> + <set field="convertUomCurrencyMap.uomIdTo" value="USD"/> + <set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/> + <call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap"> + <result-to-field result-name="conversionFactor" field="exchangeRate"/> + </call-service> + + <if-not-empty field="exchangeRate"> <calculate field="unitPrice"> <calcop field="orderItem.unitPrice" operator="multiply"> - <calcop field="UomConversion.conversionFactor" operator="get"/> + <calcop field="exchangeRate" operator="get"/> </calcop> </calculate> @@ -230,34 +234,36 @@ under the License. </if-not-empty> <!-- extGrossCost --> - <entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> + <entity-condition entity-name="SupplierProduct" list="costs"> <condition-list combine="and"> - <condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/> - <condition-expr field-name="uomIdTo" operator="equals" value="USD"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> + <condition-expr field-name="productId" operator="equals" from-field="orderItem.productId"/> + <condition-expr field-name="availableThruDate" operator="equals" from-field="nullField"/> + <condition-expr field-name="minimumOrderQuantity" operator="equals" value="0"/> </condition-list> </entity-condition> - <if-not-empty field="UomConversionDatedList"> - <first-from-list entry="UomConversion" list="UomConversionDatedList"/> + <if-not-empty field="costs"> + <first-from-list entry="cost" list="costs"/> - <entity-and entity-name="SupplierProduct" list="costs"> - <field-map field-name="productId" from-field="orderItem.productId"/> - </entity-and> - <iterate list="costs" entry="cost"> - <if-compare field="cost.minimumOrderQuantity" operator="equals" value="0"> - <calculate field="costPrice"> - <calcop field="cost.lastPrice" operator="multiply"> - <calcop field="UomConversion.conversionFactor" operator="get"/> - </calcop> - </calculate> + <set field="convertUomCurrencyMap.uomId" from-field="cost.currencyUomId"/> + <set field="convertUomCurrencyMap.uomIdTo" value="USD"/> + <set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/> + <call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap"> + <result-to-field result-name="conversionFactor" field="exchangeRate"/> + </call-service> + + <if-not-empty field="exchangeRate"> + <calculate field="costPrice"> + <calcop field="cost.lastPrice" operator="multiply"> + <calcop field="exchangeRate" operator="get"/> + </calcop> + </calculate> - <calculate field="fact.extGrossCost"> - <calcop field="fact.quantity" operator="multiply"> - <calcop field="costPrice" operator="get"/> - </calcop> - </calculate> - </if-compare> - </iterate> + <calculate field="fact.extGrossCost"> + <calcop field="fact.quantity" operator="multiply"> + <calcop field="costPrice" operator="get"/> + </calcop> + </calculate> + </if-not-empty> </if-not-empty> <!-- extShippingAmount --> @@ -324,18 +330,17 @@ under the License. </if-not-empty> </iterate> <if-compare field="countGS" operator="equals" value="0"> - <entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> - <condition-list combine="and"> - <condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/> - <condition-expr field-name="uomIdTo" operator="equals" value="USD"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </entity-condition> - <if-not-empty field="UomConversionDatedList"> - <first-from-list entry="UomConversion" list="UomConversionDatedList"/> + <set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/> + <set field="convertUomCurrencyMap.uomIdTo" value="USD"/> + <set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/> + <call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap"> + <result-to-field result-name="conversionFactor" field="exchangeRate"/> + </call-service> + + <if-not-empty field="exchangeRate"> <calculate field="fact.GS"> <calcop field="orderHeader.grandTotal" operator="multiply"> - <calcop field="UomConversion.conversionFactor" operator="get"/> + <calcop field="exchangeRate" operator="get"/> </calcop> </calculate> </if-not-empty> @@ -372,45 +377,39 @@ under the License. <field-map field-name="orderId" from-field="orderHeader.orderId"/> </entity-and> - <entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> - <condition-list combine="and"> - <condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/> - <condition-expr field-name="uomIdTo" operator="equals" value="USD"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </entity-condition> - <if-not-empty field="UomConversionDatedList"> - <first-from-list entry="UomConversion" list="UomConversionDatedList"/> + <set field="warrantyPrice" value="0" type="BigDecimal"/> + <iterate list="orderAdjustments" entry="warranty"> + <if-compare field="warranty.orderAdjustmentTypeId" operator="equals" value="WARRANTY_ADJUSTMENT"> + <calculate field="warrantyPrice"> + <calcop field="warrantyPrice" operator="add"> + <calcop field="warranty.amount" operator="get"/> + </calcop> + </calculate> + </if-compare> + </iterate> + <calculate field="GSS"> + <calcop field="fact.extShippingAmount" operator="add"> + <calcop field="warrantyPrice" operator="get"/> + </calcop> + </calculate> + + <set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/> + <set field="convertUomCurrencyMap.uomIdTo" value="USD"/> + <set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/> + <call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap"> + <result-to-field result-name="conversionFactor" field="exchangeRate"/> + </call-service> + + <if-not-empty field="exchangeRate"> <calculate field="GSS"> - <calcop field="fact.extShippingAmount" operator="multiply"> - <calcop field="UomConversion.conversionFactor" operator="get"/> + <calcop field="GSS" operator="multiply"> + <calcop field="exchangeRate" operator="get"/> </calcop> </calculate> </if-not-empty> <set field="fact.GSS" from-field="GSS"/> - <!--<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> - <condition-list combine="and"> - <condition-expr field-name="uomId" operator="equals" value="orderHeader.currencyUom"/> - <condition-expr field-name="uomIdTo" operator="equals" value="USD"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </entity-condition> - <if-not-empty field="UomConversionDatedList"> - <first-from-list entry="UomConversion" list="UomConversionDatedList"/> - <calculate field="GSC"> - <calcop field="GSC" operator="multiply"> - <calcop field="UomConversion.conversionFactor" operator="get"/> - </calcop> - </calculate> - </if-not-empty> - <set field="fact.GSC" from-field="GSC"/>--> - - <calculate field="fact.GSP"> - <calcop field="GSS" operator="subtract"> - <calcop field="GSC" operator="get"/> - </calcop> - </calculate> + <set field="fact.GSP" from-field="GSS" type="BigDecimal"/> </if-compare> <!-- GP --> @@ -420,11 +419,27 @@ under the License. </calcop> </calculate> + <!-- countOrder --> + <set field="countOrder" value="0"/> + <entity-and entity-name="SalesOrderItemFact" list="checkCountOrderList"> + <field-map field-name="orderId" from-field="orderHeader.orderId"/> + </entity-and> + <iterate entry="checkCountOrder" list="checkCountOrderList"> + <if-not-empty field="checkCountOrder.countOrder"> + <if-compare field="checkCountOrder.countOrder" operator="not-equals" value="0"> + <set field="countOrder" value="1"/> + </if-compare> + </if-not-empty> + </iterate> + <if-compare field="countOrder" operator="equals" value="0"> + <set field="fact.countOrder" value="1" type="BigDecimal"/> + </if-compare> + <store-value value-field="fact"/> </if-compare> </simple-method> - <simple-method method-name="importSalesOrderData" short-description="Import Sales Order Data"> + <simple-method method-name="loadSalesOrderDataDaily" short-description="Load Sales Order Data Daily"> <now-date-to-env field="nowDate"/> <set field="yesterday" value="${groovy: import java.text.SimpleDateFormat; @@ -438,20 +453,24 @@ under the License. def today = sdf.format(nowDate); return today; }" type="Timestamp"/> - <log level="always" message="===== yesterday:${yesterday}"></log> - <log level="always" message="===== today:${today}"></log> + <set field="inMap.fromDate" from-field="yesterday"/> + <set field="inMap.thruDate" from-field="today"/> + <call-service service-name="importSalesOrderData" in-map-name="inMap"></call-service> + </simple-method> + + <simple-method method-name="importSalesOrderData" short-description="Import Sales Order Data"> <set-service-fields service-name="loadDateDimension" map="parameters" to-map="inMap"/> - <set field="inMap.fromDate" from-field="yesterday"/> - <set field="inMap.thruDate" from-field="today"/> + <set field="inMap.fromDate" from-field="parameters.fromDate"/> + <set field="inMap.thruDate" from-field="parameters.thruDate"/> <call-service service-name="loadDateDimension" in-map-name="inMap"/> <check-errors/> <entity-condition list="orderStatusList" entity-name="OrderStatus"> <condition-list combine="and"> <condition-expr field-name="statusId" value="ORDER_APPROVED"/> - <condition-expr field-name="statusDatetime" operator="greater-equals" from-field="yesterday"/> - <condition-expr field-name="statusDatetime" operator="less" from-field="today"/> + <condition-expr field-name="statusDatetime" operator="greater-equals" from-field="parameters.fromDate"/> + <condition-expr field-name="statusDatetime" operator="less" from-field="parameters.thruDate"/> </condition-list> </entity-condition> <iterate list="orderStatusList" entry="orderHeader"> @@ -461,4 +480,33 @@ under the License. <check-errors/> </iterate> </simple-method> + + <simple-method method-name="convertUomCurrency" short-description="Convert Uom Currency from UomConversionDated entity"> + <entity-condition entity-name="UomConversionDated" list="UomConversionDatedList"> + <condition-list combine="and"> + <condition-expr field-name="uomId" operator="equals" from-field="parameters.uomId"/> + <condition-expr field-name="uomIdTo" operator="equals" from-field="parameters.uomIdTo"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="parameters.nowDate"/> + <condition-expr field-name="thruDate" operator="greater" from-field="parameters.nowDate"/> + </condition-list> + <order-by field-name="-fromDate"/> + </entity-condition> + <if-not-empty field="UomConversionDatedList"> + <first-from-list entry="UomConversion" list="UomConversionDatedList"/> + <field-to-result field="UomConversion.conversionFactor" result-name="conversionFactor"/> + <else> + <entity-condition entity-name="UomConversionDated" list="UomConversionDatedLastestList"> + <condition-list combine="and"> + <condition-expr field-name="uomId" operator="equals" from-field="parameters.uomId"/> + <condition-expr field-name="uomIdTo" operator="equals" from-field="parameters.uomIdTo"/> + <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> + </condition-list> + </entity-condition> + <if-not-empty field="UomConversionDatedLastestList"> + <first-from-list entry="UomConversionLastest" list="UomConversionDatedLastestList"/> + <field-to-result field="UomConversionLastest.conversionFactor" result-name="conversionFactor"/> + </if-not-empty> + </else> + </if-not-empty> + </simple-method> </simple-methods> \ No newline at end of file Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/reports/SalesReportEvent.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/reports/SalesReportEvent.xml?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/reports/SalesReportEvent.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/reports/SalesReportEvent.xml Tue Feb 8 07:10:36 2011 @@ -25,47 +25,258 @@ <if-compare operator="equals" value="day" field="reportBy"> <if-not-empty field="thruDate"> <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> - <condition-list combine="and"> - <condition-expr field-name="orderDateYearMonthDay" operator="greater-equals" from-field="fromDate"/> - <condition-expr field-name="orderDateYearMonthDay" operator="less-equals" from-field="thruDate"/> + <condition-list combine="or"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearMonthDay" operator="greater-equals" from-field="fromDate"/> + <condition-expr field-name="orderDateYearMonthDay" operator="less-equals" from-field="thruDate"/> + </condition-list> + <condition-expr field-name="orderDateYearMonthDay" operator="equals" from-field="lastDate"/> </condition-list> + <select-field field-name="orderDateDateValue"/> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + <order-by field-name="-orderDateDateValue"/> </entity-condition> </if-not-empty> </if-compare> <if-compare operator="equals" value="week" field="reportBy"> - <calculate field="fromWeek"> - <calcop field="thruWeek" operator="subtract"> - <number value="3"/> - </calcop> - </calculate> <if-not-empty field="thruWeek"> - <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> - <condition-list combine="and"> - <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> - <condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" from-field="fromWeek"/> - <condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/> - </condition-list> - </entity-condition> + <if-compare field="thruWeek" operator="less-equals" value="3" type="Integer"> + <calculate field="lastYear"> + <calcop field="thisYear" operator="subtract"> + <number value="1"/> + </calcop> + </calculate> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" value="1"/> + <condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + <else> + <calculate field="fromWeek"> + <calcop field="thruWeek" operator="subtract"> + <number value="3"/> + </calcop> + </calculate> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" from-field="fromWeek"/> + <condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + </else> + </if-compare> </if-not-empty> </if-compare> <if-compare operator="equals" value="month" field="reportBy"> - <calculate field="fromMonth"> - <calcop field="thruMonth" operator="subtract"> - <number value="3"/> - </calcop> - </calculate> - <if-not-empty field="fromMonth"> - <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> - <condition-list combine="and"> - <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> - <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" from-field="fromMonth"/> - <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" from-field="thruMonth"/> - </condition-list> - </entity-condition> + <if-not-empty field="thruMonth"> + <if-compare field="thruMonth" operator="less-equals" value="3" type="Integer"> + <calculate field="lastYear"> + <calcop field="thisYear" operator="subtract"> + <number value="1"/> + </calcop> + </calculate> + + <if-compare field="thruMonth" operator="equals" value="3" type="Integer"> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="or"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="1"/> + <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="3"/> + </condition-list> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="equals" value="12"/> + </condition-list> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + </if-compare> + + <if-compare field="thruMonth" operator="equals" value="2" type="Integer"> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="or"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="1"/> + <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="2"/> + </condition-list> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="11"/> + <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="12"/> + </condition-list> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + </if-compare> + + <if-compare field="thruMonth" operator="equals" value="1" type="Integer"> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="or"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="equals" value="1"/> + </condition-list> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="10"/> + <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="12"/> + </condition-list> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + </if-compare> + <else> + <calculate field="fromMonth"> + <calcop field="thruMonth" operator="subtract"> + <number value="3"/> + </calcop> + </calculate> + <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> + <condition-list combine="and"> + <condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/> + <condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" from-field="fromMonth"/> + <condition-expr field-name="orderDateMonthOfYear" operator="less-equals" from-field="thruMonth"/> + </condition-list> + <select-field field-name="orderDateDescription"/> + <select-field field-name="orderDateDayName"/> + <select-field field-name="orderDateDayOfMonth"/> + <select-field field-name="orderDateMonthName"/> + <select-field field-name="orderDateYearName"/> + <select-field field-name="orderDateWeekOfYear"/> + <select-field field-name="orderDateYearMonthDay"/> + <select-field field-name="orderDateMonthOfYear"/> + <select-field field-name="salesChannelEnumId"/> + <select-field field-name="brand"/> + <select-field field-name="pod"/> + <select-field field-name="account"/> + <select-field field-name="quantity"/> + <select-field field-name="GS"/> + <select-field field-name="GMS"/> + <select-field field-name="GMP"/> + <select-field field-name="GSP"/> + <select-field field-name="GP"/> + <select-field field-name="countOrder"/> + </entity-condition> + </else> + </if-compare> </if-not-empty> </if-compare> </simple-method> - </simple-methods> Modified: ofbiz/trunk/applications/order/servicedef/services_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_olap.xml?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/servicedef/services_olap.xml (original) +++ ofbiz/trunk/applications/order/servicedef/services_olap.xml Tue Feb 8 07:10:36 2011 @@ -40,9 +40,25 @@ under the License. <attribute name="orderId" type="String" mode="IN" optional="false"/> </service> + <service name="loadSalesOrderDataDaily" auth="true" engine="simple" + location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="loadSalesOrderDataDaily" transaction-timeout="10000000"> + <description>Load Sales Order Data Daily.</description> + </service> + <service name="importSalesOrderData" auth="true" engine="simple" - location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="importSalesOrderData"> + location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="importSalesOrderData" transaction-timeout="10000000"> + <description>Import Sales Order Data.</description> + <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/> + <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/> + </service> + + <service name="convertUomCurrency" auth="true" engine="simple" + location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="convertUomCurrency"> <description>Import Sales Order Data.</description> + <attribute name="uomId" type="String" mode="IN" optional="false"/> + <attribute name="uomIdTo" type="String" mode="IN" optional="false"/> + <attribute name="nowDate" type="Timestamp" mode="IN" optional="false"/> + <attribute name="conversionFactor" type="Double" mode="OUT" optional="true"/> </service> -</services> +</services> \ No newline at end of file Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/CheckReportBy.groovy Tue Feb 8 07:10:36 2011 @@ -21,19 +21,48 @@ import javax.servlet.http.HttpServletReq import org.ofbiz.base.util.UtilValidate; reportBy = parameters.reportBy; +exportType = parameters.exportType; if (UtilValidate.isEmpty(parameters.fromDate)) { request.setAttribute("_ERROR_MESSAGE_", "Please select From Date."); return "error"; } -if (reportBy == "day") { - return "day"; -} else if (reportBy == "week") { - return "week"; -} else if (reportBy == "month") { - return "month"; -} else { - request.setAttribute("_ERROR_MESSAGE_", "Please select Report By."); - return "error"; +if (exportType == "pdf") { + if (reportBy == "day") { + return "dayPDF"; + } else if (reportBy == "week") { + return "weekPDF"; + } else if (reportBy == "month") { + return "monthPDF"; + } else { + request.setAttribute("_ERROR_MESSAGE_", "Please select Report By."); + return "error"; + } +} + +if (exportType == "excel") { + if (reportBy == "day") { + return "dayExcel"; + } else if (reportBy == "week") { + return "weekExcel"; + } else if (reportBy == "month") { + return "monthExcel"; + } else { + request.setAttribute("_ERROR_MESSAGE_", "Please select Report By."); + return "error"; + } +} + +if (exportType == "html") { + if (reportBy == "day") { + return "dayHTML"; + } else if (reportBy == "week") { + return "weekHTML"; + } else if (reportBy == "month") { + return "monthHTML"; + } else { + request.setAttribute("_ERROR_MESSAGE_", "Please select Report By."); + return "error"; + } } Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/SalesReport.groovy Tue Feb 8 07:10:36 2011 @@ -30,8 +30,9 @@ int year = cal.get(Calendar.YEAR); birtParameters = [:]; try { birtParameters.reportBy = parameters.reportBy; - birtParameters.fromDate = (Date.valueOf(fromDateStr))-3; + birtParameters.fromDate = (Date.valueOf(fromDateStr))-2; birtParameters.thruDate = Date.valueOf(fromDateStr); + birtParameters.lastDate = (Date.valueOf(fromDateStr))-7; birtParameters.thruWeek = week; birtParameters.thruMonth = month; birtParameters.thisYear = year; Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Tue Feb 8 07:10:36 2011 @@ -1160,9 +1160,15 @@ under the License. <request-map uri="checkReportBy"> <security https="true" auth="true"/> <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="CheckReportBy.groovy"/> - <response name="day" type="request" value="SalesReport.pdf"/> - <response name="week" type="request" value="SalesReportWeek.pdf"/> - <response name="month" type="request" value="SalesReportMonth.pdf"/> + <response name="dayPDF" type="request" value="SalesReport.pdf"/> + <response name="weekPDF" type="request" value="SalesReportWeek.pdf"/> + <response name="monthPDF" type="request" value="SalesReportMonth.pdf"/> + <response name="dayExcel" type="request" value="SalesReport.excel"/> + <response name="weekExcel" type="request" value="SalesReportWeek.excel"/> + <response name="monthExcel" type="request" value="SalesReportMonth.excel"/> + <response name="dayHTML" type="request" value="SalesReport.html"/> + <response name="weekHTML" type="request" value="SalesReportWeek.html"/> + <response name="monthHTML" type="request" value="SalesReportMonth.html"/> <response name="error" type="request-redirect" value="OrderPurchaseReportOptions"> <redirect-parameter name="fromDate"/> <redirect-parameter name="reportBy" from="parameters.reportDate"/> @@ -1170,15 +1176,39 @@ under the License. </request-map> <request-map uri="SalesReport.pdf"><security https="true" auth="true"/> <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> - <response name="success" type="view" value="SalesOrderReport"/> + <response name="success" type="view" value="SalesOrderReportPDF"/> </request-map> <request-map uri="SalesReportWeek.pdf"><security https="true" auth="true"/> <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> - <response name="success" type="view" value="SalesOrderReportWeek"/> + <response name="success" type="view" value="SalesOrderReportWeekPDF"/> </request-map> <request-map uri="SalesReportMonth.pdf"><security https="true" auth="true"/> <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> - <response name="success" type="view" value="SalesOrderReportMonth"/> + <response name="success" type="view" value="SalesOrderReportMonthPDF"/> + </request-map> + <request-map uri="SalesReport.excel"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportExcel"/> + </request-map> + <request-map uri="SalesReportWeek.excel"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportWeekExcel"/> + </request-map> + <request-map uri="SalesReportMonth.excel"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportMonthExcel"/> + </request-map> + <request-map uri="SalesReport.html"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportHTML"/> + </request-map> + <request-map uri="SalesReportWeek.html"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportWeekHTML"/> + </request-map> + <request-map uri="SalesReportMonth.html"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReportMonthHTML"/> </request-map> <request-map uri="NetBeforeOverheadReport.pdf"><security https="true" auth="true"/> <event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="NetBeforeOverheadReport.groovy"/> @@ -1935,9 +1965,15 @@ under the License. <view-map name="OpenOrderItemsReport" type="screen" page="component://order/widget/ordermgr/ReportScreens.xml#OpenOrderItemsReport"/> <view-map name="PurchasesByOrganizationReport" type="screenfop" page="component://order/widget/ordermgr/ReportScreens.xml#PurchasesByOrganizationReport" content-type="application/pdf" encoding="none"/> - <view-map name="SalesOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/pdf"/> - <view-map name="SalesOrderReportWeek" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/pdf"/> - <view-map name="SalesOrderReportMonth" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/pdf"/> + <view-map name="SalesOrderReportPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/pdf"/> + <view-map name="SalesOrderReportWeekPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/pdf"/> + <view-map name="SalesOrderReportMonthPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/pdf"/> + <view-map name="SalesOrderReportExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/vnd.ms-excel"/> + <view-map name="SalesOrderReportWeekExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/vnd.ms-excel"/> + <view-map name="SalesOrderReportMonthExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/vnd.ms-excel"/> + <view-map name="SalesOrderReportHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="text/html"/> + <view-map name="SalesOrderReportWeekHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="text/html"/> + <view-map name="SalesOrderReportMonthHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="text/html"/> <view-map name="NetBeforeOverheadOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/NetBeforeOverheadReport.rptdesign" content-type="application/pdf"/> <view-map name="ProductDemandOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/ProductDemandReport.rptdesign" content-type="application/pdf"/> <view-map name="OrderByReferrerReport" type="birt" page="component://order/webapp/ordermgr/reports/OrderByReferrer.rptdesign" content-type="application/pdf"/> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReport.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReport.rptdesign?rev=1068279&r1=1068278&r2=1068279&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReport.rptdesign (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/reports/SalesReport.rptdesign Tue Feb 8 07:10:36 2011 @@ -124,6 +124,16 @@ under the License. <property name="iconFile">/templates/blank_report.gif</property> <property name="layoutPreference">auto layout</property> <parameters> + <scalar-parameter name="reportBy" id="2051"> + <property name="valueType">static</property> + <property name="dataType">string</property> + <property name="distinct">true</property> + <property name="paramType">simple</property> + <property name="controlType">text-box</property> + <structure name="format"> + <property name="category">Unformatted</property> + </structure> + </scalar-parameter> <scalar-parameter name="fromDate" id="310"> <property name="valueType">static</property> <property name="isRequired">false</property> @@ -146,9 +156,10 @@ under the License. <property name="category">Unformatted</property> </structure> </scalar-parameter> - <scalar-parameter name="reportBy" id="2051"> + <scalar-parameter name="lastDate" id="2715"> <property name="valueType">static</property> - <property name="dataType">string</property> + <property name="isRequired">false</property> + <property name="dataType">date</property> <property name="distinct">true</property> <property name="paramType">simple</property> <property name="controlType">text-box</property> @@ -243,31 +254,36 @@ under the License. </structure> <structure> <property name="position">10</property> - <property name="name">quantity</property> + <property name="name">countOrder</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">11</property> - <property name="name">GS</property> + <property name="name">quantity</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">12</property> - <property name="name">GMS</property> + <property name="name">GS</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">13</property> - <property name="name">GMP</property> + <property name="name">GMS</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">14</property> - <property name="name">GSP</property> + <property name="name">GMP</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">15</property> + <property name="name">GSP</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">16</property> <property name="name">GP</property> <property name="dataType">integer</property> </structure> @@ -310,6 +326,10 @@ under the License. <text-property name="displayName">orderDateDescription</text-property> </structure> <structure> + <property name="columnName">countOrder</property> + <text-property name="displayName">countOrder</text-property> + </structure> + <structure> <property name="columnName">quantity</property> <text-property name="displayName">quantity</text-property> </structure> @@ -383,31 +403,36 @@ under the License. </structure> <structure> <property name="position">10</property> - <property name="name">quantity</property> + <property name="name">countOrder</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">11</property> - <property name="name">GS</property> + <property name="name">quantity</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">12</property> - <property name="name">GMS</property> + <property name="name">GS</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">13</property> - <property name="name">GMP</property> + <property name="name">GMS</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">14</property> - <property name="name">GSP</property> + <property name="name">GMP</property> <property name="dataType">integer</property> </structure> <structure> <property name="position">15</property> + <property name="name">GSP</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">16</property> <property name="name">GP</property> <property name="dataType">integer</property> </structure> @@ -427,6 +452,7 @@ try reportBy = params["reportBy"].value; fromDate = params["fromDate"].value; thruDate = params["thruDate"].value; + lastDate = params["lastDate"].value; thruWeek = params["thruWeek"].value; thruMonth = params["thruMonth"].value; thisYear = params["thisYear"].value; @@ -434,6 +460,7 @@ try methodContext.putEnv("reportBy", reportBy); methodContext.putEnv("fromDate", fromDate); methodContext.putEnv("thruDate", thruDate); + methodContext.putEnv("lastDate", lastDate); methodContext.putEnv("thruWeek", thruWeek); methodContext.putEnv("thruMonth", thruMonth); methodContext.putEnv("thisYear", thisYear); @@ -468,6 +495,7 @@ if (starschemas) pod = starschema.getString("pod"); account = starschema.getString("account"); + countOrder = starschema.getString("countOrder"); quantity = starschema.getString("quantity"); GS = starschema.getString("GS"); GMS = starschema.getString("GMS"); @@ -484,6 +512,7 @@ if (starschemas) row["orderDateWeekOfYear"] = orderDateWeekOfYear; row["orderDateDayName"] = orderDateDayName; row["orderDateDescription"] = orderDateDescription; + row["countOrder"] = countOrder; row["quantity"] = quantity; row["GS"] = GS; row["GMS"] = GMS; @@ -558,6 +587,10 @@ return true;]]></method> <property name="measureGroups"> <tabular-measure-group name="Summary Field" id="2041"> <property name="measures"> + <tabular-measure name="countOrder" id="2747"> + <expression name="measureExpression">dataSetRow["countOrder"]</expression> + <property name="dataType">integer</property> + </tabular-measure> <tabular-measure name="quantity" id="2042"> <expression name="measureExpression">dataSetRow["quantity"]</expression> <property name="dataType">integer</property> @@ -643,12 +676,14 @@ return true;]]></method> </styles> <page-setup> <simple-master-page name="Simple MasterPage" id="2"> - <property name="type">us-legal</property> + <property name="type">custom</property> + <property name="height">10in</property> + <property name="width">20in</property> <property name="orientation">landscape</property> - <property name="topMargin">0.25in</property> - <property name="leftMargin">0.25in</property> - <property name="bottomMargin">0.25in</property> - <property name="rightMargin">0.25in</property> + <property name="topMargin">0.5in</property> + <property name="leftMargin">0.5in</property> + <property name="bottomMargin">0.5in</property> + <property name="rightMargin">0.5in</property> <page-footer> <text id="3"> <property name="fontFamily">sans-serif</property> @@ -670,6 +705,91 @@ return true;]]></method> </label> <extended-item extensionName="Crosstab" extensionVersion="2.5.0" id="2554"> <property name="measures"> + <extended-item extensionName="MeasureView" id="2748"> + <property name="measure">countOrder</property> + <property name="detail"> + <extended-item extensionName="AggregationCell" id="2749"> + <property name="aggregationOnRow">Account/Account</property> + <property name="aggregationOnColumn">Date/orderDateDescription</property> + <property name="fontFamily">sans-serif</property> + <property name="backgroundColor">#FFEBCD</property> + <property name="textAlign">center</property> + <property name="content"> + <data id="2756"> + <structure name="numberFormat"> + <property name="category">Fixed</property> + <property name="pattern">#,##0</property> + </structure> + <property name="resultSetColumn">countOrder_Account/Account_Date/orderDateDescription</property> + </data> + </property> + </extended-item> + </property> + <property name="aggregations"> + <extended-item extensionName="AggregationCell" id="2750"> + <property name="aggregationOnRow">Account/Brand</property> + <property name="aggregationOnColumn">Date/orderDateDescription</property> + <property name="fontFamily">sans-serif</property> + <property name="backgroundColor">#87CEFA</property> + <property name="textAlign">center</property> + <property name="content"> + <data id="2751"> + <structure name="numberFormat"> + <property name="category">Fixed</property> + <property name="pattern">#,##0</property> + </structure> + <property name="resultSetColumn">countOrder_Account/Brand_Date/orderDateDescription</property> + </data> + </property> + </extended-item> + <extended-item extensionName="AggregationCell" id="2752"> + <property name="aggregationOnRow">Account/Pod</property> + <property name="aggregationOnColumn">Date/orderDateDescription</property> + <property name="fontFamily">sans-serif</property> + <property name="backgroundColor">#B0C4DE</property> + <property name="textAlign">center</property> + <property name="content"> + <data id="2753"> + <structure name="numberFormat"> + <property name="category">Fixed</property> + <property name="pattern">#,##0</property> + </structure> + <property name="resultSetColumn">countOrder_Account/Pod_Date/orderDateDescription</property> + </data> + </property> + </extended-item> + <extended-item extensionName="AggregationCell" id="2754"> + <property name="aggregationOnColumn">Date/orderDateDescription</property> + <property name="fontFamily">sans-serif</property> + <property name="backgroundColor">#6495ED</property> + <property name="textAlign">center</property> + <property name="content"> + <data id="2755"> + <structure name="numberFormat"> + <property name="category">Fixed</property> + <property name="pattern">#,##0</property> + </structure> + <property name="resultSetColumn">countOrder_Date/orderDateDescription</property> + </data> + </property> + </extended-item> + </property> + <property name="header"> + <extended-item extensionName="CrosstabCell" id="2757"> + <property name="content"> + <label id="2758"> + <property name="textAlign">center</property> + <text-property name="text">Order</text-property> + </label> + </property> + <property name="fontFamily">sans-serif</property> + <property name="fontSize">small</property> + <property name="fontWeight">bold</property> + <property name="backgroundColor">#ECE9D8</property> + <property name="textAlign">center</property> + </extended-item> + </property> + </extended-item> <extended-item extensionName="MeasureView" id="2556"> <property name="measure">quantity</property> <property name="detail"> @@ -935,7 +1055,7 @@ return true;]]></method> <property name="backgroundColor">#FFEBCD</property> <property name="textAlign">center</property> <property name="content"> - <data id="2583"> + <data id="2711"> <structure name="numberFormat"> <property name="category">Fixed</property> <property name="pattern">#,##0</property> @@ -954,12 +1074,12 @@ return true;]]></method> <property name="backgroundColor">#87CEFA</property> <property name="textAlign">center</property> <property name="content"> - <data id="2649"> + <data id="2713"> <structure name="numberFormat"> <property name="category">Fixed</property> <property name="pattern">#,##0</property> </structure> - <property name="resultSetColumn">GP_Account/Brand_Date/orderDateDescription</property> + <property name="resultSetColumn">Brand_GP</property> </data> </property> </extended-item> @@ -970,12 +1090,12 @@ return true;]]></method> <property name="backgroundColor">#B0C4DE</property> <property name="textAlign">center</property> <property name="content"> - <data id="2667"> + <data id="2712"> <structure name="numberFormat"> <property name="category">Fixed</property> <property name="pattern">#,##0</property> </structure> - <property name="resultSetColumn">GP_Account/Pod_Date/orderDateDescription</property> + <property name="resultSetColumn">Pod_GP</property> </data> </property> </extended-item> @@ -985,12 +1105,12 @@ return true;]]></method> <property name="backgroundColor">#6495ED</property> <property name="textAlign">center</property> <property name="content"> - <data id="2685"> + <data id="2714"> <structure name="numberFormat"> <property name="category">Fixed</property> <property name="pattern">#,##0</property> </structure> - <property name="resultSetColumn">GP_Date/orderDateDescription</property> + <property name="resultSetColumn">Grand_GP</property> </data> </property> </extended-item> @@ -1461,6 +1581,20 @@ return true;]]></method> </extended-item> </property> </extended-item> + <extended-item extensionName="LevelView" name="NewLevel View1" id="2759"> + <property name="level">Date/orderDateMonthOfYear</property> + <property name="member"> + <extended-item extensionName="CrosstabCell" id="2760"> + <property name="content"> + <data name="orderDateMonthOfYear" id="2761"> + <property name="resultSetColumn">orderDateMonthOfYear</property> + </data> + </property> + <property name="backgroundColor">#FFEBCD</property> + <property name="textAlign">center</property> + </extended-item> + </property> + </extended-item> <extended-item extensionName="LevelView" name="NewLevel View2" id="2594"> <property name="level">Date/orderDateMonthName</property> <property name="member"> @@ -1515,6 +1649,7 @@ return true;]]></method> <property name="header"> <extended-item extensionName="CrosstabCell" id="2555"/> </property> + <property name="fontFamily">sans-serif</property> <property name="backgroundColor">#FFFFFF</property> <property name="cube">BIC_DataCube</property> <list-property name="boundDataColumns"> @@ -2123,6 +2258,70 @@ return true;]]></method> }</expression> <property name="dataType">float</property> </structure> + <structure> + <property name="name">Account_GP</property> + <expression name="expression" type="javascript">data["GMP_Account/Account_Date/orderDateDescription"]+data["GSP_Account/Account_Date/orderDateDescription"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">Pod_GP</property> + <expression name="expression" type="javascript">data["GMP_Account/Pod_Date/orderDateDescription"]+data["GSP_Account/Pod_Date/orderDateDescription"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">Brand_GP</property> + <expression name="expression" type="javascript">data["GMP_Account/Brand_Date/orderDateDescription"]+data["GSP_Account/Brand_Date/orderDateDescription"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">Grand_GP</property> + <expression name="expression" type="javascript">data["GMP_Date/orderDateDescription"]+data["GSP_Date/orderDateDescription"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">countOrder_Account/Brand_Date/orderDateDescription</property> + <expression name="expression">measure["countOrder"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>Account/Brand</value> + <value>Date/orderDateDescription</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">countOrder_Account/Pod_Date/orderDateDescription</property> + <expression name="expression">measure["countOrder"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>Account/Pod</value> + <value>Date/orderDateDescription</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">countOrder_Date/orderDateDescription</property> + <expression name="expression">measure["countOrder"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>Date/orderDateDescription</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">countOrder_Account/Account_Date/orderDateDescription</property> + <expression name="expression">measure["countOrder"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>Account/Account</value> + <value>Date/orderDateDescription</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">orderDateMonthOfYear</property> + <expression name="expression">dimension["Date"]["orderDateMonthOfYear"]</expression> + <property name="dataType">string</property> + </structure> </list-property> </extended-item> </body> |
Free forum by Nabble | Edit this page |