Html in apex

Hi,
I am on version 4.1.1.00.23 of APEX.  I am trying to bold text in a query on a region on a page.  I will send query.  The funny thing is  it works on one page but not on my new page. I even copy the exact region with the exact query that works on one page to the new page but it will not work. Is there a trick to this. I am just trying to get the word Totals: to be bold. See below.
SElect  case null when null then '<span style="font-weight:bold"> Totals: </span>' else '<span style="font-weight:bold"> Totals: </span>' end "Pvperiod"
,to_number( GET_CONS_PERCENT(1,'AUS',0,:P56_CYEAR)) "AUS"
, to_number(GET_CONS_PERCENT(1,'AT',0,:P56_CYEAR)) "AT"
,to_number( GET_CONS_PERCENT(1,'BM',0,:P56_CYEAR)) "BM"
, to_number(GET_CONS_PERCENT(1,'BS',0,:P56_CYEAR)) "BS"
, to_number(GET_CONS_PERCENT(1,'BRN',0,:P56_CYEAR)) "BRN"
, to_number(GET_CONS_PERCENT(1,'CAN',0,:P56_CYEAR)) "CAN"
, to_number(GET_CONS_PERCENT(1,'DE',0,:P56_CYEAR)) "DE"
, to_number(GET_CONS_PERCENT(1,'FR',0,:P56_CYEAR)) "FR"
,to_number( GET_CONS_PERCENT(1,'IDN',0,:P56_CYEAR)) "IDN"
, to_number(GET_CONS_PERCENT(1,'IE',0,:P56_CYEAR)) "IE"
, to_number(GET_CONS_PERCENT(1,'MEX',0,:P56_CYEAR)) "MEX"
, to_number(GET_CONS_PERCENT(1,'MY',0,:P56_CYEAR)) "MY"
, to_number(GET_CONS_PERCENT(1,'NL',0,:P56_CYEAR)) "NL"
, to_number(GET_CONS_PERCENT(1,'NZ',0,:P56_CYEAR)) "NZ"
, to_number(GET_CONS_PERCENT(1,'PH',0,:P56_CYEAR)) "PH"
, to_number(GET_CONS_PERCENT(1,'SG',0,:P56_CYEAR)) "SG"
, to_number(GET_CONS_PERCENT(1,'TT',0,:P56_CYEAR)) "TT"
, to_number(GET_CONS_PERCENT(1,'UK',0,:P56_CYEAR)) "UK"
, to_number(GET_CONS_PERCENT(1,'USA',0,:P56_CYEAR)) "USA"
, to_number(GET_CONS_PERCENT(2,'WOR',0,:P56_CYEAR)) "WORLD"
, to_number(GET_CONS_PERCENT(3,'INT',0,:P56_CYEAR)) "INTNL_ONLY"
FROM DUAL
union
select to_char(pvperiod) "pvperiod"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AUS'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'AUS'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AUS'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AUS'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "AUS"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AT'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'AT'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AT'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='AT'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "AT"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BM'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'BM'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BM'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BM'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "BM"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BS'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'BS'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BS'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BS'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "BS"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BRN'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'BRN'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BRN'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='BRN'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "BRN"        
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='CAN'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'CAN'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='CAN'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='CAN'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "CAN"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='DE'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'DE'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='DE'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='DE'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "DE"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='FR'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'FR'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='FR'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='FR'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "FR"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IDN'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'IDN'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IDN'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IDN'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "IDN"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IE'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'IE'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IE'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='IE'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "IE"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MEX'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'MEX'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MEX'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MEX'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "MEX"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MY'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'MY'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MY'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='MY'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "MY"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NL'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'NL'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NL'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NL'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "NL"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NZ'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'NZ'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NZ'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='NZ'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "NZ"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='PH'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'PH'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='PH'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='PH'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "PH"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='SG'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'SG'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='SG'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='SG'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "SG"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='TT'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'TT'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='TT'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='TT'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "TT"       
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='UK'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'UK'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='UK'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='UK'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "UK"
, (CASE WHEN (select (m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='USA'
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select (m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) = 'USA'
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='USA'
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select (m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) ='USA'
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "USA"
, (CASE WHEN (select SUM(m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country)
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select SUM(m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country)
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select SUM(m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country)
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select SUM(m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country)
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "WORLD"
, (CASE WHEN (select SUM(m1.total)  from dw_data.metrics m1
               where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country WHERE country <> 'USA')
               and m1.pvperiod = m.pvperiod - 100 ) > 0
        THEN (round((NVL((select SUM(m1.total)
                          from dw_data.metrics m1
                          where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country WHERE country <> 'USA')
                          and m1.pvperiod= m.pvperiod),0)
              - NVL((select SUM(m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country WHERE country <> 'USA')
                     and m1.pvperiod = m.pvperiod - 100 ),0))
              / NVL((select SUM(m1.total)
                     from dw_data.metrics m1
                     where trim(m1.item) = 35 and m1.seq = 'c' and trim(m1.country) in (select distinct trim(country) from   wd_country WHERE country <> 'USA')
                     and m1.pvperiod = m.pvperiod - 100 ),0),4)*100)
        ELSE 0
        END) "INTNL ONLY"        
from dw_data.metrics m,    wd_country c
where m.item = 13
and trim(m.country) = trim(c.country)
and m.pvperiod between SUBSTR(:P56_CYEAR,1,4) || '01' and :P56_CYEAR
and m.pvperiod =c.bonus_period
group by m.pvperiod;

Pam wrote:
Hi,
I am on version 4.1.1.00.23 of APEX.  I am trying to bold text in a query on a region on a page.  I will send query.  The funny thing is  it works on one page but not on my new page. I even copy the exact region with the exact query that works on one page to the new page but it will not work. Is there a trick to this. I am just trying to get the word Totals: to be bold. See below.
SElect  case null when null then '<span style="font-weight:bold"> Totals: </span>' else '<span style="font-weight:bold"> Totals: </span>' end "Pvperiod"
Why the useless case expression?
What kind of region?
What theme is being used?
What page/region/report templates are used?
What browser(s)/version(s) are being used?
What does a web inspector show as the HTML rendered and CSS applied for the "Totals:" text?

Similar Messages

  • Putting HTML around APEX items

    Gday,
    I am trying to convert the following HTML to APEX. I am trying to put the html around the APEX items but I cannot get them to sit properly in the tables.
    Can I put html around the APEX items? Or can I put in the HTML and access the objects via APEX?
    <TABLE WIDTH="100%" HEIGHT="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
       <TR ALIGN="CENTER">
          <TD HEIGHT="100%" VALIGN="MIDDLE" ALIGN="CENTER" WIDTH="100%" >
             <TABLE WIDTH="250" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
                <TR>
                   <TD COLSPAN="3" HEIGHT="2" BGCOLOR="#336699"><IMG SRC="/i/spacer.gif" HEIGHT="2" BORDER="0"></TD>
                </TR>
                <TR>
                   <TD WIDTH="2" BGCOLOR="#336699"><IMG SRC="/i/spacer.gif" WIDTH="2" BORDER="0"></TD>
                   <TD>
                      <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" BORDERCOLOR="#336600">
                         <TR>
                            <TD VALIGN="MIDDLE" ALIGN="CENTER" ROWSPAN="3" bgcolor="#000000">
                               <img src="/i/logo.gif" border="0"  alt="logo" title="logo"><br>
                               <h3><font color="#FFFFFF">Login Page</font></h3>
                            </TD>
                            <TD WIDTH="2" BGCOLOR="#336699" ROWSPAN="3"><IMG SRC="/i/spacer.gif" WIDTH="2" BORDER="0"></TD>
                            <TD VALIGN="MIDDLE">
                               <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
                                                      <TR>
                                                           <TD HEIGHT="5"><IMG SRC="/i/spacer.gif" HEIGHT="5" BORDER="0"></TD>
                                                      </TR>
                                                      <TR>
                                                           <TD VALIGN="MIDDLE"> Username: </TD>
                                                           <TD VALIGN="TOP"><INPUT TYPE="text" NAME="p3_username"></TD>
                                                      </TR>
                                                      <TR>
                                                           <TD VALIGN="MIDDLE"> Password: </TD>
                                                           <TD VALIGN="TOP">
                                                  <INPUT TYPE="PASSWORD" NAME="p3_password" maxlength=15>
                                     </TD>
                                                      </TR>
                                                      <TR>
                                                           <TD HEIGHT="5"><IMG SRC="/i/spacer.gif" HEIGHT="5" BORDER="0"></TD>
                                                      </TR>
                                                      <TR>
                                                           <TD> </TD>
                                                           <TD HEIGHT="25" VALIGN="BOTTOM">
                                                              <INPUT NAME="p3_submit" TYPE="submit" value=" Login ">
                                                           </TD>
                                                      </TR>
                                                      <TR>
                                                           <TD HEIGHT="5"><IMG SRC="/i/spacer.gif" HEIGHT="5" BORDER="0"></TD>
                                                      </TR>
                                 </TABLE>
                            </TD>
                         </TR>
                               <TR>
                                            <TD HEIGHT="2" BGCOLOR="#336699" COLSPAN="4"><IMG SRC="/i/spacer.gif" HEIGHT="2" BORDER="0"></TD>
                                       </TR>
                                       <TR>
                            <TD HEIGHT="34" COLSPAN="3" ALIGN="LEFT" NOWRAP>
                                Enter Username and Password 
                               <br>
                               <center>
                                  <A href="security.changepass" title="Change Password">Change Password</a></center>
                            </TD>
                         </TR>
                      </TABLE>
                   </TD>
                   <TD WIDTH="2" BGCOLOR="#336699"><IMG SRC="/i/spacer.gif" WIDTH="2" BORDER="0"></TD>
                </TR>
                <TR>
                   <TD COLSPAN="3" HEIGHT="2" BGCOLOR="#336699"><IMG SRC="/i/spacer.gif" HEIGHT="2" BORDER="0"></TD>
                </TR>
             </TABLE>
    <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>Cheers

    And like I said I basically want to put APEX text items inside Oracle HTMLAPEX can only handle items [created declaratively through the App Builder|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/app_comp.htm#CHDGFCGB] or programmatically using the [APEX_ITEM API|http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_item.htm#CACEEEJE].
    It looks like you want to create a Login Page. This is a standard APEX page type that can be created from the application home page: click Create Page >, select Login Page, and complete the wizard. The look and feel of this page is controlled by standard APEX [page layout techniques|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/ui.htm#BABJIECG], and the [themes, templates and CSS|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#CJABAEIE] applied. To achieve the required appearance in APEX, page and region templates and CSS can be modified to contain the necessary HTML and properties.
    Try experimenting a bit with the above. If you hit problems, raise new threads dealing with specific, discrete issues...

  • Page breaks in (html) printed apex report

    I am having a strange problem that appears to be related to APEX page template.
    I have a report that is html generated by a PL/SQL function. I need to have page breaks in the printed report at specific locations. I am adding this style to the html output of the function:
    <STYLE>
    DIV.pageBreak { page-break-before: always; }
    </STYLE>
    and I insert this at the locations I need breaks:
    < D I V CLASS="pageBreak"/>
    (without the spaces in DIV)
    (found this technique here: http://www.unagibay.com/DesktopDefault.aspx?tabindex=1&tabid=100&itemid=1821 )
    This works perfect when I run the report in IE, but FireFox is "ignoring" the page breaks. However, if I take just the output of the PL/SQL function in an html doc, FireFox works fine (breaks at the proper places). This makes me believe something related to the "page wrapper" content generated by APEX causes FireFox to not handle the breaks.
    I have tried copying and editing the Popup and Printer Friendly page templates, but I either remove too much and the page doesn't render, or the page breaks don't work.
    My questions for the APEX gurus are:
    1. Is there an "approved" way to get page breaks in the printed version of an APEX report, or is there a better way to do what I need to do.
    2. What is the minimum contents for a page template (what can I safely remove).
    Thanks,
    Bill

    Hi Owen,
    the page breaks are inserted before/after the section.  Expand the report structure window and make sure that the properties window is open below.  Once you click on the section part, you will see where you can insert the page breaks - the check boxes will appear in the properties.
    yes on the second part - just insert the page break between the data providers and then repeat the header for the data provider on the pages (also check boxes on the properties tab)
    Good luck

  • Problem rendering html in Apex 3.1

    I recently upgraded an older 2.0 app to Apex 3.1. In the app, I have a few textarea with html editor fields so the user can customize page instructions. In 2.0, I was able to query the database and store the text in a hidden item, then reference the value of that item in an html region for the text to render correctly. (EX: Region Header has a source of &P100_HEADER_TEXT.)
    Now, in Apex 3.1, this no longer works. Instead, it is showing all of the html tags. If I copy and paste the contents of the hidden value directly, the html is rendered. If I change the hidden item to display as text, it is formatted correctly, but the alignment I had set up previously is off.
    I have numerous regions like this and would like to avoid having to go through and reformat all my pages. Does anyone have any suggestions?
    Thanks!

    Hi Scott,
    Yes, I was able to get it to work by adjusting my item to display as text (does not save state). However, previously I was able to compute a hidden item and use the value of the item as the source of an html region, or header for any other region, and it would render correctly. So, if the value of item p100_directions was "Please enter all valid information" in bold, previously it would display in bold. After the upgrade, it would display with the html tags around it.
    I will workaround with the display as text functionality.
    Thanks!

  • How to Display IMAGE BLOB stored in a table in a html region APEX

    Need to know how to display an image stored in a table in a HTML APEX Region.
    Please

    Hi
    Please explain what you mean by it doesn't work?
    Are there errors messages, at what point, how far did you get and exactly what did you do????
    Please provide more information.
    Thanks
    Ben

  • Bug in rendering  HTML content Apex 2.2 (in Apex 2.0 was OK)

    We have many PLSQL processes which are called through boolean function which return some message as well as the result.
    <br>
    function some_func (pid IN NUMBER,err_msg OUT NOCOPY VARCHAR2) RETURN BOOLEAN;<br>
    and at the end function looks like:
    <br>
      :err_msg := 'Pitanje <*b>'||TO_CHAR(p_id)||'<*/b> je OK!';
      RETURN TRUE;<br>
    Later, in "On load before header", we call this function and assign "err_msg" value to hidden item "P2_MESSAGE", placed on the same page. Assigment is done in an way like:
    <br>
      some_bool:=some_func (:P2_ID,:P2_MESSAGE);<br>
    In one HTML reagion, we put in "Source", code like:
    <br>
    <*class="t16dataalt">&P2_MESSAGE.</class><br>
    and until now, bold tags are applied as well as class-we get only text!
    <br>
    But now, in Apex 2.2, (original theme 16 used) in result we get all content as it is not recognized as HTML code.
    <br>
    In browser the result(in a case of OK result) is:
    <br>
    Pitanje <*b>1<*/b> je OK!<br>
    and the generated source is:
    <br>
    <*class="*t16dataalt">Pitanje &*lt;*b&*gt;1&*lt;/b&*gt; je OK!</*class="*t16dataalt"><br>
    Is that a bug or what?
    <br>
    Once more, before the same code was working nice, theme 2 used...
    <br>
    THX!
    <br>
    P.S
    <br>
    "*" is added to be read clearly!
    <br>
    P.S II
    <br>
    We have imported app that was exported on Apex 2.0 and the same problem occure!
    <br>
    So we think this is a bug in rendering HTML region!
    <br>
    Is there any hint to overcome that until patch come ?
    Message was edited by:
    Funky

    The issue is easy to reproduce. Create HTML region:
    User Interface Template-Reports Region
    Display point-Page template body
    Assign one hiden item in on load process with value:
    P2_MESSAGE := "< b>OK</ b<>";
    Put P2_MESSAGE in HTML Source with content like this:
    < class="t16dataalt">&P2_MESSAGE.</ class>
    and you have it!

  • Get Dynamic HTML from Apex Page as CLOB

    Good Morning,
    I have two APEX pages that are designed to provide formatted report content; however, these are not intended to be navigable from within the application. In other words, I am not letting the user view the pages directly. Instead, their purpose is to generate dynamic content so that I can feed their HTML into a HTML to PDF converter so the generated PDF can be attached to an email and sent to clients. I have found that the easiest way to generate this report is directly in APEX, but I haven't yet found a way to just run the page via a PL/SQL API and retrieve the dynamic content into a CLOB so that I can send it to my converter utility. I have tried UTL_HTTP, but I am either using that API incorrectly, or the security context of the session is not proagating to the call (this is being performed in a secure APEX application), thus I receive the following error [ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1674 ORA-29024: Certificate validation failure]. I am using Apex version 3.2. Does anyone know a good and straight-forward API for doing what I need to accomplish? Thanks in advance.
    Erik

    To mimic the users session, you'd have to forward on the session cookies as part of the HTTP request.
    A simpler option:
    * Allow public access to the page
    * Apply an authorization scheme to the page that looks something like this...
    if owa_util.get_cgi_env('REMOTE_ADDR') = '127.0.0.1' then
      return true;
    else
      return false;
    end if;(PL/SQL Function Returning Boolean)
    Then when you perform the request in your code, use 127.0.0.1 instead of the host name.

  • SQL*PLUS VS HTML IGU APEX (Application Express 3.2.1.00.12)

    Hello,
    Could anybody gives me a clue about the following?
    Thanks for any help.
    Claude
    A did this:
    CREATE OR REPLACE TYPE "A" AS OBJECT (v_a NUMBER) NOT FINAL;
    CREATE OR REPLACE TYPE "B" UNDER A (v_b NUMBER);
    CREATE TABLE "TA" OF "A";
    INSERT INTO TA VALUES(A(1));
    ...some other similar inserts...
    INSERT INTO TA VALUES(B(1,2));
    Till now all is ok...but after I try to launch the following simple command:
    SELECT REF(p) FROM TA p;
    If I launch it from the SQL*PLUS the result is OK ->
    REF(P)
    000028020981708518CF81BCD2E040007F01011CDB81717581F4E5C8A9E040007F010109B1010000
    F40000
    000028020981708518CF82BCD2E040007F01011CDB81717581F4E5C8A9E040007F010109B1010000
    F40001
    000028020981708518CF83BCD2E040007F01011CDB81717581F4E5C8A9E040007F010109B1010000
    F40002
    If I launch it from theHTML IGU the APEX result is KO ->
    ORA-00932: inconsistent datatypes: expected NUMBER got REF CLASIE.A
    CF -> [Print screen IGU APEX|http://www.virgox.net/ref.png]
    My system:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    the problem is reproducoble on apex.oracle.com (current version 4.0.0.00.46)
    Who can say that it is BUG or FEATURE?
    ...meanwhile have to add check ACCOUNT_LOCKED = 'N' to custom auth function...

  • Javascript with Html-db (Apex)

    Hi everybody,
    My function is :
    <script language="JavaScript1.1" type="text/javascript">
    function desactiverElement(testString,item1,item2)
    { theTest= eval(testString);
    if(theTest)
    for (var i=1;i<4;i++)
    if (arguments)
    disItem = document.getElementById(arguments[i]);
    disItem.style.background = '#C0C0C0';
    disItem.disabled = true;
    else
    disItem = document.getElementById(arguments[i]);
    disItem.disabled = false;
    </script>
    on the page HTML Header, I put:
    OnLoad="javascript: desactiverElement(('document.getElementById(\'P32_ID_FEUILLET\').value != \'\'','P32_ID_FEUILLET','P32_NEQ');"
    It works. It works also when I refresh my page.
    But , when I click on my « create » button, my page is appears with the new data but my field are not still disable = false it comes enable.
    Can someone help me ?
    Thanks. Bye.

    Thank you very much Scott,
    It was my Character set of file that was set to Unicode. I change it to European.... and it works.
    I put my application "27331 - Feuillets" on dkubicek shema. My Onload is on page 32.
    I have some problem creating my tables. I have this message:
    ORA-01658: unable to create INITIAL extent for segment in tablespace FLOW_8897
    Thanks. Bye.

  • Best way to generate dynamic html in apex

    Hi all,
    I have to create a complex page in html with tables within tables, ajax and a very large number of items (text fields).
    Like to have your opinion to know what the best solution to create this page. The HTML within the PL / SQL makes it difficult to manage in future. There is another way to generate HTML code, without being inside of PL / SQL?

    Hi 819517,
    You should be able to get your desired effect using regions and sub regions.
    As you can create your own custom templates for both.
    You may find issues with more than 50 fields on your form.
    You can get round this by re using field names (as in a multi row form).
    If you are submitting more than a few hundred fields, you may need to look at the settings for modplsql in apache (if you are using it) as the maximum number of form fields is a setting in the conf file.
    Regards
    Michael

  • HTML in APEX Form

    Hello everyone,
    Can we desing the from on a page by using html tag and ıtem(select box, text area)?

    You can edit the source - but this will only add some custom markup above or below region items.
    What im saying is, you have one region for your three items, and then your items are grouped into that region. If the region template doesnt suit your needs, you can edit it to suit your needs - http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/themes.htm#BABCHHFG
    You can customize the appearance of the page items i.e. if they begin on a new line, if they have a label associated to them, etc, by editing the item attributes.
    If this still doesn't suit your needs, you could create a dynamic pl/sql region on your page and add items (as previously mentioned) using the apex_item API. These are then referred to in application processes, etc, with the apex_application API.
    i.e.
    htp.p('<div>')
    htp.p(apex_item.text(1, 'value'));
    htp.p('etc');
    htp.p('</div>');Ta,
    Trent

  • How can I Integrate FCKEditor 2.6 in APEX???

    Hello! I want integrate FCKEditor 2.6 in Apex and i need your help.
    Now I use the standard html editor of Apex but i don't like the code generated for the editor...
    For example, I write a text and this is the code generated for the size:
    size="7" <= The HTML in Apex not recognize this html code.
    However in FCKEditor 2.6, the same text, generated this code for the size:
    style="font-size:...."
    And this is correct in the html of Apex.
    And then, the colors ... if I write two diferent sizes, with two diferent colors. In the html of Apex I see ONE size and two colors. However in FCKEditor 2.6 all is correct.
    For more information, now I use the Apex 3.0.1.00.08, for the editor text I use a item with "HTML Editor Standard" and for see the results I use a report with "Standard report column"
    Thanks!

    Pleesee help me, I am not a expert :D
    I changed, in the server, the containing of the carpet FCK for the files of new version fckeditor 2.6... and is perfect... but always there are a problems... xD
    With the version 2.6:
    with the file /i/fck/editor/fckeditor
    Not work Ie and mozilla.
    But if change the file by /i/fck/editor/fckeditor.original
    - Explorer perfect.
    - Mozilla ... psst... there are a many symbols in the top left.. this -> ï}}¿
    but the html editor work.
    And with the last version of fckeditor...with the file
    /i/fck/editor/fckeditor
    - Explorer not work.
    - Mozilla work perfect.
    and with the file /i/fck/editor/fckeditor.original
    - Explorer perfect.
    - Mozilla ... psst... there are a many symbols in the top left.. this -> ï}}¿
    There are any solution for this?? I like change the file
    /i/fck/fckeditor.js for recognized the explorer and use one file or other... but I don't have idea ...
    Any idea?

  • Integration of APEX in OBIEE 11g fails after upgrade to APEX 4.2.1

    I used a document from the german APEX forum to integrate Oracle Business Intelligence 11g (OBIEE) with APEX.
    After login in OBIEE a APEX page will be called without login in APEX.
    The Document is called "APEX in Oracle Business Intelligence (Oracle BI) integrieren"
    http://www.oracle.com/webfolder/technetwork/de/community/apex/tipps/biee-apex/index.html
    In APEX 4.0 this worked great. After login in OBIEE I could call a APEX page without new login.
    But after upgrading to APEX 4.2.1 now the APEX login mask is displayed.
    OBIEE uses this function to create a APEX session and store the APEX session-id and username in the table apex_biee_session:
    -- Function GET_APEX_SESSION_ID
    -- sets up an APEX session for a BIEE user
    FUNCTION get_apex_session_id (p_username IN VARCHAR2,p_days_valid IN NUMBER DEFAULT 1) RETURN VARCHAR2
    IS
    pragma autonomous_transaction;
    l_session_id NUMBER;
    l_valid_to DATE;
    l_count NUMBER;
    l_password VARCHAR2(4000);
    BEGIN
    l_valid_to := SYSDATE + NVL(p_days_valid,1);
    -- Let us delete expired records:
    BEGIN
    DELETE FROM apex_biee_session
    WHERE valid_to < TRUNC(SYSDATE,'DD');
    COMMIT;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    -- get next APEX session id:
    l_session_id := apex_custom_auth.get_next_session_id;
    -- Insert the BIEE user and the APEX session id in table APEX_BIEE_SESSION
    INSERT INTO apex_biee_session (username, sessioN_id, valid_to)
    VALUES (UPPER(p_username),l_session_id,l_valid_to);
    COMMIT;
    -- define an APEX user session:
    apex_custom_auth.define_user_session(
    p_user => UPPER(p_username),
    p_session_id => l_session_id);
    htmldb_application.g_unrecoverable_error := TRUE; -- tell apex engine to quit
    RETURN l_session_id;
    EXCEPTION
    WHEN OTHERS THEN RETURN '-99';
    END get_apex_session_id;
    CREATE TABLE "APEX_BIEE_SESSION"
    (     "USERNAME"     VARCHAR2(60),
         "SESSION_ID"     NUMBER,
         "VALID_TO"     DATE,
         CONSTRAINT "APEX_BIEE_SESSION_PK" PRIMARY KEY ("USERNAME","SESSION_ID")
    In APEX this page sentry function is called:
    -- Function PAGE_SENTRY
    -- used as page sentry function in APEX applications
    FUNCTION page_sentry RETURN BOOLEAN
    IS
    l_current_sid NUMBER;
    l_biee_userid VARCHAR2(255);
    l_cookie owa_cookie.cookie;
    l_c_value VARCHAR2(255) := NULL;
    l_cookie_tom owa_cookie.cookie;
    l_c_value_tom VARCHAR2(255) := NULL;
    l_session_id NUMBER;
    l_biee_auth     VARCHAR2(1) := 'N';
    BEGIN
    BEGIN
    -- If normal APEX user authentication is used, cookie LOGIN_USERNAME_COOKIE will be used
    l_cookie_tom := owa_cookie.get('LOGIN_USERNAME_COOKIE');
    l_c_value_tom := l_cookie_tom.vals(1);
    l_biee_userid := UPPER(l_cookie_tom.vals(1));
    EXCEPTION
    WHEN OTHERS THEN NULL;
    END;
    l_session_id := apex_custom_auth.get_session_id; -- in APEX 4.2.1 this returns NULL
    -- Do we have a record in table APEX_BIEE_SESSION with the current session id
    BEGIN
    SELECT UPPER(username) INTO l_biee_userid
    FROM apex_biee_session
    WHERE session_id = l_session_id AND valid_to > SYSDATE;
    l_biee_auth := 'Y';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN l_biee_userid := 'Failed';
    END;
    IF l_biee_userid = 'Failed' THEN
    IF l_c_value_tom IS NULL THEN
    l_biee_userid := NULL;
    ELSE
    l_biee_userid := UPPER(l_c_value_tom);
    END IF;
    END IF;
    -- If l_biee_userid is NULL we need to call the APEX login page (done by RETURN FALSE)
    IF l_biee_userid IS NULL THEN
    RETURN FALSE;
    END IF;
    IF l_biee_auth = 'N' THEN
    l_current_sid := apex_custom_auth.get_session_id_from_cookie;
    ELSE
    l_current_sid := l_session_id;
    END IF;
    -- This is the built-in part of the session verification
    IF apex_custom_auth.is_session_valid THEN
    wwv_flow.g_instance := l_current_sid;
    IF apex_custom_auth.get_username IS NULL THEN
    apex_custom_auth.define_user_session(
    p_user => UPPER(l_biee_userid),
    p_session_id => l_current_sid);
    RETURN TRUE;
    ELSE
    IF UPPER(l_biee_userid) = UPPER(apex_custom_auth.get_username) THEN
    apex_custom_auth.define_user_session(
    p_user =>UPPER(l_biee_userid),
    p_session_id =>l_current_sid);
    RETURN TRUE;
    ELSE -- username mismatch. Unset the session cookie and redirect back here to take other branch
    apex_custom_auth.logout(
    p_this_app=>v('APP_ID'),
    p_next_app_page_sess=>v('APP_ID')||':'||nvl(v('APP_PAGE_ID'),0)||':'||l_current_sid);
    wwv_flow.g_unrecoverable_error := true; -- tell htmldb engine to quit
    RETURN FALSE;
    END IF;
    END IF;
    ELSE -- application session cookie not valid; we need a new apex session
    IF l_biee_auth <> 'Y' THEN
    l_session_id := apex_custom_auth.get_next_session_id;
    END IF;
    apex_custom_auth.define_user_session(
    p_user => l_biee_userid,
    p_session_id => l_session_id);
    wwv_flow.g_unrecoverable_error := true; -- tell htmldb engine to quit
    IF owa_util.get_cgi_env('REQUEST_METHOD') = 'GET' THEN
    wwv_flow_custom_auth.remember_deep_link(
    p_url=>'f?'||wwv_flow_utilities.url_decode2(owa_util.get_cgi_env('QUERY_STRING')));
    ELSE
    wwv_flow_custom_auth.remember_deep_link(
    p_url=>'f?p='||
    TO_CHAR(wwv_flow.g_flow_id)||':'||
    TO_CHAR(nvl(wwv_flow.g_flow_step_id,0))||':'||
    TO_CHAR(wwv_flow.g_instance));
    END IF;
    apex_custom_auth.post_login( -- register session in htmldb sessions table, set cookie, redirect back
    p_uname => l_biee_userid,
    p_app_page => wwv_flow.g_flow_id||':'||nvl(wwv_flow.g_flow_step_id,0));
    RETURN FALSE;
    END IF;
    END page_sentry;
    The problem seems to be that in line "l_session_id := apex_custom_auth.get_session_id;" the call of apex_custom_auth.get_session_id is returning NULL in APEX 4.2.1.
    In APEX 4.0 the call of apex_custom_auth.get_session_id returned the APEX session id.
    What can I do to get this working again ?
    Kind Regards,
    Markus
    Edited by: asmodius1 on Jan 10, 2013 2:06 PM

    Hi,
    this integration relies on session fixation, that's an insecure practice which is not allowed anymore since 4.1:
    http://en.wikipedia.org/wiki/Session_fixation
    Since the cookie value for the session id is missing, Apex rejects the session id and sets it to null, before calling the sentry function.
    If you absolutely want to use this kind of integration, you will have to parse the value of owa_util.get_cgi_env('QUERY_STRING') in the sentry function to get the session id. To make it a bit more secure, the row in APEX_BIEE_SESSION should only be valid for a very short time (e.g. 1 sec). A person from Oracle Support contacted me about possible improvements to this authentication a few weeks ago. I replied with the following suggestions:
    I would at least add a Y/N flag (e.g. SESSION_JOINED_BY_APEX) to the
    APEX_BIEE_SESSION table. The page sentry should only accept the session
    without an accompanying cookie if the flag is still N. It has to set it
    to Y afterwards. This way, you ensure that the session joining without
    cookie can only be done once. Maybe there should also be an alternative
    way to log in to APEX, e.g. via page 101. Currently, this authentication
    only accepts session IDs that were generated via OBIEE.
    Users could log out of APEX or the APEX session could expire. Therefore,
    the APEX app should have a post logout procedure that deletes the row in
    the OBIEE session table. On the OBIEE side, APEX_SESSION_ID should
    therefore be initialized on each request. The initialization code should
    also check APEX_WORKSPACE_SESSIONS to make sure the session still
    exists.
    Regards,
    Christian

  • How to uploade multiple files in Apex

    Hi All,
    I went through the documnet to up;oad the files in apex which is wroking fine perfectly.
    But how do we upload multile files at a time.
    If we observe here we are using P2_File_name as one of the browser filed, similarly i have created three more browser buttons with names a s P3_file_name and P4_file_name
    so how do chnage the proces to handle multiple files to uplaod at a ttime.
    Here is the process i have followed.
    IF ( :P2_FILE_NAME is not null ) THEN
    INSERT INTO oehr_file_subject(id,NAME, SUBJECT, BLOB_CONTENT, MIME_TYPE)
    SELECT ID,:P2_FILE_NAME,:P2_SUBJECT,blob_content,mime_type
    FROM APEX_APPLICATION_FILES
    WHERE name = :P2_FILE_NAME;
    DELETE from APEX_APPLICATION_FILES WHERE name = :P2_FILE_NAME;
    END IF;
    Abd for downloading the file i have used a proceudre
    create or replace PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Thanks,
    Anoo..

    Hi,
    Take it easy, you can use plugin:
    http://apex-plugin.com/oracle-apex-plugins/item-plugin/multiple-file-upload_95.html
    http://apex-plugin.com/oracle-apex-plugins/odtug-competition/filedrop_202.html
    Regards,
    Fateh

  • How to Convert Variable containing HTML to be read as HTML in HTML region

    To understand the question, I have a table storing generated HTML by user and report type:
    USER      | REPORT_TYPE | HTML_GENERATED
    ----------------------------------------------------------------------------------------|
    TEST_USER |   TEST      | <HTML><head><title></title></head><BODY>TEST</BODY></HTML>   |On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
    SELECT HTML_GENERATED into :P2_HTML
    from LN_DOCUMENT_LABELS
    where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package.
    There exists a single Item on the page to store the variable into:
    P2_HTML     (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
    &P2_HTML.The result simply displays the HTML code:
    <HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
    TEST

    KylePN wrote:
    To understand the question, I have a table storing generated HTML by user and report type:
    USER      | REPORT_TYPE | HTML_GENERATED
    ----------------------------------------------------------------------------------------|
    TEST_USER |   TEST      | <HTML><head><title></title></head><BODY>TEST</BODY></HTML>   |
    Hopefully that's just poorly chosen sample HTML? APEX page templates already include those elements. Trying to output a complete HTML document inside an APEX page generally results in a mangled, inoperative mess.
    On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:
    SELECT HTML_GENERATED into :P2_HTML
    from LN_DOCUMENT_LABELS
    where USER = :app_user AND REPORT_TYPE = 'TEST';The idea is to generate all the HTML behind the scenes in another package. In APEX it's not necessarily a good idea. Why use this approach rather than existing APEX features?
    There exists a single Item on the page to store the variable into:
    P2_HTML     (Hidden) Then I created an HTML region, and within that region I wanted to call in the item so I entered:
    &P2_HTML.The result simply displays the HTML code:
    <HTML><head><title></title></head><BODY>TEST</BODY></HTML>Is there a way to force it to be the result of HTML code when the page renders?
    TEST
    Hidden page items these will always be escaped when referenced as static text substitution strings. (You may indeed have done this in previous versions of APEX at some point in the past, but there have been incremental restrictions introduced in several recent APEX versions.)
    Instead of a hidden page item, use an application item, or a Display Only page item with display Condition set to Never.

Maybe you are looking for