Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deal with exportion report query with value has comma

LuffyApr 28 2021 — edited Apr 28 2021

Hi everyone,
My report query is :
<>code
select ROW_NUMBER() OVER (order by dl.com_number, dl.commodity_name desc) STT,
dl.com_number,
dl.unit,
dl.commodity_name,
dl.org,
dl.loc,
sum(nvl(dl.sl_ss, 0)) sl_ss,
sum(nvl(dl.sl_kk, 0)) sl_kk,
nvl(case
when sum(nvl(dl.sl_ss, 0) - nvl(dl.sl_kk, 0)) < 0 then
abs(sum(nvl(dl.sl_ss, 0) - nvl(dl.sl_kk, 0)))
end,0) SLCL_THUA,
nvl(case
when sum(nvl(dl.sl_ss, 0) - nvl(dl.sl_kk, 0)) > 0 then
sum(nvl(dl.sl_ss, 0) - nvl(dl.sl_kk, 0))
end,0) SLCL_THIEU,
NVL(dl.Bad_quality,0) Bad_quality,
dl.remarks remarks
--sum(nvl(dl.sl_ss,0) - nvl(dl.sl_kk, 0)) SL_CL
from (select ls.commodity_num com_number,
edu_emp_pub.Get_lov2(ls.unit, 'DVT') as unit,
ls.commodity_name,
ls.com_quantity as SL_SS,
0 as SL_KK,
o.name org,
l.name loc,
null Bad_quality,
'' remarks
from perp5.locations l,
perp5.organization_units o,
perp5.edu_com_list ls
where ls.oun_id = o.oun_id
and (ls.oun_id = :P312_OUN_ID_HH or :P312_OUN_ID_HH is null)
and ls.loc_id = l.loc_id
and ls.phy_inv_id = :P312_PHY_INV_ID
/*and (wfl_pkg.Check_Select2_String(edu_emp_pub.Get_List_Org('KKHH',
:EMP_ID,
'',
'KKHH'),
o.Oun_Id,
':') = 'TRUE')*/

**union all**  
**select ci.com\_number,**  
    **edu\_emp\_pub.Get\_lov2(ci.unit, 'DVT') as unit,**  
    **(select t.commodity\_name**  
     **from edu\_commodity t**  
     **where t.commodity\_num = ci.com\_number) commodity\_name,**  
    **0 as SL\_SS,**  
    **max(ci.com\_quantity) keep(dense\_rank last order by ci.id) as SL\_KK,**  
    **o.name org,**  
    **l.name loc,**  
    **case when ci.quality = 'true' then ci.low\_units end Bad\_quality,**  
    **ci.remarks**   
 **from perp5.locations     l,**  
    **perp5.organization\_units o,**  
    **--PERP5.EDU\_PHYSICAL\_INVENTORY pi,**  
    **perp5.EDU\_COM\_INVENTORY ci --,**  
**--perp5.edu\_com\_list   ls**  
 **where ci.loc\_id = l.loc\_id**  
  **and ci.oun\_id = o.oun\_id**  
  **and ci.phy\_inv\_id = :P312\_PHY\_INV\_ID**  
  **and (ci.oun\_id = :P312\_OUN\_ID\_HH or :P312\_OUN\_ID\_HH is null)**  
  **/\*and (wfl\_pkg.Check\_Select2\_String(edu\_emp\_pub.Get\_List\_Org('KKHH',**  
                            **:EMP\_ID,**  
                            **'',**  
                            **'KKHH'),**  
                **o.Oun\_Id,**  
                **':') = 'TRUE')\*/**  
**/\*      and ls.phy\_inv\_id = ci.phy\_inv\_id**  
**and ls.oun\_id = ci.oun\_id**  
**and ls.loc\_id = ci.loc\_id**  
**and ls.commodity\_num = ci.com\_number\*/**  
**/\*  and pi.type = :type**  
**and pi.phy\_inv\_id = :idDot**  
**and ci.oun\_id = :ounId**  
**and ci.loc\_id = :locId\*/**  
 **group by ci.com\_number,**  
     **o.name,**  
     **l.name,**  
     **ci.unit,**  
     **ci.phy\_inv\_id,**  
     **ci.quality,**  
     **ci.low\_units,**  
     **ci.remarks) dl**  

where 1 = 1
group by dl.com_number, dl.unit, dl.commodity_name, dl.org, dl.loc, dl.Bad_quality,
dl.remarks--,
<>/code
A problem related to function sum of value includes comma on web.
When I click a button that redirect to page in application = 0 and use request, it return file has nothing. I find a problem in my data which has a decimal value as 0,5 on web. When I test export xml from that report query on DB, and test local rtf layout, it is fine because of data has 0.5. I don't know how to fix that? Thank you for your time and in advance.
P/s: I try to convert my data to varchar, but it is not done for my rtf layout.

Comments

Post Details

Added on Apr 28 2021
0 comments
46 views