"Missing parameter values " when passing parameter to subreport

i have a subreport embedded in main report.
sub report take a procedure with parameter.the main report does nothing but only holds many sub report.now i have to pass parameter from code to sub report.ive used the following code but it gives "missing parameter values" error
Any help??
   ParameterField paramField = new ParameterField();
        ParameterFields paramFields = new ParameterFields();
        ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
        paramField.Name = "@LabNo";
        paramDiscreteValue.Value = "1034";
        paramFields.Add(paramField);
        ParameterValues paramvalues = new ParameterValues();
       paramvalues.Add(paramDiscreteValue);
        paramField.CurrentValues.Add(paramDiscreteValue);
rptDocument.ParameterFields[0].CurrentValues = paramvalues;

does the sub report have parameters in it as well?
if the sp used for the sub report has parameters you need to pass them to the sub. i would probably remove the parameters from the sub and join the sub to the main by the parameter from the main to the field in the sub.

Similar Messages

  • Error: Missing initial value for session parameter

    Hi,
    I'm facing a problem while running the ETL process for Complete 11.5.10 Execution Plan in DAC Client. Some tasks are getting failed beacuse of the following error:-
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: VAR_27026 [Error: Missing initial value for session parameter:[$DBConnection_OLAP].].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6270 [Error: Variable parameter expansion error.].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6163 [Error initializing variables and parameters for the paritition.].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
    ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6226 [ERROR:  Failed to initialize session [SDE_ORA_Product_Category_Derive_Full]].
    ERROR : LM_36320 [Mon Nov 19 21:02:08 2007] : (2108|2632) Session task instance [SDE_ORA_Product_Category_Derive_Full]: Execution failed.
    When i checked the parameter file i can see the value assigned to the $DBConnection_OLAP. The same tasks ran successfully when i ran the ETL process for Complete 11.5.10 for the first time. I did not change anything after that and also all these are came built-in with the installation of Oracle BI Applications.
    Please anyone give me an idea what is causing the problem.
    Thanks,

    in DAC > Run History > Task Details, query
    Name = SDE_ORA_Product_Category_Temporary
    Open Status Description, look for string -lpf, the file after it is the actual parameter file DAC send to INFA server. E.g
    -lpf D:\DACTOPUS\Informatica\parameters\SDE_ORAR12_Adaptor.SDE_ORA_Product_Category_Temporary.txt
    Open the parameter file, most likely the [session_name] does not match with SDE_ORA_Product_Category_Derive_Full or some parameters are missing.

  • What is the Parameter values for passing a password to open a pdf

    I need help in finding the Parameter values for passing a password to open a pdf(s)? The software is written in Delphi.

    The Copy Protection only protects our Disk from being duplicated and also protects our Software from being copied and used locally.
    As far as the password encryption, that is why I created the Post. I was hoping that the password can be coded in our Software to open the password protect PDF that we create. This option would of gave us the security for when the customer copies the pdf to there local drive they would be required to input the password which they would not have access to.

  • Subreport displays "..Missing parameter values" when published

    I would like some expert knowledge on the issue i'm currently having with a transaction report that I've developed. I have one main report with all the db tables linked.
    I have two parameters field defined, one is part id, the other is date issue.
    I have 3 report footers defined: 1=issues subreport, 2=adjustments subreport, 3=cycle counts
    The subreports has a subreport link for Part id and one for the date issue, date adjustment, and date cycle counted. I've also created in each of the subreports a date parameter field or else these data will not display on the primary report correctly.
    When i run this report in my Crystal Reports XI pro software, it works fine, all transactions are captured and everything is great.
    When i publish this report onto the Crystal reports enterprise server, after entering the two values on the main report, the report errors with [COMException: Missing paramter values].
    I know that there is a subreport linkage problem that i have or I'm doing something backwards but any suggestions would be greatly appreciated.
    Regards,
    Linda

    Thank you for the response Sharon but it is still not working for me. Here is more details if anyone has any feedbacks to give.
    Main report:
    Has 5 db tables linked, a counts table, a parts table, a detail table, a receipts table, and a adjustment table.
    Parameter fields on the Main report:
    1 for part id
    1 for date issue range <this range should match to the other 3 sub-reports>
    Sub-Reports: <example>
    Receipts sub
    Adjustment sub
    Count sub
    Example: The report footers where these subreports reside, all their subreport links are:
    partid --> ?Pm-<tablename>partid with check in the select data in subreport based on field <tablename>partid
    receivedate --> ?Pm<tablename>receive date with no checkbox
    same for other 3 = this is the only way the data displays correctly.
    All sub-reports have the following parameter fields:
    Pm-<tablename.Part>
    Receiptdate
    Pm-<tablename.receipt date>
    Pm<tablename.part>
    adjustmentdate
    Pm<tablename.adjustment date>
    Pm<tablemname.part>
    countdate
    Pm<tablename.count date>
    When i press the refresh on the main report, all of the date ranges comes up, i enter the value in all of the ranges, and the data displays accurately and correctly.
    Because the 3 prompts in the sub-reports are not on the main report, i think this is where the problem when i publish the report on the server it errors with missing parameters.
    Thank you

  • Missing parameter values when trying to export to pdf in C#

    HI all,</BR>
    </BR>
    I'm having a problem passing a parameter from my c#.NET code through Crystal Reports 2008...</BR>
    </BR>
    Crystal Reports Developer version 12.1.0.892</BR>
    using a WinXP machine</BR>
    The parameter I've setted up in Crystal Reports Design is one to dynamically change the query that will run on the report:</BR>
    "SELECT * FROM  REPORTS.{?Protocolname}_FC_QUERY"</BR>
    </BR>
    </BR>
    The code I use calling one of the reports I must provide:</BR>
    </BR>
    using System;</BR>
    using System.Collections.Generic;</BR>
    using CrystalDecisions.CrystalReports.Engine;</BR>
    using CrystalDecisions.Shared;</BR>
    using System.Data;</BR>
    using System.Data.OracleClient;</BR>
    using System.Collections;</BR>
    namespace CrystalReportsRapportjes</BR>
    {</BR>
    class MainClass</BR>
    {</BR>
    public static void Main(string[] args)</BR>
    {</BR>
    Console.WriteLine("Start of program!");</BR>
    string connString = "server=CT_PRD;user id=report;password=report";</BR>
    OracleConnection conn = new OracleConnection(connString);</BR>
    try</BR>
    {</BR>
    conn.Open();</BR>
    Console.WriteLine("Connection opened.");</BR>
    </BR>
    Console.WriteLine("Connection Properties:");</BR>
    Console.WriteLine("\tConnection String: {0}", conn.ConnectionString);</BR>
    Console.WriteLine("\tServerVersion: {0}", conn.ServerVersion);</BR>
    Console.WriteLine("\tState: {0}", conn.State);</BR>
    QL_ExportReport("C:\\Data\\converted2crystal\\PLANNING_REPORT_params.rpt");</BR>
    </BR>
    } catch (OracleException e) {</BR>
    Console.WriteLine("Error: " + e);</BR>
    } finally {</BR>
    conn.Close();</BR>
    Console.WriteLine("Connection closed.");</BR>
    }</BR>
    Console.WriteLine("End of program!");</BR>
    Console.ReadKey();</BR>
    }</BR>
    private static void QL_ExportReport(string reportName)</BR>
    {</BR>
    ReportDocument CR_reportDocument = new ReportDocument();</BR>
    DataSet ds = new DataSet();</BR>
    CR_reportDocument.Load(reportName);</BR>
    CR_reportDocument.SetDatabaseLogon("Reports", "Reports");</BR>
    for(int i=0;i<CR_reportDocument.DataDefinition.ParameterFields.Count; i++)</BR>
    {</BR>
    Console.WriteLine("Reading parameters");</BR>
    Console.WriteLine(CR_reportDocument.DataDefinition.ParameterFields<i>.ParameterFieldName);</BR>
    if(CR_reportDocument.DataDefinition.ParameterFields<i>.ParameterFieldName==
    "Protocolname")</BR>
    Console.WriteLine("Correct parameter found, now assigning value");</BR>
    ParameterValues ThisPV = new ParameterValues();</BR>
    ThisPV.AddValue("TMC999C999");</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.Clear();</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.DefaultValues.Clear();</BR>
    </BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    //CR_reportDocument.SetParameterValue("Protocolname","TMC999C999");</BR>
    //CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    }</BR>
    CR_reportDocument.Refresh();</BR>
    CR_reportDocument.ExportToDisk</BR>(ExportFormatType.PortableDocFormat,"C:\\Data\\converted2crystal\\EDC_PLANNING_RPT_params.pdf");</BR>
    CR_reportDocument.Close();</BR>
    }</BR>
    }</BR>
    }</BR>
    </BR>
    The exceptions he throws using this code is = CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: </BR>Missing parameter values. ---> System.Runtime.InteropServices.COMException: Missing parameter values.</BR>
    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException</BR>
    at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream</BR>
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream</BR>
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export</BR>
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk</BR>
    at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 72</BR>
    at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33</BR>
    </BR>
    When I use the code</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    instead of</BR>
    CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    </BR>
    the error I get there is:</BR>
    System.ArgumentException: Value does not fall within the expected range.</BR>
    at CrystalDecisions.Shared.SharedUtils.ConvertToDecimal</BR>
    at CrystalDecisions.Shared.ParameterDiscreteValue.set_Value</BR>
    at CrystalDecisions.Shared.ParameterValues.AddValue</BR>
    at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 69</BR>
    at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33
    </BR>
    </BR>
    </BR>
    Can someone please tell me what's the right way passing a parameter to a report?</BR>
    </BR>
    Thanks in advance.</BR>

    You should use the
    ReportDocument.SetParameterValue("ParameterName", "ParamValue");
    >
    Els Cochez wrote:
    > When I use the code</BR>
    > CR_reportDocument.DataDefinition.ParameterFields<i>.CurrentValues.AddValue(ThisPV);</BR>
    > instead of</BR>
    > CR_reportDocument.DataDefinition.ParameterFields<i>.ApplyCurrentValues(ThisPV) ;</BR>
    > </BR>
    > the error I get there is:</BR>
    > System.ArgumentException: Value does not fall within the expected range.</BR>
    > at CrystalDecisions.Shared.SharedUtils.ConvertToDecimal</BR>
    > at CrystalDecisions.Shared.ParameterDiscreteValue.set_Value</BR>
    > at CrystalDecisions.Shared.ParameterValues.AddValue</BR>
    > at CrystalReportsRapportjes.MainClass.QL_ExportReport in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 69</BR>
    > at CrystalReportsRapportjes.MainClass.Main in </BR>c:\Data\sharpdevelopfolder\CrystalReportsRapportjes\CrystalReportsRapportjes\Program.cs:line 33</BR>
    > </BR>
    > </BR>
    > Can someone please tell me what's the right way passing a parameter to a report?</BR>
    > </BR>
    Try parsing the parameter value to a decimal value before setting it as parameter value.
    Hope this will help

  • Different session values when passing &APP_SESSION. as a parameter

    Hi all,
    I'm using APEX 3.1.1 and having the following issue: I have a JS function in my app, which builds an URL using the parameters provided. Its signature would look something like:
    function xxx(p_app_process, p_param_item, p_session, p_app_id)
    Yes, I'm using this to call an on-demand application process (AJAX magic ;)
    The problem is that when I call it from a page item using &APP_SESSION. for the 3rd parameter, it seems like for some reason JS is receiving a different value (I verified this myself putting an alert and displaying both the parameter value and the &APP_SESSION. substitution string).
    I know you will say, +"then why don't you use &APP_SESSION. instead?"+ but the thing is, my JS code is in a separate file, and for whatever reasons, APEX won't replace that string on that separate file.
    So... any suggestions? Ideas? New approaches?
    Thank you all in advance for your help.
    Regards,
    An&iacute;bal

    Hello,
    In an external file you can use -
    $x('pInstance').valueor
    $v('pInstance')(depending on your version of APEX)
    to reference the value of the current session.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Missing Parameter Values CR2008 Optional Parameter

    Hi,
    I am getting "Missing Parameter Values" error
    "CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Fehlende Parameterwerte. ---> System.Runtime.InteropServices.COMException (0x8004100E)"
    if I try to export a Report with an optional Parameter without setting the parametervalue.
    The Report works fine with ReportViewer.
    If I uncomment the "Parameterpart" and set a parametervalue it works fine, but it should works without a parametervalue too, its optional.
    I have tried many for a long time and read many Websites but it does not work !
    I use WinXP SP2 CR2008 with C# .NET 2.0 VS2005
    CrystalDecisions.CrystalReports.Engine.dll version 12.0.2000.683 Date: 2008-03-01
    CrystalDecisions.Shared.dll version 12.0.2000.683 Date: 2008-03-01
    Sorry my English is very Bad !
    Thanks a lot!
    ExportFormatType ExportType = ExportFormatType.PortableDocFormat;
                ReportDocument RD = new ReportDocument();
                RD.Load("C:\\ParaTest01.rpt");
                string strServer = "<ServerName>";
                string strDB = "<DBName>";
                string strUser = "<UserID>";
                string strPW = "<PW>";
                RD.SetDatabaseLogon(strUser, strPW, strServer, strDB);
                //ParameterFieldDefinitions crParameterFieldDefinitions = RD.DataDefinition.ParameterFields;
                //ParameterFieldDefinition crParameter1 = crParameterFieldDefinitions[0];
                //ParameterValues crParameter1Values = crParameter1.CurrentValues;
                //ParameterDiscreteValue crDiscrete1Value = new ParameterDiscreteValue();
                //crDiscrete1Value.Value = "GER";
                //crParameter1Values.Add(crDiscrete1Value);
                //crParameter1.ApplyCurrentValues(crParameter1Values);
                RD.ExportToDisk(ExportType, "C:\\Test2.pdf");
    RecordSelectionFormula in Report:
    (not HasValue({?Land}) OR {tab.location_code} = {?Land}) and
    {tab.sup} = "XXX" and
    {tab.Accounting_Period} = "200801"

    You need to be careful when using optional parameters. If you are using the optional parameter in a record selection formula you'll need to check and make sure it has a value before you use it. There is a function call HasValue() that you can use to do this.
    If you have an optional parameter in the record selection formula and you don't pass a value you'll need to make sure your selection formula can be completed with out it.
    This is an excerpt from our help file.
    Crystal Reports supports optional parameters. An optional parameter is a prompted value that does not have to be supplied by the user.
    Report designers should provide some guidance to the end user that a parameter is optional by adding this information to the prompt text.
    Optional parameters are treated by Crystal Reports as optional anywhere within the report that they are used. You cannot set one instance of the parameter to optional and another to mandatory.
    Note: After you set a parameter to optional, if you use the Select Expert, the system will automatically add the selection formula for you using the HasValue() function.
    The Formula Workshop Editor does not automatically add the formula. Only the Select Expert automatically adds the formula for you.
    If you change the parameter from optional to mandatory, the HasValue() function is not automatically removed from your formula.
    Handling a parameter with no value
    When the report engine evaluates any formula which references an optional parameter that does not have a value, it generates a runtime error. All formulas that reference an optional parameter should first use the HasValue() function to check if that parameter has a value before evaluating it. This includes record selection formulas and saved data formulas.
    Note: The system will not automatically drop a statement from the SQL WHERE clause. It is the report designeru2019s responsibility to decide which statement to leave out based on HasValue() testing.

  • How to get the URL parameter value when navigating from JSP Page to portal

    Hi All,
    I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
    In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
    Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
    If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
    How do we resolve this problem?
    Regards,
    Boopathi M

    Hi
    Please try  these link might helpful for you
    1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
    2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
    3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
    Best Regards
    Satish Kumar

  • Rule for parameter values when portlet defined?

    Am I missing something?
    In Plus:
    --I make a sheet in Plus that is parameterized.
    --The parameter for an item whose item class has a LOV.
    --I define a default value.
    --I save the sheet.
    In the portal:
    --I define a Disco portlet.
    --I edit the defaults.
    --I set the parameters.
    Now, here's the weird thing: The only parameter value offered is the one saved as a default value in Plus?
    This certainly makes no sense at all.
    This is on 9.0.2.53.12
    Anyone?

    Dear Ashi,
    Your question falls into the paid support category which requires a more in-depth level of support. Please visit the below link to see the various paid support options that are available to better meet your needs.
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Please refer to the below articles:
    1) How to Handle Typed Fault Contracts in Orchestrations
    http://technet.microsoft.com/en-us/library/bb246117.aspx>
    2) A sample provided at:
    http://msdn2.microsoft.com/en-us/biztalk/bb608378.aspx
    Thanks,
    Belinda

  • SSRS Parameter value from another parameter

    Hello Everybody,
    I have a parameter that I need to get it value from another parameter.
    The first parameter @rdt is a date - 11/01/2012
    The second parameter @mm is the year and month = 2012
    I tried putting in a select inside the query but it did not work
    SET @mm =  (SELECT cast(year(@rdt) as char(4)) + cast(month(@rdt) as varchar(2)))
    Then I put it as a default value inside the parameter and it still did not work
    =cast(year(Parameters!rdt.Value) as char(4)) + cast(month(Parameters!rdt.Value) as varchar(2))
    Any ideas or suggestions ?
    Thanks in advance

    Hi Msj99,
    I have tested the expression provided by
    Visakh16 that it works fine , you will get the value as Integer type "YYYYMM", you can also use expression as below to get the string type of @mm (YYYYMM):
    =Year(Parameters!rdt.Value)&Month(Parameters!rdt.Value)
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Missing column value when logged on to windows with user id other then admi

    I am using crystal report 10 with oracle 10g database. Application is is developed on vissual studio.net 2005 (vb.net). Reports are launched from vb.net application.
    My report runs fine when I logon to windows as administrator and launch vb.net application. When I logeed on to windows with userid other then administrator my application works fine except one of the column value is missing a value in the report.  When I launch my vb.net application my oracle userid is same. Only difference is windows userid.  My application has no referance to windows userid. Why crystal report viewer is missing one column value when loged on to windows as user(xxxx)?

    CR 10.2 bundles with .NET 2005. If you do not see the CR assemblies of version 10.2.3600 in GAC, try to do a custom install of .net 2005, choosing just Crystal Reports. Note that Crystal Reports does not bundle with all versions of .NET (for example it does not ship with .NET Express - I believe...). Alternatively, you can upgrade to CR 2008 which is the latest sipping version of Crystal Reports. You can obtain a copy by calling sales at 866-681-3435, or go to this link:
    www.businessobjects.com/product/catalog/crystalreports
    An eval copy of CR 2008 can be downloaded from here:
    http://www.businessobjects.com/forms/default.asp?id=701600000009BXP
    Ludek

  • Help in CURSOR when pass parameter for the IN

    Hi,
    Need some help I have CURSOR that takes a VARCHAR2 and NUMBER but when I run my Procedure it gives invalid number. Here is the CURSOR
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (p_list)
                AND pidcol = p_id;
    plistcol is of datatype NUMBER
    In my procedure I am building a list to comma separated numbers that goes in p_list parameter of type VARCHAR2 to the cursor i.e.
    I have a for loop to build that list e.g.
    loop
    -- num is of datatype NUMBER
    p_list := p_list || num || ',';
    end loop
    IF (p_list IS NOT NULL)
    THEN
    p_list := SUBSTR (p_list, 1, LENGTH (p_list) - 1);
    END IF;here is how my p_list looks when i pass it on to the cursor
    *12,345,678*
    and here is how open the cursor
    OPEN get_count (p_list, 99999);
    and here is the error I get
    SQLERRM ORA-01722: invalid number
    Now when I hard *12,345,678* in my CURSOR SELECT it works fine, it's only when I pass this as parameter it fails. For example I hard code the values in my CURSOR select it works fine
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (12,345,678) -- even '12','345','678' works when hardcoded
                AND pidcol = p_id;I even tried passing the values in the format *'12','345','678'* but still get the above error. So how can I pass the values to cursor IN clause.
    So wondering what might be the issue.
    Thanks

    Why this kind of coding needs to be avoid - here is one demonstration of one aspect ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.22
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:01.90
    satyaki>
    --Your query works and here is the slightly modified version of your query
    satyaki>
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 8
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.09
    satyaki>
    --Now, modifying the input i can sniff into the entire data
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20) or (1=1';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 13
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.10
    satyaki>Got me?
    Regards.
    Satyaki De.

  • Discoverer desktop aborts when passing parameter

    Hi All,
    I'm trying to pass parameters to a discoverer desktop workbook, using the following command:
    C:\oracle\product\BIToolsHome_1\bin\dis51usr.exe /connect discover/discover@fincon_d10 /opendb FCONR09615 /parameter p_user 'FCON' /parameter session_id '26240255' /parameter p_dt_final '31/01/2008'
    where FCONR09615 is my workbook. But when I execute this command discoverer desktop aborts!
    When I manually open the wokbook and fill the parameters, it works just fine.
    Any Ideas?
    Thanks in advance,
    Valentim

    Hi Valentim
    You don't seem to be telling Discoverer which worksheet to open. You need to use the sheet command.
    Let me look at the rest of your command.
    1. You appear to be calling Discoverer Desktop correct
    2. The command /connect is correct with username/password@database
    3. The /opendb command is correct so long as you have a workbook called FCONR09615 owned by the user discover
    4. You seem to have 2 parameters: one called p_user and one called p_dt_final. I can't comment as to whether you are passing the correct string values as I don't know how you have defined the objects that the parameters are feeding. I can tell you that your parameters need to be called p_user and p_dt_final
    Best wishes
    Michael

  • Pass parameter value to another parameter.... User query in user parameter

    Hello everyone, any help would be greatly appreciated.
    Problem:
    My report currently has 5 user parameters (3 Number, 2 Characters). I have an after parameter trigger that evaluates all the parameters to see which one has any value and then creates the “where clause”. Below is an example of two of the 5 parameters.
    The function works fine, I just cut out all the other stuff for this issue.
    function AfterPForm return boolean is
    IF :P_JOB_ID is not null then
         :P_WHERE_CLAUSE := 'where Job_num = :P_JOB_ID';
    ELSIF :P_QUES_DESC is not null then
    :P_WHERE_CLAUSE := 'where DESCRIPTION like :P_QUES_DESC’;
    ELSE :P_WHERE_CLAUSE := ‘where JOB_NUM = 0';
    The “P_WHERE_CLAUSE” is used as follows in a query.
    Select job_num
    from PROMOTION
    &P_W_CLAUSE
    Issue:
    The query result can be anywhere from 1 to 50 job_num’s. I need to show the end user running this report the values (job_num) in a drop down list. They in turn will select one job_num which will be used to run the report. I tried putting the Select job_num from PROMOTION &P_W_CLAUSE in a User Parameter but that does not work. I get an error. I feel that I am approaching this the wrong way. Because in the end I would end up with two queries, one for the Select statement containing the P_W_CLAUSE and another with the final report. This issue is sort of like cascading prompt where the values from one (or more) parameters are used in the select of another user parameter which in turn the value selected will be used in the final report. Also this report will be used somewhere between 50 - 75 times per day so storing the values in a temp table might not work.

    Sorry,
    as I know depending parameters like you want are not possible in Reports. You can use one reports as parameter-report-only to use a second as your original report, but this is not perfect. Or use a tool like Application Express (which is able to have depending fields) in front of reports to build your parameter forms.
    Regards
    Rainer

  • Get ORA-00932 inconsistent datatype when passing parameter in tableadapter

    I have to build a Dataset to use as source for Microsoft rdlc-Report.
    In the Dataset I create a tableadapter using plain SQL.
    In my SELECT-Command I have to pass a Date parameter:
    I've tested a SELECT like in the following example:
    SELECT a.field1, a.field2, field3
    FROM table a 
    WHERE a.createdate < :IN_DATE In the tableadapter query-builder I get data, but after storing the command I get following error-message:
    ORA-00932 inconsistent datatypes expected date got number
    Later I have to pass the Date parameter in a Function like
    SELECT a.field1, a.field2, getvalue(a.field3,:IN_DATE) FROM table aIm using ODP.NET 11g on a 10g Oracle DB server.
    Is there a possibility to pass a Date parameter?
    I hope anyone has a tipp...
    Roswitha

    Check the OracleParameter here: http://www.oracle.com/technology/pub/articles/mastering_dotnet_oracle/cook_masteringdotnet.html
    Ming Man

Maybe you are looking for

  • How can I restore my Macbook Air?

    Hi! I forot the ID that I purchased for Mac OX. How can I restore my Macbook Air?

  • Weird PHP or Div issue with FireFox?

    Not sure what's going on but a specific div code is appearing differently in Firefox and Chrome. http://i.imgur.com/LHkhEEM.png In FireFox, the <div> Sidebar appears OUTSIDE of the content div.... In Chrome, the <div> Sidebar appears INSIDE of the co

  • F.05 and valuation account issue

    Hello, I have a crazy question about the Payment document posting. Here is the scenario: There is an Invoice cretaed through MIRO in USD. The company code is in CAD. So there are postings against the GR/IR accounts. If I do Payment runF110, the total

  • Regarding Weekend Dates and Holiday Dates - answer please

    Hi have Sales order date and amount sold columns in my report. The user requirement is they want to see all the sales that are done during the weekend and Holidays but the report should only show the sales order date and the amount (the weekend and h

  • E7-00 Symbian Belle - Widgets loose colors

    After installing the Symbian Belle latest updates on these phones, most of the Widgets lost their colors. Now most of them are only in white. (I have 2 of these for the moment) Although it does not had an impact on the functionality, it sure would lo