Passing single quotes in a lexical parameter from forms11g to reports 11g

Hi,
We've upgraded our forms and reports from 10.1.2.3 to 11.1.2.1 and this has broken a number of reports where we pass a string of single quoted variables to reports as a lexical parameter.
v_string := ''''||:block.item1||''''||','||''''||:block.item2||''''
select *
from emp
where emp_id in (&p_string)
where v_string is simply passed as a text parameter to the report.
I'm not clear why this should break now (its worked since 6i) and whether anyone is aware of it and/or a solution.
Any help much appreciated as always
Thank you

Hi,
Thanks for the suggestion I will try and give it a go.
Do you mean for example in the form:
v_string := $$dq||:block.item1||$$dq||','||$$dq||:block.item2||$$dq
And in the report
Begin
replace(p_where_string,'$q','''');
end;
I would say that this even if this works it will prove painful to be updating every form AND report where this is used as we have a lot! I do really appreciate anyone taking the time to reply though!
It would appear that there are several bugs recorded against this type of problem when moving to reports 11...
Bug 11840698 - SIMPLE QUOTE REMOVED WHEN USING RUN_REPORT_OBJECT WITH PARAMLIST
Status 11 - Code/Hardware Bug (Response/Resolution
I will continue to update with responses from my SR.
Thanks

Similar Messages

  • Passing date parameter from forms to report

    Hi,
    I'm using forms and reports 6i.
    I want to pass one date parameter from forms to reports.
    Using
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);
    giving me error REP-0091- Invalid value for parameter 'P_FROM_DATE'
    This i think is because report expects date and here it is converted as varchar.
    Please help

    Hi Divya,
    Even I use this kind of statement
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);and works fine for me.
    This i think is because report expects date and here it is converted as varchar
    Correct.
    Open the report in the builder and under Data Model -> User Parameters, Go to the Property Inspector of P_FROM_DATE. Under Parameter, set Datatype as Character instead of Date.
    Hope this should work. and tell me if it works(coz it wokred for me).

  • How to pass parameter from FM to report without changing interface of FM

    Hello experts,
    How can I pass a table name from a FM to the report calling the FM, without changing the existing interface of the FM.
    Thanks,
    Ajay.

    Hi,
    I f you want to pass any parameter from FM to Report or Vice-versa, parameter should me maintained in the FM otherwoise you can't pass any other than existing parameters.
    Otherwise create a custom FM.
    Regards,
    Sunil

  • Pass the file id or a parameter from a report (10g) to the distribution.xml

    Is there any way to pass the file id or a parameter from a report (10g) to the distribution.xml file?

    Hi,
    Please review article ID 273960.1 on metalink.
    The article actually describes an issue one may run into while enabling a reports distribution xml file to accept dynamic values, but you can extract the answer you're looking for by studying the above mentioned note.
    Best Regards and Good Luck,
    Mircea.

  • How to send more than one parameter from FORM to REPORT?

    Dear all,
    i can send one parameter from FORM to REPORT. but when i send more than one parameter it gives error: frm 41214 unable to run report.
    here is the code i think the error is in the following line of procedure:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    where to place the parameters and is there any space is required?
    Thanks
    Muhammad Nadeem

    Dear Saeed Iqbal,
    thanks for you reply.
    dear i am using Form 10g run_product is not supported in this version.
    i am using RUN_REPORT_OBJECT.
    PROCEDURE rep_gl_ledger IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    v_date_from date;
    v_date_to date;
    v_detail_id_from varchar2(100);
    v_detail_id_to varchar2(100);
    v_voucher_type varchar2(100);
    --req_no char(17);
    BEGIN
    v_date_from :=      :ledger_para.p_date_from;
    v_date_to :=      :ledger_para.p_date_to;
    v_detail_id_from :=      :ledger_para.p_detail_id_from;
    v_detail_id_to :=      :ledger_para.p_detail_id_to;
    v_voucher_type :=      :ledger_para.p_voucher_type;
    repid := find_report_object('gl_ledger');
    --repid := find_report_object('REPORT80');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_online_FRHome');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /* Display report in the browser */
    WEB.SHOW_DOCUMENT('http://'||:GLOBAL.G_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
         message('Error when running report');
    END IF;
    END;
    Regards:
    Muhammad Nadeem

  • How do I pass single quotes into a string variable?

    Thanks for any help?
    Example
    Select xdat, yday
    from foo
    where
    xdat = to_char(sysdate, 'mm/dd/yyyy')
    How do I pass the single quoted stuff above into a string variable?

    Thank you but that is not the same thing. I am building a dynamic sql statement and need to pass the quoted material into a statement that is quoted Is that not what my example above shows?
    My example above has a quoted string inside a string. I think this is exactly what you were asking for.

  • Passing value to multi value parameter from SSIS using Report server webservice

    Hi
    I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
    So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
    No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
    My code as below
    ReportExecutionService rs = new ReportExecutionService()
    rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rs.Url = _webserviceURL;
    rs.LoadReport(_reportPath, null);
    ParameterValue[] paramval = new ParameterValue[2];
                            paramval[0] = new ParameterValue();
                            paramval[0].Name = "CountryCode";
                            paramval[0].Value = _countryNames;
                            **paramval[1] = new ParameterValue();
                            paramval[1].Name = "BusinessCode";
                            paramval[1].Value = _businessCode;****
                            rs.SetExecutionParameters(paramval, "en-us");
    I am not sure how to pass value to BusinessCode(Multi value parameter)

    Hi Rajkm,
    In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
    of these ParameterValue objects must be specified same to the parameter name.
    I found a good FAQ article for this scenario:
    How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
    http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
    Hope this helps.
    Elvis Long
    TechNet Community Support

  • Identify and replace a single quote in an In Parameter

    Can anyone tell me the syntax for finding and replacing a single quote in a user entered string? Thanks.

    Cav,
    I tried this:
    insert into emp values (9999,''''||'Must', 'ddd',7902, sysdate, 2000, null, 10) ;
    select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE          SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-12-1980        800                    20
          7499 ALLEN      SALESMAN        7698 20-02-1981       1600        300         30
          7521 WARD       SALESMAN        7698 22-02-1981       1250        500         30
          7566 JONES      MANAGER         7839 02-04-1981       2975                    20
          7654 MARTIN     SALESMAN        7698 28-09-1981       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-05-1981       2850                    30
          7782 CLARK      MANAGER         7839 09-06-1981       2450                    10
          7788 SCOTT      ANALYST         7566 19-04-1987       3000                    20
          7839 KING       PRESIDENT            17-11-1981       5000                    10
          7844 TURNER     SALESMAN        7698 08-09-1981       1500          0         30
          7876 ADAMS      CLERK           7788 23-05-1987       1100                    20
          7900 JAMES      CLERK           7698 03-12-1981        950                    30
          7902 FORD       ANALYST         7566 03-12-1981       3000                    20
          7934 MILLER     CLERK           7782 23-01-1982       1300                    10
          9999 'Must      ddd             7902 29-08-2005       2000                    10
    select * from emp where ename = ''''||'Must';
         EMPNO ENAME      JOB              MGR HIREDATE          SAL       COMM     DEPTNO
          9999 'Must      ddd             7902 29-08-2005       2000                    10Hope this helps
    Ghulam

  • Problem passing parameter from one interactive report to another

    Hi.
    I'm going slightly mad over this simple problem.
    Apex 4.0.2 installed. Created one interactive report with 4 columns, one is linked to a custom target which is another interactive report where the column is used in the WHERE clause through a hidden field value.
    This works fine in other applications on same Apex install, but not in this one.... Writing the hidden field to the screen shows that it gets the correct value from the first report, but the SQL-query returns no rows when querying on the :<parameter_name> value (there are rows in database - query runs fine when hard coding a value).
    Tried link column both directly from the column value link definition, and from the report definition - both pass value ok to hidden field, but SQL-query doesn't pick it up.
    Tried deleteing and recreating second report page, same problem.
    Anyone else had this problem? Are there any properties on the pages/fields that I've forgot to set, that may cause the session value not to be set when the query is running? I've got it working in other apps, and can't find anything done differently there....
    Regards,
    -Haakon-

    Yes, it shows the correct value. Also creating a second text field and assigning it the Source value of the hidden field shows the correct value in the textbox on page load.
    It's only the report's sql query that doesn't seem to get the value. Hard coding a document number (without hyphens etc) works fine, I get the expected records - so the rest of the query is correct.
    Tried '=' and LIKE - but still nothing...
    It's just the sql variable substitution of :P21_DOCNO that under no circumstance will work.... also tried a simple pl/sql block with the variable - nothing.... using the V('P21_DOCNO') - nothing....
    It seems like the sql query is parsed and run before the hidden field gets it's value or something....
    This is very strange - as it works in another application on same Apex installation.

  • Error While Passing Parameter from Form to Report

    I am using Dev 9ids. And i am compiling every forms from form 5 to form 9i. and report too.
    Most of reports are running.
    in some i am getting problem where i do pass more than 5,6 parameters.
    for e.g in one case say
    set_report_object_property(rep_id,REPORT_OTHER,'comp_code='||:global.vc_comp_code||' inv='||inv||' invoice_no='||inv_no||' invoice_date='||inv_dt||' vc_name='||cust_name||' Paramform=no');
    this will not run and give error FRM-41214
    when i exclude vc_name or shorten the value of cust_name report run fine.
    length of cust_name and in report vc_name is proper.
    I also need to pass more parameters to report.
    I do think there might be parameter size in any of report system files to be increased.
    Pls help me out how to rectify this problem.
    thanks in advance.
    raj

    You are not getting the result in the report because you have chosen the button event as Query.
    Edit the form, for the Execute button, choose the button event Custom and use the same pl/sql code that you have used before.
    If the event is Query, then the session object does not have value of A_EMPNO at the point where you have written your code. The session object is populated after the Query event has taken place.

  • Removing Outer Single Quotes for WHERE IN Clause from Join(Parameters)

    Hello,
    I am passing a multi-valued parameter into a dataset from a TypeBusiness dropdown list:
    =join(Parameters!prmTypeBusiness.Value,",")
    Here is the dataset query behind the TypeBusiness dropdown parameter list:
    SELECT     type_bus_code, bus_desc
    FROM       business
    WHERE     (type_bus_code IS NOT NULL)
    Here is the WHERE clause from the main dataset query (dsMainData) which gets the parameter values:
    WHERE  WEKAVG.BUSINESS_CODE IN(@prmTypeBusiness) 
    Here is the error I get when selecting values from the TypeBusiness dropdown list then previewing the report:
    "Cannot read the next data row for the dataset dsMainData.
    Conversion failed when converting the nvarchar value '1,2' to data type smallint."
    The value is a small int coming from the dataset query behind the TypeBusiness dropdown list, and the data type in the column expecting this value (in the main dataset query) is also a small int.
    I have tried many things, including a replace in the =join(Parameters!prmTypeBusiness.Value,","), a replace in the WHERE clause, a Split function, CAST to varchar, have researched this online and cannot solve this error.
    If someone could please help me save what little gray hairs I have left I would greatly appreciate any help, suggestion or point in the right direction.
    Thanks,
    Buster

    Thank you for the sample, but it returns no records. Is there something I need to change in this snippet you sent?
    DECLARE @prmTypeBusiness VARCHAR(20) = '1,2,4' -- say selected parameter values
    DECLARE @business TABLE (type_bus_code INT, bus_desc VARCHAR(20))
    INSERT @business SELECT 1,'A'
    INSERT @business SELECT 2,'B'
    INSERT @business SELECT 3,'C'
    INSERT @business SELECT 4,'D'
    ;WITH CTE1
    AS
    SELECT CAST(('<i><j>' + REPLACE(@prmTypeBusiness, ',', '</j></i><i><j>') + '</j></i>' ) AS XML) CSV
    ),CTE2
    AS
    SELECT CAST(i.query('./text()') AS VARCHAR(100))CSV
    FROM CTE1
    CROSS APPLY CSV.nodes('/i/j') As x(i)
    SELECT type_bus_code,
    bus_desc
    FROM @business
    WHERE type_bus_code IN (SELECT * FROM CTE2)
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • String containing apostrophe sign passed to text field via binded parameter from XDP displayed wrong

    Hello,
    I have a text field that is bound to a String field in XDP, sometimes when the field contains apostrophe sign (') generated PDF displays &#39; instead, for example if the value is he's it shows he&#39;s
    The field format is plain text only.
    The problem only appears occasionaly and rarealy and I can't find the reason and can't even reproduce it anymore.
    Maby someone has encountered such problem and know the reason why it happens or conditions for it to happen and the means to fix it?

    I don't want to be one of those that gives meaningless advise but I'm keen to 'give back' to this forum so here goes ... maybe completely up the wrong tree ...
    I'll assume you're generating the XDP on a server and then passing that to the browser as a content type "application/vnd.adobe.xdp+xml"
    Have you also tried setting the character set to UTF-8 ?  I use ASP and have "response.CharSet = "utf-8" " in my header.

  • Packages oracle not recognized lexical parameter that passed from BIP

    Dear all,
    My name is Rizal, i've a problem when passing lexical parameter from BIP to Oracle Packages. Below is my data template in BI Publisher that call function f_where_clause on packages :
    <dataTemplate name="dtTemplate1" description="dtTemplateTest" dataSourceRef="prodin" defaultPackage="pkg_rep_bip">
    <dataTrigger name="cobaTrigReport" source="pkg_rep_bip.f_where_clause(:P_SD)"/>
    <dataQuery>
    <sqlstatement name="Q1">
    <![CDATA[SELECT CODE, SPPD_CODE FROM PRO_SPD01 &amp;v_where_clause]]>
    </sqlstatement>
    </dataQuery>
    </dataTemplate>
    and P_SD is one parameter that i created in BI Publisher.
    and below is my packages (Spec and Body) :
    SPEC :
    CREATE OR REPLACE package PRODIN.pkg_rep_bip
    as
    v_where_clause varchar2(10000);
    function f_where_clause (p_sd varchar2)return boolean;
    end pkg_rep_bip;
    BODY :
    CREATE OR REPLACE package body PRODIN.pkg_rep_bip as
    function f_where_clause (p_sd varchar2)return boolean is
    begin
    if p_sd = 'Y' then
    v_where_clause := ' where re=11';
    else
    v_where_clause := ' where re=24';
    end if;
    return true;
    end f_where_clause;
    end;
    More detail problem is when parameter P_SD = Y (i assigned in BI PUblisher) the result always go to (v_where_clause := ' where re=24'). Any help/answer really appreciate.. Many thanks..

    It seems that Reports help is wrong ( or imprecise).
    Eg. if we have:
    select &p_select
      from dept
    where &p_where
    and the initial values for the parameters are:
    p_select: deptno, dname
    p_where: 1 = 2
    and the code in the Before Reports trigger is the following:
    function BeforeReport return boolean is
    begin
      :p_select := 'deptno, ''abcde'' ';
      :p_where := '1 = 1';
      return (TRUE);
    end;
    we get all the rows (where 1 = 1) and we get the value 'abcde' in the field "dname".
    However, try to move your code from the Before Report trigger to After Parameter Form trigger.
    Regards,
    Zlatko

  • Hw to pass parameter from report to forms

    Dear Friends,
    I m working on Forms n Reports 6i,
    I m running report n passing parameter from the forms now the requirement is that if report run successfully it shuld give the msg otherwise give an user define error msg.
    Hw do i pass any parameter from report to form for acknowledgment.
    Thanking yours
    Chandan

    Hi Rajat,
    using run_product built in i can pass parameter from forms to reports but hw can i get some parameter value from reports to forms as mentioned earlier my post
    Thanking Yours,
    Chandan

  • Pass a parameter from webi to Xcelsius

    Hi all,
    Anybody knows how to pass a parameter from a webi report to Xcelsius via URL?
    I need to refresh the Xcelsius data with a parameter coming from the webi report. With Live Office works but only the first time: the data is not being refreshed in Xcelsius everytime I change the parameter in the webi report.
    I'm thinking in someting like openDocument.jsp but how do I read this parameter in Xcelsius? Which connection should I use?
    Thank you very much,
    jon

    Hi Peter,
    the link provided refers to Xcelsius V4.5.
    In Xcelsius 2008 you have to control Flash Vars in the Data Manager.
    Go to the Data Manager, Add the Flash-Var Connection Type, Select CSV-FlashVar and define a name and a range.
    But i am not sure if Xcelsius Engage can handle FlashVars, because i am only working with Enterprise.
    Please take a look at your manual.
    For sure there are other ways to import data during runtime. Take a Look at the Connections provided by Data Manager. (e.g. QaaWS, SSRS, LiveOffice, Webservices, ...)
    Also take a look at the link below. It might be another nice option for "pseudo" data connectivity
    http://labs.businessobjects.com/xcelsiuspublishing/default.asp
    Best Regards
    Ulrich

Maybe you are looking for

  • Iphone 4 doesn't sync with itunes

    Hello, after of the itunes last update 11.1.4.62 my iphone can't sync with itunes, my pc doesn't recognize, not seen in the device manager so I can't update drivers.

  • Transferring Data between Databases with Character Sets UTF08 and US7ASCII

    Hi, I am trying to transfer data from Oracle 10g (character set :UTF08) to Oracle 8i ( character set: US7ASCII). I have tried the transfer using the DBLinks and found that there is no way the data could be transferred from 10g to Oracle 8i. The last

  • Standard report for invoices against a quantity contract

    dear experts, is there any standard report for how much invoices(billing) should be made against a quantity contract. my requirement is suppose if  i enter a quantity contract number then it will display all the invoices against that contract with in

  • WS Navigator gives http ok, but no message hitting Sender adapter

    Hi, I am using WS Navigator to test a web service that has been deployed from NWDS. The test tool is giving a HTTP 200 OK response but I cannot see anything hitting the sender adapter: HTTP/1.1 200 OK server: SAP NetWeaver Application Server 7.41 / A

  • N82 problems wih map loader.

    I'm trying to use the map loader on an N82. I connect the USB, select "Data transfer" on the phone, and then on the PC run the map loader. At this point I get "No storage medium detected" error message, and the phone flashes "Unable to activate data