Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Tuesday, June 17, 2014

Rounding issue in XMLP Report output

Hi Friends,

I have a xmlp report which is giving excel output.

Opening Balance
-----------------
208,708,625.62
11,896,120.30
55,886,126.41
57,103,938.52
9,529,484.00
----------------
343,124,295.00 :Total
-------------------

When we sum all 5 values it shows 343,124,294.85 but it is rounded of why?

Opening balance is rounded in query. and total is summary column of that column.

In rtf used same format for both. #,##0.00

Query:

SELECT fc.segment2 asset_major_category,round(sum(a.cost),2) opening_balance ,round(sum(a.deprn_reserve),2) depreciation_reserve
FROM xxst_FA_RESERVEr_LEDGER_GT a
,FA_ADDITIONS b
,fa_categories fc
,(select max(b.request_id) req_id from xxst_fa_reserver_ledger_gt b) sq
where a.asset_id(+)=b.asset_id
and fc.category_id=b.asset_category_id(+)
and (a.request_id=sq.req_id or a.request_id is null)
and a.request_id(+)!=-1
group by fc.segment2
order by 1;

This will display opening_balance.
Then in rdf I took one summary column CS_OPENING_BALANCE
which is data type Number and source as opening_balance.

In rtf i took two form fields and put type as Number and format is #,##0.00 

Solution
------------

After trying lot of times Finally I find the mistake.

For CS_OPENING_COST width is 10. that's why it displays only 343,124,295.00

now i increased it to 20. now it showing 343,124,294.85


Hope this will help you...

Let me know if I am wrong...

Caused by: java.lang.ClassCastException: oracle.xdo.parser.v2.XSLNode cannot be cast error in xmlp

Dear All,

When I click on Preview --> Excel in rtf I got below error.


java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLS tylesheet(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unk nown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(U nknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generat eFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generat eFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unkn own Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unkn own Source)
at RTF2PDF.runRTFto(RTF2PDF.java:629)
at RTF2PDF.runXDO(RTF2PDF.java:470)
at RTF2PDF.main(RTF2PDF.java:289)
Caused by: java.lang.ClassCastException: oracle.xdo.parser.v2.XSLNode cannot be cast to oracle.xdo.parser.v2.XSLSort
at oracle.xdo.parser.v2.XSLProcessor.reportException( XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet (XSLProcessor.java:571)
... 14 more

In rtf i used <?if:CF_INDIA_RESP='Y'?>
Data tags
<?end if?>

And after that I used another condition.

<?if: CF_INDIA_RESP= 'N'?>
Data tags
<?end if?>



Solution
----------------


I changed the END tag place, Now it is coming fine. 

How to Display Responsibility Name in Report Output?

Hi All,

Recently I came across a requirement to display Responsibility Name in Report Output.

For that in rdf I took one place holder column (CP_RESP_NAME) and in before report trigger I wrote below code.

CP_RESP_NAME:=FND_PROFILE.VALUE('RESP_NAME');

 So through profile value we are getting.

Then place <?CP_RESP_NAME?> tag in rtf to display responsibility name dynamically.

Assume that there 3 responsibilities XX Payables Resp1, XX Payables Resp2, XX Payables Resp3

So If you run this report through XX Payables Resp1 then we can see XX Payables Resp1 in output,
If you run this report through XX Payables Resp3 then we can see XX Payables Resp3 in output.

Hope this will useful for you....