Current value of a column.row in a Report region

Hi
I have a report that I want to display a single row per page. No problem there. I also want to show, in a separate region below the value of two specific columns for that row (they are large text items that I want to show as text areas).
My problem is how to have the source of the text area data items match the current report row above. What I want is sort of;
SELECT TEXTFIELDNAME FROM TABLE WHERE KEY = value from column1 in the report above above (like the #EMPNO# notation when linking a report column to another page)
Or maybe there is a better way ?
Any pointers much appreciated.
Jules

Hi Jules,
As always you've some options to achieve what you would like to do.
If you know AJAX, you could do it that why, if not an "easier" why of doing it:
1) Create an hidden item
2) In your report make a link to the same page, but give as parameter the hidden item with the pk as value
3) In your where clause of your select to fill in the text area, you search for the hidden item (WHERE key = :HIDDEN_ITEM)
Hope that helps,
Dimitri
-- http://dgielis.blogspot.com

Similar Messages

  • How do I set an id to a table row in a report region?

    How do I assign an id to a table row in a report region? I am trying to uniquely identify a row in the result set. What I want to do is have the report region render an id for each tr tag i.e.
    <tr id='1'>...</tr>
    <tr id='2'>...</tr>
    <tr id='3'>...</tr>
    Thanks,
    Boyan

    Hello,
    In the Before Each Row attribute of the report template you are using add something like this.
    &lt;tr id="row_#ROWNUM#">ID's in HTML should never start with a number it won't break anything but it's wrong that's why I put row_ first
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • How to split a single column row  in alv report

    Hi All,
    I need to split a row of the particular coolumn in alv report.
    for example row size is 10 that should be split into 5 & 5.
    Thanks
    Ram

    Hi Ram,
    You can add one more column for that..
    while processing your internal table you can split the value for that column using offset..
    DATA :  FIELD_STR(10) TYPE C.
    VAR1 = FIELD_STR+0(5) .
    VAR2 = FIELD_STR+5(5) .
    Now you can print this both VAR1 and VAR2 in seperate column.
    Please search on SCN before posting any question..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • How can I get the values of the selected row in the report?

    Hi All:
    I have a dynamic query(lexical parameters)that columns are selected at the run time. And depend on the values, I'd like to do another query just for certain row. For example, when I double click on the fifth column of the fifth row. I'd like to collect all the column values of this fifth row. I think It likes drill-down report, but I don't need a detail report. I just want a string of the combination column's values. Would you please help?
    Thanks, in advances, for your help.
    TD

    Hi:
    I got it.
    Thx,
    TD

  • Calling multiple sub-reports based on the values in a column in the main report

    All,
    Say, I have a main report with 4 parameters and 8 columns in it's tablix, there is 1 column in this main report that can have 3 values, say A,B,C. If the user clicks on "A", he will be directed to Subreport A, clicks on "B", he will be
    directed to Subreport B and if he clicks on "C", then he'll be taken to Subreport C. All works fine when I call subreport A and B from that column, because both of them have the 4 parameters that we can map back to the parameters of the main report
    in the "Go To Report" section.
    Now, for Subreport C, I'll need to map all those 4 parameters + I will also need to map the parameters in my Subreport C to the FIELDS in the main report. Subreport C has 8 parameters, so 4 of them get mapped to the parameters of the main report and
    the other 4 get mapped to the fields in the main report.
    Now, when I call the Subreport C from my main report, that runs fine, but, I get an error when I try to call my other subreports A and B. The error says "Parameters in the subreport are not defined", probably because it tries to map the fields
    in the main report to the non-existing parameters in mu Subreport A and B.
    Any ideas/suggestions/workarounds would help a lot. Also, if someone can point me to a link where multiple subreports are being called from the column of a main report would be a great help too.

    One simple solution would be to add the additional 4 parameters to subreports A and B. Just don't use them.
    I assume you are calling the subrebort using Go to report action property of the tablix cell control. Try switching to Go to URL. Then use expression builder to dynamically create your url:
    ="http://YourReportServer/Reports/Pages/Reports.aspx?ItemPath=%2fYour%2fReport%2fPath%2fReport"+Fields!Column1.Value+"&Parameter1Name="+Parameters!Param1.Value+"&Parameter2Name="+Parameters!Param2.Value+"&Parameter3Name="+Parameters!Param3.Value+"&Parameter4Name="+Parameters!Param4.Value+IIf(Fields!Column1.Value="C","&Param5="+Fields!F1.Value+""&Param6="+Fields!F2.Value+""&Param7="+Fields!F3.Value+""&Param8="+Fields!F41.Value,"")
    Now this is a rather long formula which is why I prefer just adding the other 4 parameters to all of the subreports but this expression opens the report from the url and only when Column1 field is "C" does it also pass the additional 4 parameters.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Show APEX Row Number in Report Region

    I would like to display the row number in the report region at the beginning of each row for each page (based on the number of rows to display per page).
    So if the number of rows per page is 15, I would want to show each row from 1 to 15. When going to the next page (16 - 31) I would like to show row 1 to 15 again next to each row.
    And if the number of rows per page is 20, I want to see row numbers 1 to 20 on each page.
    Since I believe an Update button only processes the current page, I would like to then use this row numbers (1 - 15) to get the values of the displayed column for each row to perform an insert to another table.

    You can use something like this:
    SELECT apex_item.text (1, '#ROWNUM#') row_num, empno, ename,
           deptno, comm, sal, mgr
      FROM empExample is here:
    http://apex.oracle.com/pls/apex/f?p=31517:284
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Export for all rows of a Report Region

    Hi,
    I have a html region with a query button to restrict which rows get selected in a reports region below it.
    But I also want to have a link to export all rows in the report to a csv file. Button the report region may already
    have selected data in it that is not necessarily all rows in the report. Thus I guess I am wondering if I should
    create a whole separate hidden report region that will always select all rows in the query to relate the
    export link to? Or if I can someone use the current report region and select all rows for the export but
    not requery or change the currently displayed report regions results?
    Thanks in advance!

    Yes I just created a hidden report i.e. one with all columns set to
    APEX_APPLICATION.G_EXCEL_FORMAT = TRUE
    And then just create a javascript function to call the export routine...

  • Get information from a row in a report region to be used in conditions

    Hi,
    I have a page with 2 regions.
    First region is a report from a table (departments) and the other region is another report region (employees).
    One of the columns in the departments report is a link that when I click on it, it will refresh the second region to show the employees by department.
    My issue is when I open the page for the first time or get back from another page, I want to show by default the employees for the first department. I don't know how to get this value and assign it to a a Page Item and use this page item in the second report.
    I appreciate any help.
    Thanks
    andrese

    Andrese
    For page item (which you populate when user clicks on department report link), write default value as plsqlfunction body and try something like
    DECLARE
    v_dummy tbl_dept.dept_id%TYPE;
    BEGIN
    SELECT dept_id INTO v_dummy FROM tbl_dept WHERE ROWNUM = 1;
    RETURN v_dummy;
    END;I take it you populate dept_id into page item, when users click on department report link. You can change this according to your requirement. Also make sure that the SELECT query matches with your department report query so that first row of your department report always matches with above SQL query output.
    Please note that this may not work if your department report query contains any GROUP BY/ORDER BY/HAVING clauses
    Cheers,
    Hari
    Edited by: Hari_639 on Oct 5, 2009 9:04 PM

  • Enable particular row of apex_item report region....

    Hi guys,
    I have a report region.i used apex_item to create report region.
    select apex_item.checkbox(1,ADDRESS1)
    chk_bx,apex_item.text(2,ADDRESS1) Address,apex_item.text(3,ITEM1) Item,null from address_details;On page load i disabled the report region by using below javascript
    function disableItems(pRegionStaticId,pDisableFlag) {
    alert('disa');
      $('#'+pRegionStaticId).find('[name^=f]').each( function(){ /* matches fxx */
        if( $(this).attr('name').match(/f[0-9][0-9]/) ){
          return $(this);
      }).attr('disabled',pDisableFlag);
    }After the report region get disabled,i have to enable a particular row of report region, ie when i set click first row f01[0] (f01 is checkbox), then i enable that row(clicked row), if i click second row f01[1],then i have to enable that row vice versa...
    Is that any javascript to achive this?
    Thanks in advance

    Hi
    i have a report with parameter is the year i can select a multiple value.
    Below is an example for the result:
                                    year
     Data        2010    2011   2012  
     hp          14         25           30    
     Dell        17         18           20
    i need to get the value of the last previous i mean i this example i have the last year is 2012 i need the value of 2011
    i tried a script with vb.net but i don't get the result i get only the value of year this is my script
    Dim Shared Num1 As StringDim Shared values As System.Collections.ArrayList=New System.Collections.ArrayList()Public Function GetVal(Val as Integer,Year as Parameter)  as String   If Year .IsMultiValue then    For i as integer=0 to Year.Count-2          Num1= Year.value(i)                       Next    End If   Return Num1End Function
    this script return me 2011 but me i want the value in of the year 2011
    thanks

  • How to get the number of rows in a report region

    Hi all,
    Is there a way to get the number of rows returned in a report region, without issuing an additional "select count(*) from some_table"?
    I mean something like the substitution string #ROW_NUM# but for the total rows.
    Thanks,
    Pedro.

    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/ui.htm#CHDDGGEG
    For classic report regions, the region footer supports the following substitution strings:#ROWS_FETCHED# shows the number of rows fetched by the Oracle Application Express reporting engine (the page size). You can use these substitution strings to display customized messages to the user. For example:
    Fetched #ROWS_FETCHED# rows in #TIMING# seconds.
    *#TOTAL_ROWS# displays the total number of rows that satisfy a SQL query used for a report.*
    #FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED# display the range of rows displayed. For example:
    Row(s) #FIRST_ROW_FETCHED# through #LAST_ROW_FETCHED# of #ROWS_FETCHED# displayed>
    Ta,
    Trent

  • Row value as one column/row value

    Hi,
    I want below values like 1;2;3;4;5;(same like we get by using UserResponse function for user prompt but this is simple object not user prompt)
    1
    2
    3
    4
    5
    thanks in advance
    Prabhat
    Edited by: prabhat2009 on May 19, 2009 6:42 AM

    Hi Prabath,
    Alas, this is not simple, I have to challenge the solution road you choose.
    Can't you work with a rotated table? So say the object normal table would be:
    <object name>
    1
    2
    3
    4
    5
    the rotated table would read:
    <object name> 1 2 3 4 5
    So if you were to hide the header of this table and may be put a ";" after each object value,
    you get almost the same.
    Plus; it scales automatically based on the number values for the object.
    Minus; it requires a fixed width, row by row autofith option doesn't exist for column by column...
    Only other (complex) option:
    Create a table with the object (first one).
    Give the table a footer line.
    Now in the footer use the following formula:
    max(<object name>&previous(<object name>)&previous(previous(<object name>))&...)
    Then you fold the table and show only the footer.
    Now the downside here is that obviously you will have to know just how many occurrence of object name there are. So I really wouldn't recommend it unless there are really few values max.
    Good luck,
    Marianne

  • Show Hide Few columns rows in a report

    Hi All,
    I had requirement to develop an application having a report and based on some condition we need to hide or show few rows on clicking. Please view this report [here |http://apex.oracle.com/pls/otn/f?p=33897:1]
    For example if I give CUSTOMER_ID as a hiper link when I click on "1" first 5 rows only should be visible. That is I need to toggle between hidden and shown condition.
    I tried using Java Script
    <script type="text/javascript">
    <!--
    function toggle_visiblity(id) {
    var e = document.getElementById(id);
    if(e.style.display == 'none')
    e.style.display = 'block';
    else
    e.style.display = 'none';
    //-->
    </script>
    And then using this script in query selecting the table and enclosing in &lt;div &gt; tag.
    It works for a single column but few rows it doesn't work. Can someone please help me here. Thanks in advance.
    Thanks & Regards,
    Vikas Krishna

    Hi
    Vikas.
    Here is an exmaple using emp (changed the empno to reflct you data so it's 10,11,12,13,100,101 etc...). I created a report with the source as
    SELECT FLOOR(empno/10)*10 startid,
           DECODE(CEIL(empno/10)*10,FLOOR(empno/10)*10,CEIL(empno/10)*10+10,CEIL(empno/10)*10) endid,
           DECODE(MOD(empno, 10),0, empno, NULL) empno
         , empno empno1
         , ename
         , job
         , mgr
         , hiredate
         , sal
         , comm
         , deptno
    FROM bb_emp
    ORDER BY empno1Then I created a new template from scratch and selected named rows. I created Row Template one as
    <tr>
    <td>#EMPNO#</td>
    </tr>
    <tr id=row#EMPNO1#>
    <td>#EMPNO1#</td><td>#ENAME#</td><td>#JOB#</td><td>#MGR#</td><td>#HIREDATE#</td><td>#SAL#</td><td>#COMM#</td><td>#DEPTNO#</td>
    </tr>Then I included js in the header as follows
    <script type="text/javascript">
    <!--
    function toggle_visiblity(startid, endid) {
    var i;
    var id;
    for (i=startid; i<=endid; i+=1)
         id = 'row' + i;
         $x_Toggle(id);
    //-->
    </script>Then I hid the startid and endid columns in the report attributes and change empno (not empno1) to be a link as follows
    javascript:toggle_visiblity(#STARTID#,#ENDID#);This now works as (i think) you wanted. Obviously you'll have to put all you formatting etc. from your theme into the template.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Can I change the reort total: text in the summary row in a report region?

    Hi all,
    This might has been asked before, I tried searching the forum but couldn't find an answer. In the report attribute, if I tick the sum checkbox then run the page, the last row would give me the summary numbers which is what I want. However is there a way I can change the "report total" text in the last row of the first column?
    Thanks very much for your time.
    Pete

    Hello user9546327,
    I had the same problem, until I realised that the text seems to be printed under the first column of the report. If that one is a hidden column, the text won't be printed in the report.
    Solution:
    In the 'Report Attributes' tab, move the first visible column (= attribute 'Show' is ticked) to the top of the report columns.
    Best regards,
    Sabine

  • Set Page item value when paging through an sql query report

    I have a report that includes a checkbox to indicate which rows a process is to be run on. I have a "Select All" button that sets a value to check all boxes in the report, and deselect button to turn that feature off. The page only renders one of the buttons at a time depanding on the value. If the "Select All" is turned on, I would like to set the value to "OFF" when a user goes to another page of the report.
    For example:
    A user enters the page and the report is rendered. The rows returned are greater than what is displayed. The paging options for the report are shown. 1-15 16-30 etc. It is currently showing the first 15 rows of the report.
    The user clicks the select all button, and all checkboxes are now checked. Currently it will remain this way until the deselect button is clicked.
    When the user clicks the report paging, I would like to set the value of the Select All item to off.
    Does anyone know how to do this at this point?

    Hi,
    Try Scott's suggestion in Re: How to get query from region "PL/SQL function body returning string query"?
    Andy

  • Report region columns constrained to 4000 chars?   Hitting LOV problems.

    Hi all,
    I've hit a problem that I'm hoping will have a simple answer.
    Quick overview of issue:
    APEX 3.01 application running against a 10gR2 DB.
    We have an LOV defined that works just fine on various forms but in report regions where the LOV is available via a drop down column value in the report region HTML table we are hitting the error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Some judicious debugging reveals that this seems to be because we are trying to load in more than 4000 characters into the LOV drop down in the report regions HTML table column (it's a moderately large LOV)..
    This suggests that the default column type in a report region HTML table is VARCHAR2 and thus that there is a default 4000 character limit on any such column values, would that be a fair assumption? I know that the actual report row size always used to be limited to a total of 32k but this limit is a new one to me.
    If there is such a limit, does anyone have any suggestions on how to work-around it i.e. is it possible to redefine report region column values to be other datatypes/dimensions or should we be looking at using an alternative such as a pop-up instead?
    Many thanks.

    Hi Scott,
    Okay, what we have is a fairly simple Dynamic Page with two report regions (both standard type of 'SQL Query'). The second report region is the one causing us the headache. The column headings are set to 'Custom' but apart from that everything seems as it should be.
    The following query populates an HTML table being generated in the second report region (problem line in bold):
    SELECT apex_item.hidden(7,task_id)||
    apex_item.select_list_from_lov(1, estimate_type, 'TASKSMK', NULL, 'YES', 0,'** Select Task **',NULL, NULL) as "Task Type",
    '<img src="/i/themes/aqa/required.gif" alt="Required Field" tabindex="999" />'||apex_item.text(2, description,30,4000,'required="true"') as "Work Item(s)",
    dbms_lob.substr(apex_item.select_list_from_lov_xl(3, username, 'PEOPLE', NULL, 'YES', 0, '** Select Resource **', NULL, NULL),4000) as "Resource",
    apex_item.text(4, days,5,5) as "Days",
    apex_item.text(5, start_date,11,11) as "target Start (dd-mon-yyyy)",
    apex_item.text(6, NVL(end_date,ADD_MONTHS(start_date,1)),11,11) as "Target End (DD-MON-YYYY)",
    rownum link
    FROM
    (SELECT t.task_id,
    e.estimate_type,
    t.description,
    t.username ,
    t.days,
    t.start_date,
    t.end_date
    FROM estimate e, task t
    WHERE e.project_project_id = TO_NUMBER(:F172_PROJECT_ID)
    AND e.active_yn = 'Y'
    -- and t.days > 0
    AND t.ese_id = e.id
    --AND e.creation_date = (SELECT MAX(ei.creation_date) FROM estimate ei WHERE ei.project_project_id = e.project_project_id AND ei.active_yn = 'N')
    UNION ALL
    SELECT 0 task_id,
    0 estimate_type,
    NULL description,
    '0' username,
    NULL days,
    sysdate start_date,
    ADD_MONTHS(sysdate,1) end_date
    FROM dual
    CONNECT BY LEVEL < = TO_NUMBER(:P19_ROWS_CNT))
    All appears well until the number of values being returned in the second LOV (retrieved by the apex_item.select_list_from_lov_xl) exceeds 4000 characters and then we get the error first detailed. The substr around the function isn't usually present, it was added during the debugging, if I allow one more character than the 4000 or remove the substr completely then I get the error again. If the same function is used to retrieve the LOV on a normal Dynamic Form field then all is well, it only seems to have a problem when present in the HTML table being generated.
    Are we doing something silly here?
    Thanks.
    Message was edited by:
    jac

Maybe you are looking for

  • How can I find out which iTunes account was used to make a purchase?

    Without really understanding how iTunes and Apple IDs worked, I created a US iTunes account on my MacBook Air as some of the content I wanted wasn't available in the Australian iTunes store.  So I had two iTunes accounts on the one device and I just

  • Using Business Components in JSF pages

    I have several questions about using BCs in JavaServer Faces pages. I'm new to the JSF-BC development world. Here's what I'm trying to accomplish: a salesperson gets a call from a customer requesting a quote. The salesperson selects the URL for my RF

  • Migration App

    I recently migrated apps and data from my eMac to Mac mini. Now my Mac mini has the same name as my eMac. How do I change the name of my Mac mini?

  • My Iphone 4 has been messing up lately and its driving me crazy ! SOMEONE PLEASE HELP!

    I dont know whats going on. Voice Control will come on without the phone being touched. It will come on literally every 2 min, It drives me crazy ! how do i stop this? My phone will also switch from negative color to normal color and it will switch f

  • I'm getting an error message trying to upload a small Flash video to Facebook

    I'm uploading to a personal page. My video is 954K, and sized to the large rectangle format (336 x 280). It has a few simple animations, and a link button at the end. When I try to upload, I'm getting this error from Facebook: Any thoughts? Also, doe