Sorting on columns with templated Report -- Named Column (row template)

Hi forum,
I'm trying to duplicate a regular report's column sorting functionality in a "Named Column" report.
The column headers are in the "Before first and after last row text" "Before Rows" area of the template :
<th onClick="sortByColumn('#REGION_ID#',5)">Frequency</th>invoking this javascript:
function sortByColumn(regionId,colNo) {
     var u = "f?p=124:401:&SESSION.:fsp_sort_" + colNo + "::RP&fsp_region_id="+regionId.substring(1);
       document.location.href=u;
}I'd like to sort descending when a user clicks the column again, and to display the column sort arrows (up/down).
However, since sorting is persisted per user, even when the page's cache is cleared, it would be necessary to pick up the sort column and order (ascending,descending) on page load or query it later using ajax, so that the sort display (the arrows) stays in synch with the actual sort.
Has anyone got an idea how to do this?
Cheers
Edited by: YT on Apr 1, 2009 4:19 PM
Edited by: YT on Apr 1, 2009 4:24 PM
Edited by: YT on Apr 1, 2009 4:26 PM

Hi,
Sort ordering on reports are stored as user preferences - see Need to do column SORTING only when I click the column heading for Denes' example on how to use this
Andy

Similar Messages

  • Using member sorting and grouping with two reports sharing rows

    Hi!
    I have a problem with one report and I need some help or advise here.
    I have two dimensions with dynamic expansion in rows (PRODUCT, MATERIAL), and I use the option Member Sorting and Grouping at Member selector to obtain the total amount of PRODUCT group by PARENTH1:
    PRODUCT               MATERIAL          AMOUNT
    TOTAL PROD_A-X                                   100
    PROD_A_A             MAT1                          22
    PROD_A_B             MAT1                          50
    PROD_A_A             MAT2                          28 
    TOTAL PROD_B-X                                   120
    PROD_B_A             MAT1                          30
    PROD_B_A             MAT2                          50
    PROD_B_B             MAT2                          40
    This works fine if I only have one report, but I need to create another one sharing the row and page axis with the Default Report, when I do that the option Member Sorting and Grouping doesn't work. I really need to have two reports with shared rows and also the summation by PARENTH1, how can I do that?
    Thank you very much

    Hi!
    I have a problem with one report and I need some help or advise here.
    I have two dimensions with dynamic expansion in rows (PRODUCT, MATERIAL), and I use the option Member Sorting and Grouping at Member selector to obtain the total amount of PRODUCT group by PARENTH1:
    PRODUCT               MATERIAL          AMOUNT
    TOTAL PROD_A-X                                   100
    PROD_A_A             MAT1                          22
    PROD_A_B             MAT1                          50
    PROD_A_A             MAT2                          28 
    TOTAL PROD_B-X                                   120
    PROD_B_A             MAT1                          30
    PROD_B_A             MAT2                          50
    PROD_B_B             MAT2                          40
    This works fine if I only have one report, but I need to create another one sharing the row and page axis with the Default Report, when I do that the option Member Sorting and Grouping doesn't work. I really need to have two reports with shared rows and also the summation by PARENTH1, how can I do that?
    Thank you very much

  • Conditional column display in report using column substitution string

    Hi everone,
    I was wondering if it's possible to display a column conditionally, based on a values in another column of the same report.
    Can you use the column substitution strings or does the condition strictly require SQL, PL/SQL
    or page item values?
    kind regards,
    Cleo

    I dont think we can add a condition to display the column in a report based on the other column of the same report,
    Just add a (CASE WHEN <your condition satisfies> THEN column ELSE null END) in your report source for the column you want to display conditionally.
    --Mahesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do you integrate a column with respect to another column

    I have two columns of data, one is time and the other is velocity. I want to be able to integrate velocity with respect to time, but I can not find a function which will let me do this. Preferably, I'd like to do a cumulative trapezoidal integration, such as the one in Matlab. The function "cumtrapz" does not work the same in mathscript as it does in matlab. The "trapz" function did not seem to integrate the columns in the way that I wanted it to, leaving me with just a number.
    Is there any way I can recreate the "cumtrapz" function from Matlab in Mathscript?
    Thanks.

    The cumtrapz in MathScript can not accept a time array as input. Then, you have to write your own script to calculate the cumulative trapezoid integration. For example, the following script generates a sin wave and calculates the cumulative trapezoidal integration.
    t = 0:0.1:pi;
    x = sin(t);
    y = 0.5*(x(1:(end-1))+x(2:end)).*(t(2:end)-t(1:(end-1)​)); %trapizoidal integration
    y = cumsum(y); %cumulative sum

  • Filling a column with value from other columns

    Hello all!
    Suppose i have the following table:
    TableA(col_one int, col_two int, result int);I want to insert value to col_one and col_two, and result will be filled with the multiplication product of col_one and col_two.
    ok firstly i know this is very redundant way of storing data and generally should not be used, but one case when this might come in handy is when we want to store a total payment amount of product price and quantity. this can be useful since product price can change overtime and we need to record the data as the transaction happens to avoid change in total payment over time (as the price drops or rises).
    now with the problem:
    I tried this in mysql and it works:
    INSERT INTO TableA (col_one, col_two, result) VALUES (30,  20, col_one * col_two);but not in oracle, which output the following error:
    >
    ora 00984 column not allowed here
    any idea on how to do it in oracle?
    thank you very much :)
    ps, thank you for the fast replies on my previous topic.

    If the insert is done inside PL/SQL you can return the primary key for the row (assuming the table has a primary key?!?) and then update based on that key, but this still introduces two statements where a single statement can suffice.
    Why are you thinking so complicated? ;-)
    If it is done in PL/SQL the you can do this:
    create procedure addRow(p_value1 number,p_value2 number) is
    p_result number;
    begin
    p_result:=p_value1*p_value2;
    insert into table1 (col_one,col_two,result) values(p_value1,p_value2,p_result);
    commit;
    end;If you want to do this automatically when someone inserts a row (without providing the result) you have to use an insert trigger.
    Dim

  • SPGridView with filtering on Taxonomy Field Multivalue column( column with multiple values in single row)

    Hi
    I have SPGridView  control (fetching value from DB) with a column which is having multiple values
    in single row seperated by ";", whenever filter applied it show these values in single row but i want
    to dispaly these values separately in diff. rows when column filter is applied.
    I have exactly same req. as mentioned in http://sadomovalex.blogspot.in/2011/03/spgridview-with-filtering-by-multiple.html
    but this solution didn't work for me.
    Please help/suggest.

    Hi Erland,
    Thank you very much for the answer. Sorry I had to be more accurate on my XML : This XML is in a SQL Server Table column. This table also has an id column. It will be great if you can answer specifically to this.
    <RootNode>
    <Node1>
    <Line_id_Node>1 </Line_id_Node>
    <A>
    <B>
    <D>Val1 </D>
    </B>
    <B>
    <D>Val2 </D>
    </B>
    <B>
    <D>Val3 </D>
    </B>
    </A>
    </Node1>
    <Node1>
    <Line_id_Node> 2 </Line_id_Node>
    <A>
    <B>
    <D>Val4 </D>
    </B>
    <B>
    <D>Val2 </D>
    </B>
    </A>
    </Node1>
    <Node1>
    <Line_id_Node> 3 </Line_id_Node>
    <A>
    <B>
    <D>Val5 </D>
    </B>
    </A>
    </Node1>
    </RootNode>
    Expected O/P:
    Line_id_Node                Column_D
    1                                                                    1                                           
    val1, val2, val3
    2                                                                    2                                               
    val4, val2
    3                                                                    3                                                  
    val5
    Nichesl

  • How to fix Width of column in classic report.

    Dear Friends
    i am using Apex 3.2.
    i have created Clasic Report and i have summary column in my report that column have description of issue so i want to fix width of that column nn Classic report .
    i have try some code in html expression
    <span>style="width: 480px; display: block; white-space: normal; font-size: 11px;">#ACTIVITY_SUMMARY#</span>
    {code
    after apply abovemention code that display me in my summary like this and not manage width of column.
    style="width: 480px; display: block; white-space: normal; font-size: 11px;">Dear Cherryl, Greetings !! Thank you very much for the new query and we are pleased to confirm the availability of one single cabin in all the three categories of cabin on M.V. Mahabaahu. We would like to inform you that both the departures 15th Oct 2013 & 29th Oct 2013 (Golden triangle with Cruise) are operational and attached are the prices for your kind consideration. As a special promotion for the 15th Oct 2013 departure only, we are offering USD 100 per person reduction on the Golden triangle portion combined with the cruise. Kindly review and advise us to block the accommodation accordingly. Regards...pankaj
    How to fix Width of column in classic report.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I'm working an example in APEX 4.2 so YMMV (your milage may vary!).
    For Classic Reports, where the Column Attributes "Display As" is set to Display as Text (escape special characters ...:
    1) I find that Column width and Element Width setting have no effect to make the column smaller or larger.
    2) Here is one way that works:
    - In the Region's Region Definition, under Attributes give the Static ID a name (no spaces), say, class-report.
    - In the columns you want to affect, place "&#60;div>#ENAME#</div&#62;" in the columns Column Formatting "HTML Expression". Where "ENAME" here is the actual column name.
    I'm using the EMP table as an example.
    - Finally, in the page's HTML Header put, for example
    <style>
    #classic-report td.data[headers="ENAME"] div {
      width: 200px;
      color: blue;
    #classic-report td.data[headers="JOB"] div {
      width: 50px;
      white-space: nowrap;
      word-wrap: break-word;
    </style>This makes the ENAME column wider and the JOB column smaller and wraps it.
    Much more could be said. If you tweak you will find you can also affect spacing above, below and right/left of the data.
    #classic-report .report-standard th.header {
      border-left: #9fa0a0 1px solid;
      padding: 2px 3px 4px 5px;   /* top right bottom left margins */
      font-size: 11px;
      font-weight: bold;
      vertical-align: bottom;
    #classic-report .report-standard td.data {
      border-left: #9fa0a0 1px solid;
      padding: 3px 4px 5px 6px;
      font-size: 9px;
    }Does this help?
    Howard

  • Export Report Missing Columns

    I have a normal report region (not interactive). It was working fine in APEX 3 but just recently upgraded to APEX 4. Now, it will miss some columns when I hit the Report Export link. I double checked and the column attribute is set to Yes for include in Export. I also have the column with the exact same column attribute settings on the exact same field on another page and it exports fine on that page.
    Are there any reported bugs or anyone have any ideas?

    I just fixed the problem, I had a column title with an under score (CLOSED_DATE) when I removed the underscore the problem was fixed, this missing columns is exported to excel now. Try renaming the column this will fix it also.

  • AdvancedDataGrid - Add columns with ActionScript

    I'm trying to add columns to an AdvancedDataGrid via ActionScript.
    I can't get it to work.
    I've tried two approaches -- One with an intermediary array to store the columns then set the adg's columns to the array; One where I assign the columns directly to the adg's columns array.
    They both fail in their own way.  The columns don't "take" and the adg uses the dataProviders defaults, or there are no columns at all.
    "adg_test.mxml" has the AdvancedDataGrids/code. 
    "adg_test_renderer.mxml" is a renderer for one of the columns.
    Would appreciate learning what I'm doing wrong.
    Thanks for any help.
    === START adg_test_renderer.mxml  ===
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:Button id="btnTest" label="Renderer Working"/>
    </mx:VBox>
    === END adg_test_renderer.mxml  ===
    == START adg_test.mxml ====
    <?xml version="1.0"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        initialize="init()">
        <mx:Script>
          <![CDATA[
             import mx.collections.ArrayCollection;
             [Bindable]
             private var dpADGExplicit:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
             [Bindable]
             private var dpADGActionScript:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
            private function init():void
                var arr:Array=[];//Intermediary array that will become the AdvancedDataGridColumn array
                var col:AdvancedDataGridColumn = new AdvancedDataGridColumn();
                col.dataField = "Artist";
                arr.push(col);
                col.dataField = "Album";
                col.visible = false;
                arr.push(col);
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                arr.push(col);
                adgActionScript.columns = arr;
                //ALTERNATE UNSUCCESFUL APPROACH
                col.dataField = "Artist";
                adgActionScript.columns.push(col);
                col.dataField = "Album";
                col.visible = false;
                adgActionScript.columns.push(col);
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                adgActionScript.columns.push(col);
          ]]>
        </mx:Script>
        <mx:Label text="Explicit Columns"/>
        <mx:AdvancedDataGrid
            id="adgExplicit"
            width="100%" height="100%"
            sortExpertMode="true"
            dataProvider="{dpADGExplicit}">
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Artist" />
                <mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
                <mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
            </mx:columns>
       </mx:AdvancedDataGrid>
       <mx:Label text="ActionScript Columns (If ActionScript works: Arist column should be hidden. Should see Album column with data and Price column with buttons."/>
        <mx:AdvancedDataGrid
            id="adgActionScript"
            width="100%" height="100%"
            sortExpertMode="true"
            dataProvider="{dpADGActionScript}">
       </mx:AdvancedDataGrid>
    </mx:Application>
    == END adg_test.mxml ====

    Thanks so much for your help.
    Here's how I altered your code for my example.  This logic allows easier assignment of additional column parameters.
    === START adg_test_renderer.mxml  ===
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Button id="btnTest" label="Renderer Working"/>
    </mx:VBox>
    === END adg_test_renderer.mxml  ===
    == START adg_test.mxml ====
    <?xml version="1.0"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        initialize="init()">
        <mx:Script>
          <![CDATA[
             import mx.collections.ArrayCollection;
             [Bindable]
             private var dpADGExplicit:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
             [Bindable]
             private var dpADGActionScript:ArrayCollection = new ArrayCollection([
               {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
               {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99},
               {Artist:'Saner', Album:'A Child Once', Price:11.99},
               {Artist:'Saner', Album:'Helium Wings', Price:12.99},
               {Artist:'The Doors', Album:'The Doors', Price:10.99},
               {Artist:'The Doors', Album:'Morrison Hotel', Price:12.99},
               {Artist:'Grateful Dead', Album:'American Beauty', Price:11.99},
               {Artist:'Grateful Dead', Album:'In the Dark', Price:11.99},
               {Artist:'Grateful Dead', Album:'Shakedown Street', Price:11.99},
               {Artist:'The Doors', Album:'Strange Days', Price:12.99},
               {Artist:'The Doors', Album:'The Best of the Doors', Price:10.99}
            private function init():void
                var arrCols:Array = adgActionScript.columns;
                var col:AdvancedDataGridColumn;
                col = new AdvancedDataGridColumn;
                col.dataField = "Artist";
                arrCols.push(col);
                col = new AdvancedDataGridColumn;
                col.dataField = "Album";
                col.visible = false;
                arrCols.push(col);
                col = new AdvancedDataGridColumn;
                col.dataField = "Price";
                col.itemRenderer = new ClassFactory(adg_test_renderer);
                arrCols.push(col);   
                adgActionScript.columns = arrCols;
                adgActionScript.validateNow();
          ]]>
        </mx:Script>
        <mx:Label text="Explicit Columns"/>
        <mx:AdvancedDataGrid
            id="adgExplicit"
            width="100%"
            height="100%"
            dataProvider="{dpADGExplicit}">
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Artist" />
                <mx:AdvancedDataGridColumn dataField="Album" visible="false"/>
                <mx:AdvancedDataGridColumn dataField="Price" itemRenderer="adg_test_renderer"/>
            </mx:columns>
       </mx:AdvancedDataGrid>
       <mx:Label text="ActionScript Columns"/>
        <mx:AdvancedDataGrid
            id="adgActionScript"
            width="100%"
            height="100%"
            dataProvider="{dpADGActionScript}">
       </mx:AdvancedDataGrid>
    </mx:Application>
    == END adg_test.mxml ====

  • Help me out to create column with time format

    Hi all,
    please help me to find the query to Create a table with 3 columns and insert the following data
    ENTITYID| CHGDATE | CHGTIME
    ======= ==================== ========
    4214984| 02-OCT-06 12.00.00.000000 AM | 07:23:57
    4214985| 11-SEP-08 12.00.00.000000 AM | 10:52:19
    and Update the first row of the above table as follows
    4214984 | 02-OCT-06 07.23.57.000000 AM | 07:23:57
    need to update the CHGDATE column with time of CHGTIME column.

    As already said by Hans and Hoek: you should get rid of that chgtime column. Storing information twice only leads to extra storage and the need to keep them both in sync, without any benefit.
    An example which also shows a possible way to only update the time information. Lots of other ways are possible as well.
    SQL> create table entdate
      2  ( entityid number
      3  , chgdate date
      4  )
      5  /
    Tabel is aangemaakt.
    SQL> insert into entdate (entityid,chgdate) values (4214984, to_date('2006-10-02 07:23:57','yyyy-mm-dd hh24:mi:ss'))
      2  /
    1 rij is aangemaakt.
    SQL> insert into entdate (entityid,chgdate) values (4214985, to_date('2008-09-11 10:52:19','yyyy-mm-dd hh24:mi:ss'))
      2  /
    1 rij is aangemaakt.
    SQL> select * from entdate
      2  /
      ENTITYID CHGDATE
       4214984 02-10-2006 07:23:57
       4214985 11-09-2008 10:52:19
    2 rijen zijn geselecteerd.
    SQL> remark
    SQL> remark  "my doubt is how to update only the time in CHGDATE column"
    SQL> remark
    SQL> update entdate
      2     set chgdate = trunc(chgdate) + numtodsinterval(7,'hour') + numtodsinterval (18,'second')
      3   where entityid = 4214984
      4  /
    1 rij is bijgewerkt.
    SQL> select * from entdate
      2  /
      ENTITYID CHGDATE
       4214984 02-10-2006 07:00:18
       4214985 11-09-2008 10:52:19
    2 rijen zijn geselecteerd.Regards,
    Rob.

  • How to make every break column on the top of the rows in the same subgroup

    hi, guys:
    I was wondering if anyone could help me on this problem: I need to set up a break column on a classic report (I ma required to use classic report only), and it works, but I do not know how to make every break column on the top of the rows in the same subgroup. The break column only stays on the left to the rest columns as it is the first column. Anyone could help me on this problem? Here is the query:
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
    where rox.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
    and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
    and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)
    or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
    where rox.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
    and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
    and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
    where rox.offender_id=so.offender_id
    and sa.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
    and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
    and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
    where rox.offender_id=so.offender_id
    and sa.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
    and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
    and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))I set up "Jurisdiction" to be displayed as the first column in report attributes and set up the first column to be break column, under the "When displaying a break column use this format, use #COLUMN_VALUE# subs", I fill in "Jurisdiction".

    lxiscas wrote:
    Hi, fac586:
    I am sorry for not being able to provide project online oracle to ask the question as some of the data needs to be approved to release.You don't need to use the actual data. Create simple test cases using data from Oracle's sample schemas: SCOTT, OE, HR etc.
    I actually want something like this:
    Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/
    Smith , Carl Sherman      ......
    Smith , Tommy Nesby .....
    Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430
    Smith , Gabriel Ray      ...
    Smith , Michael Bert   ...I omit the sensitive data with ...
    but right now it shows as this way:
    Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/  Smith , Carl Sherman      ......
    Smith , Tommy Nesby .....
    Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430   Smith , Gabriel Ray      ...
    Smith , Michael Bert   ...Is that possible to show the data as the upper way?The best way to do this is using a report with a custom named column template as in this example. See the following threads for solutions to similar problems:
    <li>{thread:id=2402836}
    <li>{message:id=9816577}

  • Transfering word data to word template report

    Hello,
    Could someone help me here please:  I have a draft report generated from an equipment (see attached document name draft report.doc). I need to transfer data from this draft to a template ( see attached doc named template. doc), and this should look like the final report (see attached doc named final report.doc).
    I tried this (see the attached code), it seems to work but I am not able to get transfer the image (the graph) and also I need the right formating as shown on the example of the attached final report.
    Any help will be appreciated.
    Attachments:
    Draft report.doc ‏39 KB
    word_report.vi ‏76 KB
    template.doc ‏35 KB

    For the formatting you can use the Set Font Report.vi with font settings calibri size 8. Extracting a picture from a Word document to insert it into another Word document is not a simple task that can be accomplish with the VIs of the Report Generation Toolkit. You will have to use Word ActiveX methods and properties. Attached is a vi that copy the first picture of the draft report and copy it to the Image1 bookmark (there are no Image bookmarks define in your template so you will have to add them) of the template report.
    Note, your template report should be a .dot file, not a .doc file.
    Ben64
    Attachments:
    Word Copy and Paste Picture.vi ‏22 KB

  • Conditional bg color in row template

    I created a new row template for my report but I get the following error when I include it in the report:
    "Error ERR-1025 Error processing PLSQL expression. #missing_patches# = '-'"
    In the row template itself, I used the following values ("missing_patches" is the conditional column in the report-query):
    Row Template 1 (PL/SQL Expression): <td>bgcolor="yellow" #COLUMN_VALUE#</td>
    Row Template 1 Expression: #missing_patches# = "-"
    Row Template 2 (PL/SQL Expression): <td>bgcolor="red" #COLUMN_VALUE#</td>
    Row Template 2 Expression: #missing_patches# <> "-"
    Anybody an idea what I am missing? Thank you.
    Thomas

    Well, bgcolor should be inside the <td> tag, but bgcolor is depricated in HTML 4.x. You should really be using classes or inline styles.
    Tyler

  • Row Template Condition doesnt working

    Hi all,
    i have a self made "row template" for my report:
    "Before Rows":
    <table cellpadding="5" cellspacing="0" border="0" summary="">
    <tr>
    <th>ID</th>
    <th>ID_SHOW</th>
    <th>TITEL</th>
    <th>DOCUMENT</th>
    <th>status_external</th>
    <th>status_internal</th>
    <th>action</th>
    <th>tage_action</th>
    <th>crreated_on</th>
    <th>tage_anlage</th>
    <th>creator_name</th>
    <th>editor_hotline_display</th>
    <th>prio</th>
    <th>color</th>
    <th>erledigung_bis</th>
    <th>histo</th>
    <th>arbeitskorb</th>
    </tr>
    "Row Template 1"
    <tr class="#1#">
    <td >#2#</td>
    <td>#3#</td>
    <td style="background-color: yellow;">#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    </tr>
    "Row Template 2"
    <tr class="#1#">
    <td>#2#</td>
    <td>#3#</td>
    <td>#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    <td>#15#</td>
    <td>#16#</td>
    <td>#17#</td>
    <td>#18#</td>
    </tr>
    "Row Template 2 Condition" - use based on PL/SQL Expression
    '#DOCUMENT#' is null
    The "Row Template 1" is to be show only if Column "DOCUMENT" is not null, otherwise "Row Template 2" is to be show if Column "Document" is null. I have test various examples:
    '#4' is null, '#4#' is null and '#DOCUMENT#' is null. Without effect. Only "Row Template 1" is showing.
    Can anybody help me?

    Hi,
    null in conditions would return no value rather than 'null' - you can catch this by using an empty string - so:
    '#4#' = ''Andy

  • Sorting the values in a column in a Web Template Report

    Hi All,
    I have a report build on WAD in which a table is displayed with certain rows and columns and have certain text values in one column and few numeral values in the other few columns. When i right click on the 1st column(having text values) and click on Sort Ascending by Name, the values are sorted in groups.There are other 3 columns next to that column which have text values as well but when i right click on them and try to sort it in some order(ascending by name/descending by name), there are no reorganization of the values in the column. Again, once i go to the other remaining columns having numeral values in it, the values get sorted in ascending/descending order as per the sort selection. Please advise on how i can make the sort possible in the columns in which the rearrangement is not happening. Do i need to change the Query to some settings? Please advise.
    Thanks!
    Subhra Ghosh.

    Subhra,
    In BW reports, the sorting of characteristic values always happens left-to-right. When you choose to sort by columns 2 - 4, you are actually just specifying whether to sort ascending|descending and/or by key or text. This sort happens for each value of the first column, however. Therefore, the sort in column 2 is only noticeable when you have more than one row with the same value in column 1, etc.
    This sorting behavior is different than the Excel type of sorting, which may be your confusion here.
    If you want to sort first by a column other than column 1, you must swap the columns so that the desired characteristic is in column 1.
    Hope this helps...
    Bob

Maybe you are looking for

  • How to save a file in client system?

    I have a requiremnet like this: "When the user selects a file from his local drive (say c:\), I have to upload the file to a LAN connected to his machine." I have written the TestUpload class like below. It will work if my server is on the same machi

  • Is there a version of PS that can adjust a batch by a Historgram setting?

    Is there a version of PS that can adjust mass numbers of high res images for Contrast and Brightness but at the same time constrained by a Histogram setting? I have thousands of hi res .sid or .png images that are all of various degrees of brightness

  • How to avoid extra page

    HI all, I am getting my ouptut in smartforms . But the problem is i am getting an extra page with logo at the end. How to avoid that? Here i am using only 2 windows. LOGO window and main window. Thanks & Regards, Vineel

  • Might not update afterall

    free reading some comments I am thinking twice about updating to 2.1.I already found the original software a bit slugish sometimes and people are saying that 2.1 is slower, I know it's better to go with updates through symbian software but slower is

  • Contact Center query

    Dear Gents, I have a question regarding contact center, let's start with the existing scenario: There is a simple contact center script with multiple menu options for the caller to choose one of them let's say, 1 ènew subscription, 2 è complains, -.e