Custom HTML or JS in Column Headers in Answers

All,
I am primarily a web developer, but a co-worker asked me how a site was doing a particular effect (they had set the title parameter of a node, and it was showing up like a tooltip). He wanted to set it up on the column header of an Answer, so that when a user scrolled over it, it would display some metadata about the field. I said it should be really easy to do.....
So after a day of reading up on Seibel/Oracle Analytics, I'm about ready to strangle the developers.
I had assumed (apparently incorrectly), that I could set the column header text, and just include an html element with the title set. Simple enough, after that didn't work (it never parses the HTML, it just renders it as character entities). I thought, surely it would be an easy task to track down the actual html templates that were being used to generate those tables. No such luck there either.
Ideally, I'd like to edit the "advanced" tab report xml, and just say something like:
<saw:title>My Tooltip Title</saw:title>
but I can't find any documentation on that XML document format.
Surely though, the original developers did not embed HTML table info inside the magical mystical saw.dll....
Any help would be much appreciated.
Thanks in advance,
James

Update:
This is interesting. So when my coworker asked me how get the tooltip effect, I said it was super straight forward. All they had to do was something like:
&lt;span title="My tooltip"&gt;My Column Header&lt;/span&gt;
And it would work. After trying all kinds of HTML, I despaired of a simple fix.
Then we set the HardenXSS flag to false in the server instance config file, and I tried that exact code again. It still was not parsing the column header correctly. Then one of my other coworkers, tells me that he put a line break tag in, and it rendered the break.
o.O
So I tried the following:
&lt;b title="My tooltip"&gt;My Column Header&lt;/b&gt;
Which of course worked. Why is span being discriminated against? I have no idea.
So basically, for column header tooltips, disable XSS hardening, and use a bold tag. (why bold? it was the first thing that came to mind, and since the default font-weight of a table header is bold, it should be practically unnoticable).
The next question is, what exactly is the impact of disabling the HardenXSS. I'm not sure if it allows certain HTML elements only, or if it allows any HTML (or more to the point the script tags). I wonder if anyone has done a vulnerability assesment of having hardening turned off.
--james
Message was edited by:
jholder
Message was edited by:
jholder
Fixed html entities

Similar Messages

  • How can I add custom right-click-menu to column headers in JTable?

    Can anyone point me to a topic on how to customize a popup menu for column headers in JTable? Specifically, I want to add things like "auto-size column" and "hide column".
    Thanks,
    Matt

    Right-click on your table.  Then go to Advanced->Runtime Shortcut Menu->Edit.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • JTable column headers not displaying using custom table model

    Hi,
    I'm attempting to use a custom table model (by extending AbstractTableModel) to display the contents of a data set in a JTable. The table is displaying the data itself correctly but there are no column headers appearing. I have overridden getColumnName of the table model to return the correct header and have tried playing with the ColumnModel for the table but have not been able to get the headers to display (at all).
    Any ideas?
    Cheers

    Class PublicationTableModel:
    public class PublicationTableModel extends AbstractTableModel
        PublicationManager pubManager;
        /** Creates a new instance of PublicationTableModel */
        public PublicationTableModel(PublicationManager pm)
            super();
            pubManager = pm;
        public int getColumnCount()
            return GUISettings.getDisplayedFieldCount();
        public int getRowCount()
            return pubManager.getPublicationCount();
        public Class getColumnClass(int columnIndex)
            Object o = getValueAt(0, columnIndex);
            if (o != null) return o.getClass();
            return (new String()).getClass();
        public String getColumnName(int columnIndex)
            System.out.println("asked for column name "+columnIndex+" --> "+GUISettings.getColumnName(columnIndex));
            return GUISettings.getColumnName(columnIndex);
        public Publication getPublicationAt(int rowIndex)
            return pubManager.getPublicationAt(rowIndex);
        public Object getValueAt(int rowIndex, int columnIndex)
            Publication pub = (Publication)pubManager.getPublicationAt(rowIndex);
            String columnName = getColumnName(columnIndex);
            if (columnName.equals("Address"))
                if (pub instanceof Address) return ((Address)pub).getAddress();
                else return null;
            else if (columnName.equals("Annotation"))
                if (pub instanceof Annotation) return ((Annotation)pub).getAnnotation();
                else return null;
            etc
           else if (columnName.equals("Title"))
                return pub.getTitle();
            else if (columnName.equals("Key"))
                return pub.getKey();
            return null;
        public boolean isCellEditable(int rowIndex, int colIndex)
            return false;
        public void setValueAt(Object vValue, int rowIndex, int colIndex)
        }Class GUISettings:
    public class GUISettings {
        private static Vector fields = new Vector();
        private static Vector classes = new Vector();
        /** Creates a new instance of GUISettings */
        public GUISettings() {
        public static void setFields(Vector f)
            fields=f;
        public static int getDisplayedFieldCount()
            return fields.size();
        public static String getColumnName(int columnIndex)
            return (String)fields.elementAt(columnIndex);
        public static Vector getFields()
            return fields;
    }GUISettings.setFields has been called before table is displayed.
    Cheers,
    garsher

  • Multiple column headers in a single DataGrid?

    Suppose i wanted to display information on, say, invoices.
    So, i want to display one part of my DataGrid with only invoices from the last 30 days, the next section for 30-60 days old, and the third section is 90 days+ old.
    I want it to look, basically, like this:
    30 Days or less
    Customer         Days Old         amount
    Mr. X cleaning           15                20.76
    7-11                             3                   7.11
    30-60 days old
    Customer         Days Old         amount
    Barney's                  75                 12.34
    Watto's part shop    80              1200.89
    90 days or older
    Customer         Days Old         amount
    Sprint                   144                  30.63
    Is it possible to do this in a single DataGrid? I want the mulitple column headers, but want to be able to get rid of them and combine all this data into a single DataGrid with all invoices, if needs be. In that case all but the top column header titles would disappear.
    Any info on this is appreciated.
    thanks!

    Hi,
    You can do grouping with advance datagrid.
    http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_02.html
    Rgds
    Johnny

  • User editable column headers

    Is it possible to allow my JTable's column headers to be editable by the user who runs my application? Maybe its so obvious that I'm overlooking it, but I couldn't find anything in the tutorials about how to do this.

    nice day,
    [same answer as|http://www.java-forums.org/awt-swing/31497-custom-jxtable-header-focus-traversal.html]

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to turn column headers bold in Word table using VB Script

    I have created a table in Microsoft Word 2010 using VB Script (this is via the script engine that forms part of HP Quality Centre functionality).  The table itself is OK, 2 columns with centred headers.  However, I am unable to make the column
    headers bold.  I have spent hours searching the net and trying various options to no avail can somebody please help me.
    Set objWord = CreateObject("Word.Application")
    Set objDocument = objword.Documents.Open(Src_Dir & template_file
    Const wdAlignParagraphCenter = 1'var to control justification of the table columns
    Const NUMBER_OF_ROWS = 1 'number of rows in intial table
    Const NUMBER_OF_COLUMNS = 2 'number of colums in the intitial table
    'search for the "TAA_TABLE" bookmark embedded in the document template, this is where the table will be created
    Set objRange=objDocument.Bookmarks("TAA_TABLE").Range
    'create the table
    objDocument.Tables.Add objRange, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS
    Set objTable = objDocument.Tables(2)
    'populate column headers
    objTable.Cell(1, 1).Range.Font.Bold = True
    objTable.Cell(1, 1).Range.Text = "Sub Contractor"
    objTable.Cell(1, 2).Range.text = "TAA Number"
    'centre the column headers
    objDocument.Tables(2).Rows(1).Select
    Set objSelection = objWord.Selection
    objSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
    'format the table with plain grid lines
    objTable.AutoFormat(16)
    'set the column widths
    objTable.Columns(1).Setwidth 230,0
    objTable.Columns(2).Setwidth 230,0
    Any help is graetfully appreciated, as this is driving me wild.
    Cheers,

    Hi Citronax,
    I haved noticed that you used objTable.AutoFormat to format the table. Based on my understanding, this fuction will applie a predefined look to a table.
    After I move the code which bolder the text behind this line of code, it works well for me.
    'format the table with plain grid lines
    objTable.AutoFormat (16)
    objTable.Cell(1, 1).Range.Font.Bold = True
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Interactive report Column headers

    Hi ,
    I am using apex 4.2,
    My IR report contains more than 500 rows , so when I scroll down , I am unable to see the column headers.
    How to make column headers to be visible even when I scroll down.
    Please guide me to achieve that .
    Thank you,
    Nihar Narla.

    There is/was a plug-in (IR Plugin Package) that claims to support this.
    See: http://apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/ir-plugin-package_108.html
    I've never used it myself.
    (more) PARS has also pointed out the following: http://theapexfreelancer.com/apex/f?p=APEXFREELANCER:IR_PLUGIN_PACKAGE:0
    Howard

  • Hiding the column headers in boxed view

    I've created a custom list that I'm displaying in boxed view.  Here's a sample of the columns:
    Business Systems Manager
    Project lead
    Project number
    SFA?
    Etc...
    In boxed view, it displays like I have it here - vertical.  The names of the people and info display next to each item. 
    However, the web part is still displaying the column headings across the page like in this example:
    Business Systems Manager - Project Lead - Project Number - SFA? - etc...
    Some of my custom lists carry on for 12 or 13 columns and the main page view has about 6 or 7 of them so needless to say, the extra real estate the column headers (which are completely redundant because the column heading info is IN the boxed view!!!) are taking up is killing the layout of the page.
    Is there anyway to remove the column headers from the boxed view with out of the box Sharepoint?   Or is Designer required?
    Thanks!
    Lorraine

    This worked well for me:
    1) Add a Content Editor Web Part
    2) Click Source Editor
    3) Enter the following code:
    [css] <style> .ms-viewheadertr { display: none;} </style> [/css]
    4) Select Save
    5) Go to Layout and Select 'Hidden' 

  • Custom html elements in the portal pages output rendering.

    Hi,
    This is regarding branding the site. Since we have to use common css for all web applications, the html output rendered by the AquaLogic doesn't give the required style.
    AquaLogic generates html table elements for pages, columns, headers, footer etc. But we need <div> tags instead of 'table' & 'td' tags. If this is not possible 'table' EMBEDDED inside 'div' will also help us.
    See for example DIV tag is placed (see 2nd line in given html) around the columns
    <br><br>
    (td class="columnOne") -<!--Begin Portlet Column 0-->
    <br>
    (DIV ID="columnNarrowWide") -
    <br>
    (table class="portletBase" id="pt-portlet-252")
    ===========================================
    We tried to implement solution using Dynamic Discovery. But we couldn't identify how to do this. Can somone let me know the best possible way to do this ASAP.
    <br><br>
    Thanks,<br>
    Rajesh.Y<br>
    609-282-0770<br>
    [email protected]
    Edited by rajesh_yg at 03/22/2007 12:06 PM

    Some of your post was garbled due to HTML-escaping issues, but I think what you're asking is for a DIV-based layout rather than that TABLE-based layout for MyPages and Communities.
    One of our customers asked us for exactly the same thing and I'm working with an on-site designer to come up with something DIV-based. If it's possible, it's going to require extensive customizations to MyPortalContentView.java or MyPortalContentView.cs (if you're on .net). Using dynamic discovery (more specifically, View Replacement) is the way to go, but this task is a bit daunting, even for me (and I've been working with Plum/ALUI for almost ten years).
    If I can get something working, I promise to post a solution on [url http://dev2dev.bea.com/blog/bucchere]my dev2dev blog.
    In the meantime, if you want to attempt this yourself, edoc has a [url http://edocs.bea.com/alui/devdoc/docs60/Customizing_the_Portal_UI/Using_View_Replacement/PlumtreeDevDoc_Customizing_View_Intro.htm]guide to View Replacement that walks you through the process for both Java and .NET portals.
    Chris Bucchere | bdg | [email protected] | http://www.thebdgway.com

  • Column headers in forms are garbled

    Hi,
    I have one issue regarding folders in forms. User has set some custom folder on a form with following properties.
    Autoquery = Never,
    Check boxes checked : Open as Default, Public.
    User has set this folder as default folder. When user goes to particular window, he sees some column headers are garbled and not shown correctly.
    I checked user's .fmb file and compared with file on arcs log and did not find any differences between them.
    Can anybody suggest what might be the cause for this? What kind of set up may cause this?
    Thanks,
    Akshay

    Thanks much. I found the correct file, deleted it, and the column headers and data match up again.
    I found the correct file by searching the directory for one of the column names that occurs in the view (though I had to find both instances of "COLUMN_NAME" and "COLUMN NAME" (without the underscore)). Not sure why there were files with both versions.
    Do you know if there is any way to prevent those XXXXXXXXXTableSettings.xml files from writing all together (oracle.javatools.controls.nicetable.NiceTablePersistentSettings)? I looked through the SQL Developer preferences but nothing jumped out as being the setting to switch off.
    Should I be doing anything in particular to bring more attention to this potential bug so it might get fixed in a future release?
    Thanks again,
    Morgan

  • JTable -showing column headers and displaying multi-line strings

    Hi,
    This is two questions really.
    #1 - Does anyone know why my column headers aren't showing in my jtable using the model below?
    #2 - Does anyone know how I can display, mulitple line strings in a jtable? Currently my newline character ('\n') is just being displayed as a character.
    any help very much appreciated,
    Tom
    private class TaskHistoryTableModel extends AbstractTableModel {
    private List taskHistory = new ArrayList();
    public Object getValueAt(int row, int col) {
    if (col == 0) {
    return ((TaskHistoryItem) taskHistory.get(row)).getText();
    } else {
    return ((TaskHistoryItem) taskHistory.get(row)).getDate().getTime();
    public int getRowCount() {
    return taskHistory == null ? 0 : taskHistory.size();
    public int getColumnCount() {
    return 2;
    /** Getter for property taskHistory.
    * @return Value of property taskHistory.
    public List getTaskHistory() {
    return taskHistory;
    /** Setter for property taskHistory.
    * @param taskHistory New value of property taskHistory.
    public void setTaskHistory(List taskHistory) {
    this.taskHistory = taskHistory;
    public String getColumnName (int col) {
    return col == 0 ? "Text" : "Entered At";
    public boolean isCellEditable(int row, int col) {
    return false;
    }

    fixed my own problem - make your mulit-line string into html format e.g.
    this string will appear on two lines in a jtable
    "<html><p>A much more interesting entry</p> <p>on multiple lines</p></html>"

  • JTable column headers not showing up

    I have a JTable inside a JScrollPane which, in turn, is inside a JTabbedPane.
    I created a TableModel which extends AbstractTableModel as per the java Swing Tutorial examples.
    In that model is an Object[][] object for the data called rowData, and all the data displays in the table perfectly.
    I also have a String[] object called columnNames to define the column headers. ..the column names are coded directly into the object.
    i.e.: String[] columnNames = {"John", "Janet", "Jamie", "Jennifer"};But the column names don't display at all.....all I get in the column headers is 'A', 'B', 'C', etc.
    I need to know either
    1)how to set this up correctly in the first place or
    2)how I can reset the columns manually.
    I have tried adding the table 2 ways..as follows...but neither one gets the headers right:
    JScrollPane jScrollPane = new javax.swing.JScrollPane(getTable());or
    JScrollPane jScrollPane.setViewportView(getTable());Note: getTable()..is where the new javax.swing.JTabel(new TableModel())stuff is done.
    thx, ESW

    You mentioned the you columnNames array. I suggest you declare it as static and accessible from within your custom table modelprivate static final String[] COLUMN_NAMES = {"John", "Janet", "Jamie", "Jennifer"};Then you override/implement the following methods in your TableModel :public String getColumnName(int column) {
         return COLUMN_NAMES[column];
    public int getColumnCount() {
         return COLUMN_NAMES.length;
    }That should do the trick.

  • Column headers in SQLPLUS query

    Hi I am running a simple SQL query in SQLPLUS, and I want the column headers to appear just once at the top.
    If I set the 'SET PAGESIZE' to 50000 (which I thought was the max) it repeats the column headers evert 50000 lines.
    If I set 'SET PAGESIZE 50001', the column header appears every 14 lines
    Anyone help ?
    Thanks
    Mike
    Here is my SQLPLUS statement
    SET HEADING ON
    SET PAGESIZE 50001
    SET LINESIZE 80
    SET TERMOUT OFF
    SET VERIFY OFF
    SET FEEDBACK OFF
    SET TRIMS OFF
    SET COLSEP "|"
    SET CONCAT "."
    SET CONCAT "!"
    set newpage none
    set underline off
    SPOOL &1
    column Product format a4
    column Division format a3
    column Company format a4
    column Geography format a4
    column Customer format a12
    column Currency format a3
    column Year format a4
    column Account format a7
    column Period format a3
    SELECT /*+ index(GB,GL_BALANCES_N2) */
    'P'||GCC.SEGMENT8 Product,
    'D'||GCC.SEGMENT4 Division,
    'C'||GCC.SEGMENT1 Company,
    'G'||GCC.SEGMENT5 Geography,
    'G'||GCC.SEGMENT7 Customer,
    '&2' Currency,
    'FY'||substr(GB.PERIOD_NAME,5,2) Year,
    'A'||GCC.SEGMENT2 Account,
    substr(GB.PERIOD_NAME, 1, 3) Period,
    trim(to_char(SUM((NVL(GB.PERIOD_NET_DR,0)-NVL(GB.PERIOD_NET_CR,0))*DECODE(SUBSTR(GCC.SEGMENT2,1,1),'4',(-1),1)),'999999999990.99')) VALUE
    FROM
    GL.GL_BALANCES GB,
    GL.GL_CODE_COMBINATIONS GCC
    WHERE GCC.CHART_OF_ACCOUNTS_ID=101
    AND GB.CODE_COMBINATION_ID=GCC.CODE_COMBINATION_ID
    AND GB.SET_OF_BOOKS_ID = &3
    AND GB.ACTUAL_FLAG = 'A'
    AND GB.CURRENCY_CODE = '&2'
    AND GCC.SEGMENT2 BETWEEN '400000' AND '999999'
    AND NOT (GCC.SEGMENT2 BETWEEN '899501' AND '899506')
    AND GCC.SEGMENT2 != '899999'
    AND GB.PERIOD_NAME in &4
    GROUP BY
    'P'||GCC.SEGMENT8,
    'D'||GCC.SEGMENT4,
    'C'||GCC.SEGMENT1,
    'G'||GCC.SEGMENT5,
    'G'||GCC.SEGMENT7,
    '&2',
    'FY'||substr(GB.PERIOD_NAME,5,2),
    'A'||GCC.SEGMENT2,
    substr(GB.PERIOD_NAME, 1, 3)
    HAVING SUM(NVL(GB.PERIOD_NET_DR,0)) - SUM(NVL(GB.PERIOD_NET_CR,0)) <> 0
    ORDER BY
    'P'||GCC.SEGMENT8,
    'D'||GCC.SEGMENT4,
    'C'||GCC.SEGMENT1,
    'G'||GCC.SEGMENT5,
    'G'||GCC.SEGMENT7,
    '&2',
    'FY'||substr(GB.PERIOD_NAME,5,2),
    'A'||GCC.SEGMENT2,
    substr(GB.PERIOD_NAME, 1, 3);
    spool off
    exit

    Hi,
    Ranzalman wrote:
    Hi I am running a simple SQL query in SQLPLUS, and I want the column headers to appear just once at the top.
    If I set the 'SET PAGESIZE' to 50000 (which I thought was the max) it repeats the column headers evert 50000 lines.
    If I set 'SET PAGESIZE 50001', the column header appears every 14 linesApparantly, 50,000 lines is the max. If you try to set PEGESIZE higher than that, you get the default, which is 14.
    The best thing might be to SET PAGESIZE 0, which turns off paging. Unfortunately, that turns off the automatic headers, too, so you'll have to supply your own header, manually, like this:
    SPOOL  &1
    SET   PAGESIZE    0
    PROMPT  PROD|DIV|COMP|GEOG|CUSTOMER    |CUR|YEAR|ACCOUNT|PER|VALUE
    SELECT /*+ index(GB,GL_BALANCES_N2) */
    ...

  • Sorting a Collection with dynamic columns using a custom compare function for multiple columns

    I need help and ideas on how to sort a ListCollectionView.  My problem is complicated by 3 requirements-
         1. The column values contain HTML tags that needs to be removed before sorting (use custom compareFunction to strip HTML)
         2. The columns are dynamic, so dataField names are not known at compile time (need a single compareFunction for all columns)
         3. The data is used in an AdvancedDataGrid so multi-column sorting is required
    I have figured out how to solve any 2 of the 3 requirements.  However, I am having difficulties supporting all 3 requirements.
    Any help or ideas would be greatly appreciated.  Thanks.

    After playing with this some more I think I've figured out a solution.  This seems to work in initial testing.  Also, there is not a need to capture the current sort column in the headerRelease event which many offered solutions suggested.  Another benefit to this solution is that keyboard initiated sorting is handled also.  Whereas the headerRelease event is only triggered by a mouse click on the column header and special handling is required if the user uses the keyboard to access the column header.
    One point that I don't understand is how ascending/decending order is determined.  Behavior seems to be different between a single SortField versus multiple SortFields.  Notice how the compareResults are handled for the different situations.  Anyone out there know why???
     private function colSortCompareFunction(obj1:Object, obj2:Object, fields:Array = null):int{
         var compareResults:int = 0; 
         var newObj1:Object = new Object(); 
         var newObj2:Object = new Object();
          // should not be a condition that is met   
         if (_dataProviderDetails.sort.fields == null)     {
              var s:Sort = new Sort(); 
              var f:Function = s.compareFunction; 
              return f.call(null, obj1, obj2, fields);     }
         // when a single column is selected for sorting   
         else if (_dataProviderDetails.sort.fields.length == 1)     {
              var firstFld:SortField = _dataProviderDetails.sort.fields[0];
              newObj1[firstFld.name] = stripHTML(obj1[firstFld.name]as String);          newObj2[firstFld.name] = stripHTML(obj2[firstFld.name]
    as String);
              compareResults = ObjectUtil.compare(newObj1[firstFld.name], newObj2[firstFld.name]);
               return compareResults;     }
         // when multiple columns are selected for sorting   
         else       {
              for each (var fld:SortField in _dataProviderDetails.sort.fields)          {
                   newObj1[fld.name] = stripHTML(obj1[fld.name]
    as String);               newObj2[fld.name] = stripHTML(obj2[fld.name]
    as String);
                   compareResults = ObjectUtil.compare(newObj1[fld.name], newObj2[fld.name]);
                    if (compareResults != 0)               {
                        if (fld.descending)                    {
                             return compareResults * -1;                    }
                        else                      {
                             return compareResults;                    }
               return compareResults;     }
    Does anyone see any problems with this solution?
    NOTE:  stripHTML(String) is a simple function using regular expression to remove HTML tags.
    Thx

Maybe you are looking for