Trouble with using javascript $s function to populate a page item

Hello Oracle APEX Community,
I'm working on a drilldown dashboard page and have been encountering a problem when i try to populate a Text Page Item (hidden or not) using the javascript built in $s function.
The function works great when the data is a number such as dept_id (even if the field type is varchar). However, trying to pass anything which is a text the process fails, except when a value is hard-coded as a parameter for the function. So for example, I have a chart with counts of constituents by state. I would like to populate (filter) a table based on when you click on a bar for a state without having to submit the page. I'm using dynamic actions and a built in javascript function in the SQL for the chart to accomplish this; but again, it works great when I use a varchar field like the FIPS code (i.e. the FIPS for Texas is '48'), but when I try to populate the page item using the state abbreviation 'TX' (again varchar) it fails.
Here's an example of code that works:
SELECT 'javascript:$s("P1_DEPTNO",'||d.deptno||')' LINK,
d.dname LABEL,
sum(e.SAL) sal
FROM emp e, dept d
where e.deptno = d.deptno
group by 'javascript:$s("P1_DEPTNO",'||d.deptno||')', d.dname And here's an example of code that does not work:
SELECT 'javascript:$s("P1_DEPTNO",'||d.loc||')' LINK,
d.dname LABEL,
sum(e.SAL) sal
FROM emp e, dept d
where e.deptno = d.deptno
group by 'javascript:$s("P1_DEPTNO",'||d.loc||')', d.dname However, when I hard code a text value the script works:
SELECT 'javascript:$s("P1_DEPTNO","BOSTON")' LINK,
d.dname LABEL,
sum(e.SAL) sal
FROM emp e, dept d
where e.deptno = d.deptno
group by 'javascript:$s("P1_DEPTNO","BOSTON")', d.dname
ORDER BY d.dname I'm encountering this problem on several versions of APEX: (4.0.2.00.07-local installation) and (4.1.0.00.28-apex.oracle.com)
Does anybody know of this problem and how to solve it? I've looked for settings on the page item itself, and can't figure it out.
I've re-written my sql to utilize the value fields of my tables instead but I have some objects on the page which are really going to depend on the character based data instead.
Thanks,
Wayne

In your javascript you are generating, surround your value with double-quotes and it'll should then always work with both numbers and strings (your strings are probably being interpreted as variable names and they don't exist at runtime, hence erroring out).
Example:
SELECT 'javascript:$s("P1_DEPTNO","'||d.loc||'")' LINK,Edited by: gti_matt on Aug 16, 2011 9:50 AM

Similar Messages

  • Having trouble with using variables in functions and after functions..

    Morning,
    I have simplified this, as it represents the core of what’s I obviously don't know how to do. 
    Problem:
    Say I populate that variable by reading in a list if IP addresses from file, finding the line that matches the hostname and place that string into the $IPAddress variable for use later throughout the script.   I did not run into a significant problem
    until I decided to convert the routine of looking up the IP address and populating the variable into a function.   As soon as I made it a function, and called that function, the $IPAddress variable only had the data in it until the function completed. 
    Once the function had done its work, and had placed the data into the variable, I expected that “new” data to be available after the function had completed..in that variable.  But it’s like the $IPAddress variable in the main script is a totally
    different data then the variable with the same name that’s used within the function. 
    So I think this demonstrates some of what’s kicking my butt.. 
    $IPAddress = "This is the wrong data”
    Function TestFunction () 
    $IPAddress  #call to display the contents of the variable at the start of the function. 
    $IPAddress = Read-Host -Prompt "Please enter the text ‘Goober’" 
    $IPAddress   #call to display the contents of the variable at the end of the function. 
    TestFunction
    $IPAddress ​
    The output I get is: 
    This is the wrong data
    "Please enter ‘Goober’"  : where I enter Goober
    Goober
    This is the wrong data
    Huh? 
    I had expected:
    This is the wrong data
    "Please enter ‘Goober’"  : where I enter Goober
    Goober
    Goober
    What good is the repeatability of a function if it’s output is lost? 

    THis seems to work.. IS there any reason NOT to do this?
    $Global:IPAddress= "This is the wrong data” #"
    Function TestFunction{
        Write-Host $IPAddress-fore green
          $host.ui.RawUI.FlushInputBuffer()
         $Global:IPAddress =
    Read-Host -Prompt
    "Please enter the text ‘Goober’"
        return$Global:IPAddress
    TestFunction
    return$Global:IPAddress

  • I'm having trouble with using Calculated-User Can Override, it will not honor my overide

    I'm having trouble with using Calculated-User Can Override, it will not honor my overide.  I'm using LiveCycle Designer ES v.8.2

    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    No data is lost due to a reset.

  • Anyone have trouble with using Last Pass on macbook pro

    anyone have trouble with using Last Pass on macbook pro
    Also does anyone find that Chrome is super slow on Macbook Pro with OS X 10.9.1??

    nellyfromsalt spring island wrote:
    anyone have trouble with using Last Pass on macbook pro
    why don't you just state what problems you are having?
    nellyfromsalt spring island wrote:
    Also does anyone find that Chrome is super slow on Macbook Pro with OS X 10.9.1??
    No, I use Chrome daily with 10.9.1 and it is still very speedy.

  • How do you populate a page item in apex with a value read from excel

    Dear All
    I am working on application where I am uploading a csv file in oracle apex. I then need to access a value in Cell B2 of the csv file and populate a page item called
    :P2100_AUTHORISATION_ID with this value. Many of the examples I have found upload the data using v_data-array into a table but I don't need to do that I just need to get the value from the csv file and then display additional information about the file allowing the user to either or continue or cancel the request to upload. I am running into a small problem that I can't explain and wondered if anyone had any ideas.
    Here is the code I am using to try and populate and item called :P2100_AUTHORISATION_ID but when I poulate the item the value is always 0. But if I replace the line :P2100_AUTHORISATION_ID:= v_data_array(2) with a raise_application_error(-20001,v_data_array(2)); The correct value is displayed in the eror. Any Help would be appreciate and I apologise in advance if this akes no sense at all:-)
    declare
    --variables needed to read excel data from flow files
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows number;
    v_sr_no number := 1;
    begin
    --------------------------------------get file info from www_flow_files
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    --Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(p_bl_wd_data_entry.hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    --get filename from wwv_flow_files
    select filename into :P2100_FILE_NAME from wwv_flow_files where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    :P2100_AUTHORISATION_ID:= v_data_array(2);
    -- Clear out
    -- v_line := NULL;
    --v_sr_no := v_sr_no + 1;
    END IF;
    END LOOP;
    end;
    Best Regards
    Lynn

    Hi Joel
    Continuing on from my last question, there was something else I want to ask if you dont mind.
    Now that I have the v_data_array(2) value in a page item I would like to use as an input value to a procedure to return some information I need displayed on the page. To do this I need to convert it to a number but when I try to so this I get the following error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    When I use the wwv_flow.debug that you told me about it is outputting a value '4851 ' so it look like there may be some sort of asii character causing a problem. I have tried using trim(v_data_array(2)) and ascii(v_data_array(2)) but nothing seems to work.
    Would you know how to convert a v_data_array value to a number? At the moment I am attemting to do it withiin the same code I attached in my earlier post but I have replaced the assignment of :P2100_AUTHORISATION_ID with the code below where P_BL_WD_DATA_ENTRY.getauthid is the procedure returning the values I need.
    :P2100_AUTHORISATION_ID:= P_BL_WD_DATA_ENTRY.getauthid(to_number(v_data_array(2)));
    Thanks
    Lynn

  • How to populate another page item based on cascading select lists?

    Oracle 10gXE
    APEX 3.2
    I've created cascading select lists based on the examples (using Javascript and AJAX) that i've seen on this forum. Thanks for help on that!
    Now that I have these LOV's being populated without needing to submit the page, how do I take the value that is presently in each LOV and concatenate them together to populate another page item? I'm trying to build the URL string that will execute an Oracle Report once the user clicks a button.
    Previously, when I had multiple Select Lists with a submit, the URL was being put together using an After Submit Computation that would set the value for an item (P26_REPORT_URL) on the page. Notice that a report parameter (i.e. parameter name and Select List value) is only included if the user has provided a value. The page item that holds these values is then referenced by a button for URL redirect. The URL Target for the button currently is: javascript:popupURL('&P26_REPORT_URL.'), but will not work at the moment because P26_REPORT_URL page item is not changing based on what is selected in the LOVs. Since I'm not submitting anything (do I need to?), how do I put together the values needed?
    Computation for P26_REPORT_URL:
    DECLARE
    l_param VARCHAR2(2000);
    BEGIN
    l_param := '&REPORTS_URL.&report=&P26_RPT_VIEW..rdf&desformat=&P26_DESFORMAT.&destype=cache';
    IF REPLACE(:P26_OLO_CODE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_olo_code=&P26_OLO_CODE.';
    END IF;
    IF REPLACE(:P26_BEG_DATE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_start_dt=&P26_BEG_DATE.';
    END IF;
    IF REPLACE(:P26_END_DATE,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_end_dt=&P26_END_DATE.';
    END IF;
    IF REPLACE(:P26_ORG_CODE_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_org_code=&P26_ORG_CODE_2.';
    END IF;
    IF REPLACE(:P26_FLAIR_ORG_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_flair_org_code=&P26_FLAIR_ORG_2.';
    END IF;
    IF REPLACE(:P26_BUDGET_ENTITY_2,'%'||'null%',NULL) IS NOT NULL THEN
    l_param := l_param||'&p_agy_code=&P26_BUDGET_ENTITY_2.';
    END IF;
    RETURN l_param;
    END;

    Andy,
    This is a great suggestion! After I posted, I started looking at a Javascript solution and figured it's probably what I had to do.
    However, now the cascading select list no longer working for some reason after I added the function to concatenate the item values. When I remove the showReport() function the select list works again.
    Here is what I have in the HTML Header portion of the page:
    <script language="JavaScript" type="text/javascript">
    function popupURL (url) {
      w = open(url,"winLov","resizable=1,width=800,height=600");
      if (w.opener == null)
      w.opener = self;
      w.focus();
    function showReport()
      var l_param = '&REPORTS_URL.&report=' + $v('P26_RPT_VIEW') + '.rdf&desformat=' + $v('P26_DESFORMAT') + '&destype=cache';
      if ($v('P26_OLO_CODE' != '')
       l_param += '&p_olo_code=' + $v('P26_OLO_CODE');
      if ($v('P26_ORG_CODE_3' != '')
       l_param += '&p_org_code=' + $v('P26_ORG_CODE_3');
      popupURL(l_param);
      function get_AJAX_SELECT_XML(pThis,pSelect){  
         var l_Return = null; 
         var l_Select = $x(pSelect); 
         var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ORG_SELECT_LIST',0); 
         get.add('TEMPORARY_ITEM',pThis.value); 
         gReturn = get.get('XML'); 
         if(gReturn && l_Select){ 
             var l_Count = gReturn.getElementsByTagName("option").length; 
             l_Select.length = 0;
             for(var i=0;i<l_Count;i++){ 
                 var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) { 
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{ 
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>

  • How can I use JavaScript extention functions with Xalan for transforming XML with XSL

    While transforming standart XML and XSL files to HTML with this servlet:
    package mypackage1;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.net.URL;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import org.mozilla.javascript;
    public class Servlet2 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    try
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xmlSource = new StreamSource(new FileReader("c:/aaa.xml"));
    Source xslSource = new StreamSource(new FileReader("c:/bbb.xsl"));
    Transformer transformer = tFactory.newTransformer(xslSource);
    transformer.transform (xmlSource, new StreamResult(out));
    catch (Exception e)
    e.printStackTrace();
    everything is going ok,
    but when try to use javascript function in XSL file, for example like in this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt" xmlns:my-ext="ext1"
    extension-element-prefixes="my-ext">
    <lxslt:component prefix="my-ext"
    functions="getdate">
    <lxslt:script lang="javascript">
    function getdate() {
    var d = new Date();
    return d.toUTCString();
    </lxslt:script>
    </lxslt:component>
    <xsl:template match="/">
    <p><xsl:copy-of select="my-ext:getdate()"/></p>
    </xsl:template>
    </xsl:stylesheet>
    recieve error-message:
    XSL-1000: (Fatal Error) Error while parsing XSL file (Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.).
    What kind of namespace I should specify?

    Hello, Paul.
    I'm sure you may not use JavaScript as a language for creating XSLT extention functions with Oracle XDK Parser. This is since parser might have JavaScript interpreter to work with JavaScript, but it has not.
    If you need to build any XSLT extention functions you must build them as Java class' static methods.
    After that, you define the usage of the class by mean of namespace declaration as:
    xmlns:your-ns="http://www.oracle.com/XSL/Transform/java/yourpackage.Yourclass"
    (Prefix "http://www.oracle.com/XSL/Transform/java/" may differs if you use non-Oracle XML parser)
    and use class' static method in XSLT:
    <xsl:value-of select="your-ns.staticMethodName(paramsIfAny)"/>
    In your case you may wish to use standard Date class:
    xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
    <xsl:value-of select="date:toString(date:new)"/>

  • Problem with using javascript in interactive adobe form

    Hi All,
        I have a problem when accessing text field value which is present inside a subform using javascript.
    I tried giving data.page4.sub-5.<fieldname>.rawvalue but its not working. Please provide a solution.
    Thank you in Advance.

    Since this question is related to JavaScript running within the Form and not the connection between the form and Web Dynpro - it really belongs in the Interactive Forms by Adobe Forum.

  • I am having trouble with a form, won't tab to 2nd page...

    I am having trouble with a form I created in Acrobat Pro 10. I created tabs etc, they all work wonderfully in Adobe, but once I uploaded it onto the web-based program for other users, the tabs only work  on page 1, I have to click on page 2 to keep tabbing through.  It won't tab into it.  Any advise?  Also, when the users open it it opens in the web.

    1. The library is separate from the application, so re-installing shouldn't cause an issue with the actual photos. But it would be foolhardy in the extreme to do anything without first backing up.
    2. Often these issues are caused by a damaged Library, so reinstalling doesn't change much.
    FWIW
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store you can find it in your Purchases List.
    Alternative approach:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Using Javascript to prevent a tab or tree item from navigating?

    Hello there,
    I have been trying to implement the functionality across my forms that if a user has entered data but attempts to navigate away by clicking on another tab or item in a tree list they are notified that they have not clicked submit and they will ose there changes.
    Using the help from: Re: detecting changes to items prior to submitting page I managed to get this working, so that if they (the user) have edited any items, an alert displays "Data has been changed. Continue anyway?", with the options OK and Cancel. However even if the user clicks cancel, the page will still navigate away losing the changes.
    In the provided link from the other thread, 'grahamr' appears to have provided the solution for this but later removed this code as he couldnt get it to display properly in the forums.
    Is there anyone else who might know how I can get the javascript to "block" navigation if the user selects cancel?
    Thankyou for any insight anyone can provide,
    Jordan

    Hmm,
    I had a look at your example application on the supplied link, however I cannot find any instructions or steps on how to go about implementing this method.
    Using my current method (from the thread linked in the first post of this thread) I have no problem getting the javascript to recognise changes and prompt the user on trying to leave - it's just that the href continues regardless of the user clicking cancel (wish grahamr managed to resolve somehow). Do you know why this might be?
    My javascript (2 posts above) is fired within the Anchor tag of my tabs and tree items like so; (Im only using [ ] brackets here so that it will display in the forum)
    [a onclick="javascript:checkForChangedData();" href="#TAB_LINK#" ][font color="#FFFFFF"]#TAB_LABEL#[font][a]
    Or if possible is there any assistance you could provide for implementing the method in your sample application? (I dowloaded the app but that page was not in it)
    Any help you can provide is greatly appreciated,
    Jordan

  • Trouble with the advanced search function on acrobat reader. Why won't it open? it used to, but suddenly stopped working.

    For some inexplicable reason the advanced search option in my acrobat reader 11.0.3 has stopped working. It worked just fine a few weeks ago. I am running Snow Leopard on my Macbook Pro. When I open advanced reader the pdf file I am trying to search ceases to be the active window. But no other window exists (in 'window' search is checked, but there is nothing there!). Does anyone have any ideas. I have downloaded and re-installed reader twice, and removed all earlier versions (I think). This is kind of urgent!

    It's a 3rd party app.  You really should contact Adobe Support and/or post in the Adobe Forums
    Mac OS X (10.6.6)
    Use Software Update or the OS 10.6.8 combo update to update your OS.  Also, update everything SU has to offer for your computer.  When done, repair permissions and restart your computer.

  • Troubles with using twice exec_sql in a procedure

    Then I've written a procedure (1), using exec_sql.execute, that executes an SQL string, given the number of columns.
    Then, I've written a procedure (2), using exec_sql.describe_column, that identifies the columns in the result of an SQL string.
    Both of them work.
    So I tried to merge them, so I shouldn't need to know how many columns I have to extract in the procedure (2), but, after executing the "(1)" part, an exception (ORA-306500: non-Oracle exception) is thrown when "res := exec_sql.execute(cursID)" is executed.
    Excluding exclusively one of the two parts with /* and */, I see that each part, stand alone from another, works!
    I use the same cursor (exec_sql.curstype) for both parts. I've also tried to use two different cursors, closing the former before opening the latter, but the results don't change.
    Where is the trouble?
    Thanks in advance.

    Here is the code. Thanks in advance.
    procedure push_xls_query(wh text_io.file_type, wh_web varchar2, titolo varchar2, testoquery varchar2) is
         type stringArray is table of varchar2(500) index by binary_integer;
         type intArray is table of pls_integer index by binary_integer;
         valori stringArray;
         tipi intArray;
         nRows number := 0;
         i number := 0;
         cursorID exec_sql.curstype;
         result pls_integer;
         colName varchar2(30);
         colLen number;
         colType pls_integer;
         numerocampi number;
         temp1 varchar2(80);
    begin
         -- Se la lunghezza del titolo e' maggiore di 31 caratteri, lancia una eccezione
         if length(titolo) > 31 then
              raise xls_exception;
         end if;
         pkg_txt_io.putline(wh, wh_web, '<Worksheet ss:Name="'||to_xml(titolo)||'"><Table>');
         numerocampi := 0;
    cursorID := exec_sql.open_cursor;
    exec_sql.parse(cursorID, testoquery, exec_sql.V7);
    message('Prima di execute'); message(' ', no_acknowledge);
         result := exec_sql.execute(cursorID);
    message('Dopo di execute'); message(' ', no_acknowledge);
         -- Stampa i nomi dei campi
         pkg_txt_io.putline(wh, wh_web,'<Row>');
         loop
              numerocampi:=numerocampi+1;
              begin
                   exec_sql.describe_column(cursorID, numerocampi, colName, colLen, colType);
                   tipi(numerocampi) := colType;
                   if colType in (exec_sql.NUMBER_TYPE,
                             exec_sql.FLOAT_TYPE,
                             exec_sql.ROWID_TYPE) then
                        temp1 := 'rightbold';
                   else
                        temp1 := 'bold';
                   end if;
                   pkg_txt_io.putline(wh, wh_web, '<Cell ss:StyleID="'||temp1||'"><Data ss:Type="String">'||to_xml(colName)||'</Data></Cell>');
              exception
                   when others then
                        if sqlcode=1 then -- -306500 then
                             exit;
                        else
                             message('Errore imprevisto: '||SQLCODE||' - '||SQLERRM);
                             message(' ', no_acknowledge);
                             return;
                        end if;
              end;
         end loop;
         pkg_txt_io.putline(wh, wh_web,'</Row><Row></Row>');
    i := 1;
    while i <= numerocampi loop
    valori(i) := null;
    exec_sql.define_column(cursorID, i, valori(i), 500);
    i := i+1;
    end loop;
    while (exec_sql.fetch_rows(cursorID)>0) loop
    nRows := nRows + 1;
         pkg_txt_io.putline(wh, wh_web, '<Row>');
    i := 1;
    while i <= numerocampi loop
    exec_sql.column_value(cursorID, i, valori(i));
              if tipi(i) in (exec_sql.NUMBER_TYPE,
                             exec_sql.FLOAT_TYPE,
                             exec_sql.ROWID_TYPE) then
                   temp1 := 'Number';
              else
                   temp1 := 'String';
              end if;
              pkg_txt_io.putline(wh, wh_web, '<Cell><Data ss:Type="'||temp1||'">'||to_xml(valori(i))||'</Data></Cell>');
    i := i+1;
    end loop;
         pkg_txt_io.putline(wh, wh_web, '</Row>');
    end loop;
         exec_sql.close_cursor(cursorID);
         pkg_txt_io.putline(wh, wh_web, '</Table></Worksheet>');
    end;
    procedure push_xls_simplequery(filename varchar2, testoquery varchar2) is
         wh text_io.file_type;
         wh_web varchar2(1);
    begin
         begin
              pkg_txt_io.delete_temp_file(filename);
         exception
              when pkg_txt_io.ex_web_io then null;
         end;
         pkg_txt_io.open(filename, 'w', wh, wh_web);
         push_xls_begin(wh, wh_web);
         push_xls_query(wh, wh_web, 'Sheet1', testoquery);
         push_xls_end(wh, wh_web);
         pkg_txt_io.close(wh, wh_web);
    end;

  • Using JavaScript / Custom function in ACTION_BEFORE_RENDERING

    Hi
    I need to include some of my own text in the print output of a template. On the template, I can include a text item, and include that text item in the print output. The problem, however, is that when printed, the text item's initial value is in the print output.
    So, I parametize the text item to include the Query Name, for example, and that value comes through in the print output.
    However, the client's request for some additional text to be included, namely the name of the iview. I can write JavaScript to extract the data they want included, and I can write the JavaScript to update the text item once the page has loaded, but the PDF generation doesn't seem to take that into account.
    I see on the Web Template Parameters there is a parameter called ACTION_BEFORE_RENDERING ... that seems to work nicely, but I can only hardcode a static value in there, or use one of the built in commands. This would probably work nicely for me, but I would need to call a JavaScript function ... any ideas?
    Cheers,
    Andrew

    HI
    Unfortunately, I didn't find a solution for that,
    I believe the problem is because you can run java scripts only after the whole report is loaded, so the only option is to run a command.
    I'm using the onLoad event and I'm hiding the main objects till after the java script function runs.
    And I also suffer from the same "flicker" issue.
    Shlomi

  • Trouble with using TortoiseCVS and Fireworks

    Hi,
    we're using Fireworks and TortoiseCVS in our company on
    several clients. There seems to be a problem having installed both
    software packages at once. Fireworks is crashing suddenly or
    producing broken files or corrupted content. Here's some
    description, what happens to us, when we've installed both
    software. Reproducable on several machines now...
    - Fireworks crashes with "internal error" msg by clicking in
    text objects
    - Fireworks cripple gradients (inverting and collapsing
    them...)
    - Fireworks changes suddenly the line height or font size in
    text objects
    - Fireworks damage written files, so they only are readable
    by photoshop or other "flat-png" applications
    - Diverse JavaScript error msg on random actions
    We are currently using:
    Windows XP SP#3
    Fireworks 9.0.1.1213
    TortoiseCVS 1.10.9
    Does someone also have problems using TortoiseCVS in
    dependency with Fireworks?
    Greetings
    Peter

    Hi,
    binding file references are supported for template bindings only and here you are allowed to have a single template only. So what you try is not supported. Please use a region for adding the page fragment (bounded taskflow) or copy the bindings into the main file
    Frank

  • Issues with use of PIVOT function

    I have a single table that gives me a Value ID for each record. There are 1-3 of them for each Dim ID. The Name values of these can be found in a 2nd table, by the Value ID from the first table. I feel like this can be handled with the pivot function, but
    I'm having trouble figuring out how to set it up properly.
    Samples are below. Top left is table 1. Top right is table 2. Bottom is how I need the data to be captured in a query.

    DECLARE @dimValue TABLE (dimID INT, valueID INT)
    INSERT INTO @DimValue (dimID, valueID)
    VALUES
    (6,1),(6,10),(6,14),(8,3)
    DECLARE @dimNames TABLE (valueID int, name varchar(50), type varchar(10))
    INSERT INTO @DimNames (valueID, name, type)
    VALUES
    (1,'George','First'),(10,'Micheal','Middle'),(14,'Johnson','Last'),(3,'Stan','First')
    -- without pivot
    SELECT v.dimID, MAX(f.name) AS first, MAX(m.name) AS middle, MAX(l.name) AS last
    FROM @dimValue v
    LEFT OUTER JOIN @dimNames f
    ON v.valueID = f.valueID
    AND f.type = 'first'
    LEFT OUTER JOIN @dimNames m
    ON v.valueID = m.valueID
    AND m.type = 'middle'
    LEFT OUTER JOIN @dimNames l
    ON v.valueID = l.valueID
    AND l.type = 'last'
    GROUP BY v.dimID
    --pivot
    SELECT DimID, MAX(first) AS first, MAX(middle) AS middle, MAX(last) AS last
    FROM @dimNames n
    PIVOT (MAX(Name) FOR type IN (FIRST, middle, last)) pvt
    INNER JOIN @dimValue v
    ON pvt.valueID = v.valueID
    GROUP BY dimID
    This shows you how to do it with and without a pivot.
    Please don't post data as images. You force us to manually type it.
    Refer to the top of the code to see one way to give us demo data and objects.

Maybe you are looking for

  • Service Orders ,Complaints,Sales Orders,Service Requests, data in Accoun fact sheet screen?

    Hi Team, Account related data is not populated in the service order data view and sales order data view and service request view in the account fact sheet screeen? We are using account factsheet BP_ACCOUNT_FS...In this account sheet,data is not popul

  • Problem executing command line program

    Hi I have a tuxedo command line app in Solaris 2.6. I was able to execute the program from unix prompt however when I try to do it from JAVA program, it does not work. I have to execute from command line as follows $ud32<SPACE>-U<SPACE>login<nl> SRVC

  • HELP! downloading newest version

    I downloaded the newest version and when i try to open iTunes, i get the message, "iTunes cannot run because it has detected a problem with your audio configuration" Everything worked well before the latest download.

  • Oracle sample application

    Hi, I have the Oracle OBIEE sample application installed using Virtual Box. I was wondering how you can see the repository used for the dashboards and scorecards? How can you download this onto a a windows PC? Thanks Helen

  • How to store iMovie files on external drive?

    I'd like to store large video files on an external drive, but iMovie seems to automatically import everything onto my internal hard drive. 1) Can I set it to automatically import to an eternal drive? 2) If not, which files can I safely move to an ext