This discussion is archived
1 Reply Latest reply: Apr 25, 2013 5:25 AM by Roel RSS

Apex 4.2: PL/SQL table formatting - referencing CSS

emma-apex Newbie
Currently Being Moderated
Hello

I have a form that displays all fields for a single Activity (one row from my Activities table).

On that form, I am using PLSQL to pull out all the rows in my Milestones table that are relevant for the single Activity displayed.

It's all working fine, except the PLSQL table is really ugly.

I'm hoping there is an easy way to tap into the CSS stored for tables shown e.g. on standard reports.

My PLSQL is below. Does anyone know how I can reference the CSS?
DECLARE
CURSOR MY_CUR IS
SELECT MILESTONE_SUBCAT NM,
MILESTONE_DATE DT,
T.NAME TYPE,
L.NAME TARGET
FROM AA_WL_ACT_MILESTONES M
JOIN AA_WL_LOV_MILESTONES L
ON L.SEQUENCE = M.MILESTONE_CAT
JOIN AA_WL_LOV_MILE_TYPE T
ON T.SEQUENCE = M.MILESTONE_TYPE
WHERE MILESTONE_ACT_ID = :P41_ACTIVITIES_ID;

rec_cur_select MY_CUR%ROWTYPE;

BEGIN
HTP.P('<table><tr><th><b>ID</b></th><th><b>Milestone</b></th><th><b>Type</b></th><th><b>Audience</b></th><th><b>Date</b></th></tr>');

open MY_CUR;
loop
fetch MY_CUR
into rec_cur_select;

exit when MY_CUR%NOTFOUND;

HTP.P('<tr><td width="30">' || MY_CUR%ROWCOUNT || '</td><td width="100">' || rec_cur_select.NM ||
'</td><td width="70">' || rec_cur_select.TYPE || '</td><td width="100">' || rec_cur_select.TARGET ||
'</td><td width="120">' || rec_cur_select.DT || '</td></tr>');
END LOOP;

HTP.P('</table>');
CLOSE MY_CUR;
END;
Thanks
Emma
  • 1. Re: Apex 4.2: PL/SQL table formatting - referencing CSS
    Roel Oracle ACE Director
    Currently Being Moderated
    Your standard reports probably contain a reference to a CSS style for the HTML Elements (table, tr, td). Inspect that and just get the same code in your PL/SQL.
    So something like:
     HTP.P('<table class="tableClass"><tr class="trHeading"> ... etc ... ');
    But if you're so happy with a regular standard report layout ... why not use your select in a standard report (instead of coding your own PL/SQL)?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points