Bug fixed 0004683: In some jasper reports date format is hardcoded
authorDavid Abragimov <david.abragimov@opensuite.com>
Tue, 02 Dec 2008 16:06:07 +0000
changeset 2199 efd783b991af
parent 2198 7768a42afb89
child 2200 571214b4866b
Bug fixed 0004683: In some jasper reports date format is hardcoded
src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportShipmentEdition.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchase.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchaseForeign.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSale.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSaleForeign.jrxml
src/org/openbravo/erpReports/C_OrderJR.jrxml
src/org/openbravo/erpReports/RptC_Invoice.jrxml
src/org/openbravo/erpReports/RptC_OrderPO.jrxml
src/org/openbravo/erpReports/RptC_Remittance.jrxml
src/org/openbravo/erpReports/RptC_Remittance_Lines.jrxml
src/org/openbravo/erpReports/RptM_Requisition.jrxml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -43,6 +43,10 @@
 		<parameterDescription><![CDATA[Address Organization]]></parameterDescription>
 		<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
 	</parameter>
+	<parameter name="DATEFORMATTER" isForPrompting="false" class="java.text.DateFormat">
+		<defaultValueExpression ><![CDATA[$P{REPORT_FORMAT_FACTORY}.createDateFormat("", $P{REPORT_LOCALE}, $P{REPORT_TIME_ZONE})]]></defaultValueExpression>
+	</parameter>
+	<parameter name="LOCALE" isForPrompting="false" class="java.util.Locale"/>
 	<queryString><![CDATA[SELECT buspar.name as BusinessPartner,buspar.taxid,buspar.fiscalcode,Loc.ADDRESS1,Loc.POSTAL,City.NAME as City,City.LOCODE,
  debpaycancel.DATEPLANNED,bank.Name,bank.Codebank,bank.Codebranch,bank.Digitcontrol as DigitcontrolBank,bankaccount.Digitcontrol as DigitcontrolBankAccount,bankaccount.Codeaccount,
  coalesce ( sum(invoic.TOTALLINES),0) as SummedLineAmount,
@@ -136,7 +140,7 @@
 		</columnHeader>
 		<detail>
 			<band height="600"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" pattern="dd/MM/yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						x="0"
 						y="545"
@@ -149,7 +153,7 @@
 					<textElement>
 						<font fontName="Courier New" size="10"/>
 					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[$P{AddressOrganization} + new SimpleDateFormat ("dd/mm/yyyy").format(new Date()).toString()]]></textFieldExpression>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$P{AddressOrganization}+ " " + $P{DATEFORMATTER}.format(new Date())]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -411,7 +415,7 @@
 					<textElement>
 						<font fontName="Courier New"/>
 					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA["On : "+ new SimpleDateFormat ("dd/mm/yyyy").format($F{DATEPLANNED}).toString()]]></textFieldExpression>
+				<textFieldExpression   class="java.lang.String"><![CDATA["On : "+ $P{DATEFORMATTER}.format($F{DATEPLANNED})]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -298,7 +298,7 @@
 		</columnHeader>
 		<detail>
 			<band height="16"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="6"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -425,7 +425,7 @@
 						stretchType="RelativeToBandHeight"/>
 					<graphicElement stretchType="RelativeToBandHeight" pen="1Point"/>
 				</line>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Header"
 						x="420"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -517,7 +517,7 @@
 					</textElement>
 				<text><![CDATA[DATE]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="GroupHeader_DarkGray"
 						x="686"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -557,7 +557,7 @@
 					</textElement>
 				<text><![CDATA[ORDER DATE]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="100"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -425,7 +425,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCUMENTNO}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="GroupHeader_DarkGray"
 						x="307"
@@ -1015,7 +1015,7 @@
 						key="line"/>
 					<graphicElement stretchType="NoStretch" pen="1Point"/>
 				</line>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="90"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -422,7 +422,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCUMENTNO}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="GroupHeader_DarkGray"
 						x="418"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentEdition.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentEdition.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -360,7 +360,7 @@
 					</textElement>
 				<text><![CDATA[Shipment date:]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="GroupHeader_DarkGray"
 						x="391"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchase.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchase.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -492,7 +492,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{REFERENCE}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="100"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchaseForeign.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoicePurchaseForeign.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -492,7 +492,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{REFERENCE}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="100"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSale.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSale.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -491,7 +491,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCUMENTNO}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="100"
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSaleForeign.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceSaleForeign.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -495,7 +495,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCUMENTNO}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="100"
--- a/src/org/openbravo/erpReports/C_OrderJR.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/C_OrderJR.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -352,7 +352,7 @@
 					</textElement>
 				<text><![CDATA[Date]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						x="390"
 						y="196"
@@ -458,7 +458,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						x="242"
 						y="10"
--- a/src/org/openbravo/erpReports/RptC_Invoice.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/RptC_Invoice.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -250,7 +250,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$F{DOCUMENTNO}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="384"
@@ -537,7 +537,7 @@
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
 				</textField>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="231"
--- a/src/org/openbravo/erpReports/RptC_OrderPO.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/RptC_OrderPO.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -530,7 +530,7 @@
 					</textElement>
 				<text><![CDATA[printed on]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="205"
--- a/src/org/openbravo/erpReports/RptC_Remittance.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/RptC_Remittance.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -278,7 +278,7 @@
 						stretchType="RelativeToBandHeight"/>
 					<graphicElement stretchType="RelativeToBandHeight" pen="1Point"/>
 				</line>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Group_Data_Field"
 						x="130"
@@ -631,7 +631,7 @@
 						key="line"/>
 					<graphicElement stretchType="NoStretch" pen="1Point"/>
 				</line>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="277"
--- a/src/org/openbravo/erpReports/RptC_Remittance_Lines.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/RptC_Remittance_Lines.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -306,7 +306,7 @@
 		</columnHeader>
 		<detail>
 			<band height="16"  isSplitAllowed="true" >
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="Detail_Line"
 						x="0"
--- a/src/org/openbravo/erpReports/RptM_Requisition.jrxml	Tue Dec 02 15:53:57 2008 +0000
+++ b/src/org/openbravo/erpReports/RptM_Requisition.jrxml	Tue Dec 02 16:06:07 2008 +0000
@@ -404,7 +404,7 @@
 					</textElement>
 				<text><![CDATA[printed on]]></text>
 				</staticText>
-				<textField isStretchWithOverflow="false" pattern="dd-MM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
 						style="default"
 						x="205"