modules/org.openbravo.client.querylist/src-db/database/model/functions/OBCQL_LANGUAGE_CREATE.xml
author Carlos Aristu <carlos.aristu@openbravo.com>
Mon, 14 Dec 2015 16:26:16 +0100
changeset 28129 7c6686c84928
parent 9091 c4f1a5c7d7c2
permissions -rw-r--r--
fixes issue 31676: Some values are not shown in XLS format using MS Office

The detect cell type feature was not working properly for BigInteger values in Office after the Jasper Library Upgrade. A personalized format was applied causing the data not be shown when opening the report.

To solve this problem the detect cell type feature has been disabled. This way, by default, all the values in the XLS will be exported as strings.

This default configuration can be overriden at report level. As an example, the General Ledger Report and Trial Balance report have been updated properly. With this configuration, those reports are now using number formatting for the cells showing the BigDecimal values.
<?xml version="1.0"?>
  <database name="FUNCTION OBCQL_LANGUAGE_CREATE">
    <function name="OBCQL_LANGUAGE_CREATE" type="NULL">
      <parameter name="ep_instance_id" type="VARCHAR" mode="in">
        <default/>
      </parameter>
      <body><![CDATA[/*************************************************************************
* The contents of this file are subject to the Openbravo  Public  License
* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
* Version 1.1  with a permitted attribution clause; you may not  use this
* file except in compliance with the License. You  may  obtain  a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License  is  distributed  on  an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific  language  governing  rights  and  limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s):  ______________________________________.
************************************************************************/

  v_rowcount NUMBER;

BEGIN

  INSERT INTO obcql_query_column_trl
           (obcql_query_column_trl_id , obcql_query_column_id, ad_language,
            ad_client_id              , ad_org_id            , isactive   ,
            created                   , createdby            , updated    ,
            updatedby                 , name                 ,
            istranslated)
    SELECT get_uuid()                , qc.obcql_query_column_id, l.ad_language,
           qc.ad_client_id           , qc.ad_org_id            , qc.isactive,
           now()                     , qc.createdby            , now()        ,
           qc.updatedby              , qc.name                 ,
           'N'
    FROM obcql_query_column qc, ad_language l, ad_module m, obcql_widget_query wq, obkmo_widget_class wc
    WHERE l.isactive = 'Y'
      AND l.issystemlanguage = 'Y'
      AND wq.obcql_widget_query_id = qc.obcql_widget_query_id
      AND wc.obkmo_widget_class_id = wq.obkmo_widget_class_id
      AND m.ad_module_id = wc.ad_module_id
      AND m.ad_language != l.ad_language
      AND NOT EXISTS (SELECT 1 
                      FROM obcql_query_column_trl t
                      WHERE t.obcql_query_column_id = qc.obcql_query_column_id
                        AND t.ad_language = l.ad_language);

  v_rowcount:=SQL%ROWCOUNT;
  DBMS_OUTPUT.PUT_LINE('- OBCQL_LANGUAGE_CREATE: OBCQL_Query_Column_Trl ' || v_rowcount) ;
END OBCQL_LANGUAGE_CREATE
]]></body>
    </function>
  </database>