This content has been marked as final. Show 28 replies
Another option that might seem just as whacky, but just bare with me, this is the least hacky way I could come up with. Use jQuery in a dynamic action.
The advantage here is you don't have to modify the query and you can put all sorts of additional formatting in the one place without interfering with the existing functionality of the interactive reports.
Edited by: Capt. Egg on 8/05/2012 20:05
Doesn't work for me.. I tried building the Dynamic action with multiple columns names.. Here is the modified query being used (original query did NOT produce the %'s.. They were computed items)
, DECODE(CurrBal,0,0,(LowVal/CurrBal ) * 100) AS LowPercent
, DECODE(CurrBal,0,0,(HighVal/CurrBal ) * 100) AS HighPercent
, DECODE(CalcCurrBal,0,0,(LossHigh/CalcCurrBal) * 100) AS LossHighPercent
, DECODE(CalcCurrBal,0,0,(LossLow/CalcCurrBal ) * 100) AS LossLowPercent
, 1 as order_by
, Pool Pool_order
, Sum(Current_Balance) AS CurrBal
, Sum(Low_Value) AS LowVal
, Sum(High_Value) AS HighVal
, Sum(Calculated_Cumm_Loss_High) AS LossHigh
, Sum(Calculated_Cumm_Loss_Low) AS LossLow
, Sum(Current_Balance_to_Calc_Cumm_L) AS CalcCurrBal
GROUP BY Pool, Perf_Non_Perf
order by pool
In interactive report we have break control on Pool.
I have built the DA with this as the action to run on region refresh:
Looks like the problem with computed items is that APEX creates it's own headers attribute not related to the specified column name (I just tried one and got headers="APXWS_CC_001"). As long as the column TD tag has the attribute headers="COLUMN_NAME" then it should work.
You could still use this method with computed columns, but then if someone creates their own custom report with computed columns they will get formatted in the same way... so if you want to use this method it's safest to put that column into the SQL.
Just to specify, I have REMOVED The computed columns. The calculation is done via the query. With that out of the way, the column header is defined as LowPercent Dynamic action is defined as
Fire on page load is set, action is set to execute AFTER region refresh, Event scope is live...
No % is being appended, I look in firebug at each displayed value for this column and am seeing NO % appended
(Just to jump ahead with ideas.. I can NOT post copy of application and code on Oracle's hosted site due to the nature of data..)