Dynamic action in column of classic report

Good day master!
Hi im new in apex,, so im dynamic ondering if its posible to create a dynamic action in the column of classic report in apex?
i'm trying but its not working my problem goes like this..
i have a classic report stock_replenish
columns
item_code
price
supplier_name
item_code is a pop-up loved by sql
what i want to do is when the user choose a item_code it will also return the price and supplier_name
i can do that in apex form but i dont know if iits posible to clasic report?
please help!
ty
Myke;l

Dynamic action on report columns is possible but not as straigth forward as on items.
First you can't select "report colum" as selection type for the dynamic action. Use jQuery Selector instead.
See the [url http://api.jquery.com/category/selectors/]jquery documentation  on possible selectors.
I prefer to use something like[name='f01'].
Use the developer tools of your browser to see the name of your report column.
Because you can't submit a single report cell value with the action "Set value".
You have to use a combination of a action "Execute javascript" and a ondemand process.
The javascript code is something like
  var elementId,idParts,row;
  /*Determine the id of the element that has triggered the dynamic action*/
  elementId = String(this.triggeringElement.id);
  /*The id of a item in a report column consists of to parts the name and the rownumber*/
  idParts = elementId.split('_');
  /*The second part is the rownumber we need that to set the value in the right row later on*/
  row = idParts[idParts.length-1];
  /*This calls the ondemand process*/
  apex.server.process ( "MANAGER_EMAIL", {x01:$v(this.triggeringElement),x02:row}, {success: function( pData ) { $s(pData.r,pData.d) }} );apex.server.process(name ondemand process,values to be submitted,options)
{x01:$v(this.triggeringElement),x02:row}
This submits the values of the triggering element and the row on which all the action is happening.
x01 refers to apex_application.g_x01
{success: function( pData ) { $s(pData.r,pData.d) }}
The succes option defines a function that is executed upon succefull completion of the ondemand process.
The ondemand process returns a json object. Which we can refer to in the javascript function with pData.
In our ondemand process we are defining the json object as having to properties.
d and r . d is the display value and r is the id of the element to be set.
$s(r,d) is a [url http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CDEEIGFH]apex javascript function that sets the value d to item with id r.
Now the server side code. This is an application process with process point Ondemand.
Which is something like this.
declare
  cursor c_emp(b_employee_id in number)
  is
    select emp.email
    from   oehr_employees emp
    where  emp.employee_id = b_employee_id
  col_emp_email oehr_employees.email%type;
  v_regel       number;
begin
  /*Get the employee email*/
  open  c_emp(apex_application.g_x01);
  fetch c_emp
  into  col_emp_email;
  close c_emp;
  /*Calculate the rownumber do this only if the triggering element is a popup lov*/
  v_regel := to_number(apex_application.g_x02) + 1;
  /*Create the json header*/
  APEX_PLUGIN_UTIL.PRINT_JSON_HTTP_HEADER;
  /*Print out the json object*/
  sys.htp.p('{"d":"'||col_emp_email||'","r":"f03_'||lpad(to_char(v_regel),4,'0')||'"}');
end; For specification of the JSON notation see [url http://www.json.org/]http://www.json.org/
To see this in action I have set up a [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:TBDA:0&c=VANBAREN]demo.
Change the manager and the manager email will change.
I hope this is enough to get you started.
If you have a problem in translating the above code to your specific situation set something up on apex.oracle.com. Then the help can be more specific to.
Nicolette

Similar Messages

  • 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

  • How to freeze the columns in Classical reports using vertical scroll

    Hi All,
    I am facing one problem that when i am scrolling down the page in the report     output ,the columns in the report are moving upward.I want to freeze those columns . Please give me the solution for to freeze the columns in classical report when i scroll vertically.
    With Regards,
    R.P.Sastry

    Put ur colum headers in TOP-OF-PAGE Event.
    this will sole ur problem.
    reward if useful.
    Regards,
    Vimal

  • How to fix the first field or column in classical report while scrolling

    i want to know, how to fix the first field or column in classical report while scrolling
    horizontally. the first  should be constant when i scroll the report horizontally .
    please help me.
    it's urgent.

    Hi,
    Suppose your first field is itab-matnr.
    WRITE :/ itab-matnr.
    SET LEFT SCROLL-BOUNDARY.
    WRITE :/......."Remianing fields

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
    I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
    for jquery selector. Would appreciate any help or direction???

    Thank you for your response. I am very new to Jquery so don't understand all that well.
    What I did:
    I created a dynamic action
    Event: Click
    Selection Type: jQuery Selector
    jQuery Selector: tdheaders
    Created True Actions
    I created an alert to see if this is being executed.
    Alert 'I made it here'
    What I have:
    I created a report region with the following query:
    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    I created 'SELECT' column as Link Column
    Report Attributes
    Link Text Select
    Target Page in this Application
    Page 2
    Region Header
    <div id="ModalForm2" title="Employee List" style="display:none">
    Region Footer
    </div>
    This report is displayed in a modal form when a button is clicked.
    Code for modal window in Page Header
    <script type="text/javascript">
    $( function() {
    $('#ModalForm2').dialog(
    { modal : true ,
    autoOpen : false ,
    buttons : {
    Cancel : function() {
    closeForm2();
    function openForm2()
    $('#ModalForm2').dialog('open');
    function closeForm2()
    $('#ModalForm2 input[type="text"]').val('');
    $('#ModalForm2').dialog('close');
    </script>
    I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
    back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
    If I let the submit to happen, all other entered fields are cleared on my main form.
    Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.

  • How to implement Dynamic Sort to an SQL classic report?

    Hi,
    I'm trying to implement dynamic sort to my working sql classic report, when user selects order by column from select item(action as submit page), the report should be refreshed and display with the selected column sort order.
    But not able to do so.
    Report Query:
    Select a, b, c from sample order by :P1_ORDER_BY
    P1_ORDER_BY - Select Item:
    STATIC2: Column 1;a, Column 2;b, Column 3;c
    Running page, report doesnt sorts in any of the column priority.
    Kindly guide.
    Regards,
    Krishna

    Of course the select item is in use.
    It should submit the the page on select so you can retrieve the current value in you report select statement.
    look here:
    http://apex.oracle.com/pls/apex/f?p=21296:2:
    table:
    create table sample
      a varchar2(30)
    , b varchar2(30)
    , c varchar2(30)
    insert into sample values('a','z','k');
    insert into sample values('b','y','d');
    insert into sample values('c','x','a');
    insert into sample values('d','w','b');
    commit;
    Select List:
    P2_ORDER_BY
    STATIC:Order by A;A,Order by B;B,Order by C;C
    Report select:
    select
    a,b,c
    from sample
    order by
      decode(:P2_ORDER_BY,'A',a,null)
    , decode(:P2_ORDER_BY,'B',b,null)
    , decode(:P2_ORDER_BY,'C',c,null)Marc
    Edited by: telemat on Aug 24, 2012 1:50 PM

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link).
    I am running Application Express 4.0.2.00.07 on Oracle 11gR1.
    Any help would be great.

    Hi VANJ,
    Sorry for the poorly written original post. I will be much more specific.
    I have a Interactive Report on page 40. That report has a column named X_UID that is a link back to page 40 and sets a text item named P40_X_UID in a Region we will call "Form X" with the value of the column. That page refresh also then calls a Automated Row Fetch process to fetch all the values needed for the rest of the page items in the "Form X" region. Also "Form X" region has a conditional display on to only display when P40_X_UID is not null.
    What I would like to do:
    When the user clicks on link in the IR for X_UID instead of the "Form X" region becoming visible I would like to become modal. I am trying to use a Plug-In named "ClariFit Simple Modal - Show". I have it working with a Dynamic Action when you click a Page Item. But I would like to to work when the link is clicked and the data populated.
    I hope that helps some.

  • Showing particular row in a color depending on a column in classical report

    Hi,
    I have a classical report with a column as "Affirmation Status". This column can take three value as "Affirmed, Rejected or NA". My requirement is I have to show all row in one color like red wherever it has value affirmed, and all row in color like green wherever it is rejected.
    Pls give some idea.

    Hi chandra Bhanu,
    create PL/SQL Dynamic content region for your report for showing the row in different color on the basis of conditions
    i am giving you sample code..you can modify according to your requirement
    declare
    cursor emp_data
    is
    select empno,ename,sal,status from emp;
    begin
    htp.p('<table width="100%" bgcolor="#DCE6F1"><tr>');
    htp.p('<td width ="20%"><b>Empno</b></td>');
    htp.p('<td width ="20%"><b>Employee Name</b></td>');
    htp.p('<td width ="20%"><b>Salary</b></td>');
    htp.p('<td width ="20%"><b>Status</b></td>');
    htp.p('</tr></table>');
    for c_emp_data in emp_data
    loop
    htp.p('<table width="100%"><tr><td>');
    if c_emp_data.status = 'Affirmed' then
    htp.p('<TABLE width="100%"><tr bgcolor="#FF0000">');
    htp.p('<td width ="25%">'||c_emp_data.empno||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.ename||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.sal||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.status||'</td>');
    htp.p('</tr></table>');
    elsif  c_emp_data.status = 'Rejected' then
    htp.p('<TABLE width="100%"><tr bgcolor="#006400">');
    htp.p('<td width ="25%">'||c_emp_data.empno||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.ename||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.sal||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.status||'</td>');
    htp.p('</tr></table>');
    else
    htp.p('<TABLE width="100%"><tr>');
    htp.p('<td width ="25%">'||c_emp_data.empno||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.ename||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.sal||'</td>');
    htp.p('<td width ="25%">'||c_emp_data.status||'</td>');
    htp.p('</tr></table>');
    end if;
    htp.p('</td></tr></table>');
    end loop;
    end;Hope this will helps you.
    Regards,
    Jitendra

  • Need help in sorting a column in classic report

    Hi I am trying to create and classic report and I need to do sorting on the columns. Also I am using a select list to filter the records in the column. When I am not using the select list the sorting is working but when I am using the selcet list and select the sort option then it is showing error. Can anyone help...
    Thnaks,
    Rik

    Select lists prior to v4 will sort on the return value. In v4, it sorts on the display value (as you're probably expecting). There's nothing really for you to fix here except if it's really important, see if you can get upgraded to v4.

  • OnMouseOver displays Tooltip from hidden column of classic report

    What: The Goal:
    Make easily available more information than fits on one line of the screen without using multiple fixed lines.
    Background:
    Classic report with 18 data items (columns) visible. Has Search box and user can choose number of rows displayed.
    A couple data items can be long (20-30 characters) compared to the screen width. The right-most data item might run 100 characters.
    Proposed Strategy:
    1) Display the first n characters of the long item(s) on the report.
    2) On onMouseOver display the entire item.
    Proposed Approach:
    1) For each column with long data, hold the entire value in a hidden item.
    2) Display long (hidden) value in tooltip (bubble?/balloon?) upon onMouseOver of that value.
    Note: This is not ToolTip/Help for a column but display of the long value for a specifc item in the row of a column.
    Sought After Feature:
    1) To reduce maintenance, would like to implement for multiple columns using a single common block of code.
    Question:
    Given other approaches you know, is this a good approach to achieve the goal? Alternative approaches?
    Howard

    Well it took a while and you really made me work for this. :)
    For the end result hover on the Job Ln Nm column.
    http://apex.oracle.com/pls/apex/f?p=991202:1
    I added some old code I had laying around. It adds a bubble that will stay up for 5 sec or until you click away or hover on another record.
    What I would do at this point is just truncate (with a substr) the length of the Long Nm to something short. Use whatever indicator you want for the hover. Like for example these glasses <img src="#IMAGE_PREFIX#Fndview1.gif"> It's really up to you.
    You'll see there's an AJAX Callback PLSQL where you can retreive and format the content of the popup to whatever you want. You could make it real pretty.
    Here's what I did:
    1. New ShowJob javascript procedure.
    function ShowJob(pThis,pId){
         this.dTimeout;
         clearTimeout(this.dTimeout);
         this.dGet = dGet;
         this.dShow = dShow;
         this.dCancel = dCancel;
         var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=FULL_LONG_NAME',$v('pFlowStepId'));
         this.dGet();
         return;
         function dGet(){
               this.dTimeout = setTimeout("this.dCancel()",6500);
              get.addParam('x01',pId);
               get.GetAsync(dShow);
         function dShow(){
               $x_Hide('rollover');
               if(p.readyState == 1){
               }else if(p.readyState == 2){
               }else if(p.readyState == 3){
               }else if(p.readyState == 4){
                     $x('rollover_content').innerHTML = p.responseText;
                     $x_Show('rollover');
                var l = findPosX(pThis)+pThis.offsetWidth+5;
                     var t = findPosY(pThis);
                $x_Style('rollover','left',l + 'px');
                     $x_Style('rollover','top',t + 'px');
    // This math would center on the vertical           
    //                 $x_Style('rollover','left',findPosX(pThis)+pThis.offsetWidth+5);
    //                 $x_Style('rollover','top',findPosY(pThis)-($x('rollover').offsetHeight/2)+($x(pThis).offsetHeight/2));
                   document.onclick = function(e){
                   dCheckClick(e);
               }else{return false;}
         function dCheckClick(e){
              var elem = html_GetTarget(e);
              try{
                        var lTable = $x_UpTill(elem,"DIV");
                        if(lTable.id!='rollover_content'){dCancel();}
                        else{}
              }catch(err){dCancel();}
         function dCancel(){
               $x_Hide('rollover');
              document.onclick = null;
               get = null;
    }2. Rollover div on the page footer (div id="rollover"...). Of course this could be a region also.
    &lt;div id="rollover" style="display:none;color:black;background:#FFF;border:2px solid #369;width:290px;position:absolute;padding:4px;">
    &lt;div id="rollover_content">&lt;/div>
    &lt;/div>
    3. PLSQL AJAX Callback. : FULL_LONG_NAME
    -- select your value with apex_application.g_x01
    htp.p('You hover over ' || apex_application.g_x01 || '<br>');
    htp.p('Here is the Full Long Name: XXXXXXX XXXXXXX XXXXXXX 1234565');4. Changed Long Nm column to be a link with the onmouseover call that calls the new procedure ShowJob. I made the assumption that with the NUM parameter you could fetch the full record of what you need.
    onmouseover="ShowJob(this,#NUM#)"
    That should be it.
    Let me know what you think.
    -Jorge
    Edited by: jrimblas on Apr 22, 2013 1:05 PM: Added code to post for completion

  • Grouping of columns in classical report

    Hi,
    I have a classical report and it has a about 30 to 40 columns . I want to do grouping of columns.
    E.g  First six columns i want to LABLE as a net rate columns. other 5 column label as  Git columns . How i can do this ?
             Net Rate                                       GIT
    col1  col2 col3 col4 col5 col6         col7 col8 col9 col10 col11
    Thanks & Regards
    Vedant

    Try to change report template.
    Or write own plugin-report.

  • Dynamic list of columns in a report

    Hi
    I need to select a few columns dynamically in a report .how to do that?
    thanks in advance
    Neeraj

    Hi,
    You can try lexical paramters something like this
    SELECT &PARM_1 COL_1, &PARM2 COL_2
    FROM EMP
    WHERE &PARM_1 = :DEPTNO
    Hope this helps.
    regards
    gaurav
    null

  • How to Breake Column in Classic report.

    Dear Friends
    i want to display Employee information so I have created classicreport using below sql query
    select
    EMP_ID,
    FIRST_NAME,
    MIDDLE_NAME,
    LAST_NAME,
    GENDER,
    BLOOD_GROUP,
    MARITAL_STATUS,
    ADDRESS_1,
    ADDRESS_2,
    CITY_NAME,
    PINCODE,
    PHONE_NO,
    MOBILE_NO,
    FAX_NO,
    OFFICE_NO,
    EXT_CODE,
    EMAIL_ID,
    ANNIVERSARY,
    BIRTHDAY,
    QUALIFICATION,
    DESIGNATION,
    MGR_CODE,
    DATE_OF_JOINING,
    EMP_IMAGE,
    PASSPORT_NO,
    SKYPE_ID,
    ACTIVE_FLAG
    from DEMO_EMP  where EMP_ID =:APP_USER
    Problem is all coloumn display in report but i need to display 4 column and  then 4 column in right side and  then 4 column in right side.
    I need breake after 4 column .How can i do this.
    Thanks

    modify your query and include ROW_NUMBER, move everything to an inline view and include a CASE statement to hide some of the values... wow, very cryptic.. there is an example here:
    SQL*Plus or Report style Break Groups in SQL Query&lt;/title&gt; //&lt;title&gt;AMIS Technology Blog &amp;raquo; SQL*…

  • Dynamic selection of columns in Portal Report

    I have to create a Report, in Oracle Portal, where I select the columns to be displayed according to the value of the language parameter returned by a PL/SQL procedure.
    (So, if "English" I display columns A and B, if "French" I display columns A and C, and so on... )
    How should I do?
    Helps are welcome.
    Thanks

    The strings replaced by expression <%= v_cell %>
    should print the field values contained in col1,col2,col3 columns, but nothing is printed . i think the custom tags (rw...) are not replaced by the jsp expression properly.

  • How to Link column header only in classic Report in APEX 4.1

    Hello Everybody,
    Probably there is a simpler way to do this, but I am not sure. I want a link on column header in Report on a specific column. The link will take me to new region or a page.
    How to achieve this in APEX 4.1
    Theme : Blue 2
    Database 11g
    I see there is a column link opiton, but that creates link for every row in that column on a specific icon, I just want link on a title of the column in Classic Report.
    For Example,
    if there are two columns Name and Client ID, which has 10 records to display on a classic report. I wan the link on Client ID on header only not on the records.
    Can anybody provide some simple solution for this.
    Thanks,
    --CP
    Edited by: cpora007 on Jun 22, 2012 10:38 AM

    Hello,
    I didn't understand, what do you mean by default it is going to sort popup. I have a classic report based on SQL, which generates a report with static header, there is no sort or any other link on that.
    I added a link in column header name with an anchor. It works and takes to the new page.
    But it is not a proper solution. A solution based on Jquery dynamic action is preferable. Also the preferred option is that the link opens a hidden region of the same page at the same location of the report and the report gets hidden. after the procession on the form region and submitting the update/ insert process. the report region shows up with the change data.
    Moving on to new page is 2nd option, if the first do not work.
    In the JavaScript, put: apex.submit("GO_TO_MY_OTHER_PAGE");
    On the page, create a Branch to the Second page. Set the condition to Request=Expression 1. Set the request to "GO_TO_MY_OTHER_PAGE"
    On which page I need to create a branch?, Is it on the report page or the form page.
    Thanks a lot for the response. I appreciate your kind efforts in this regard.
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Cover Flow View: Changes in "Information" not updated in Cover Flow

    Hi When changing text in "Information" like name of the artist or the album or just using a big letter instead of a small letter it doesn't seem to be updated in Cover Flow View. For example: I changed the name of the album of "The division bell" to

  • Satellite P10-804: HDD Issue SMART WARNING

    When I start up or reboot I get a message: SMART: HDD Failure Is Imminent - Back Up And Replace HDD - Press F1 To Continue Not the exact wording, though more or less correct. This started 3 days ago. Basic online research suggests that the SMART warn

  • List of AS stack technologies?

    One way to view AS is as a development platform loaded with technology and protocols for "web applications". I think this better describes AS for what it really is, hrmm. What I'm looking for is a list of technologies (stuff) in AS - for a presentati

  • Converting vinyl records

    Can someone recommend an app to convert vinyl records to iTunes?  I have used Audacity and EZ but they don't always replicate the track and album information when imported.  Griffin iMic/Final Vinyl has been recommended but I live in Kenya and can't

  • Software monitoring and latency

    I've heard people mention that they turn off software monitoring to minimize latency, but I don't see how to do that. I realize it has to do with the equipment and maybe my device does not allow for non-software monitoring. I'm using items none of yo