Multi Value Parameter Passing

Hi,
I have created a SQL based HTML DB report that takes the dynamic value from textbox for SQL bind parameter .
SQL is
Select * from employees where emp_id IN ( :P9_EMPID);
emp_id is of Number type.
When i pass a single employee id value in the Text box, the report runs fine.But when I try to pass multiple values like 222,333,444 as I am using IN clause in my sql then it fails with following error:
report error:
ORA-01722: invalid number
Is it possible to pass multiple values to a SQL report through single bind variable irrespective of type of data?
Can we also pass these multi values through URL?...as such URL does'nt allow the comma and colon separated values as it treats them differently
Thanks
AJ

When you do this in a report region of type SQL query, you’re producing an invalid SQL statement. However you could use a report region of type PL/SQL function returning SQL query. In the PL/SQL code you could assemble you SQL statement properly, and then have the report based on the return value of your PL/SQL function, e.g.:
begin
return 'select * from employees where emp_id in ('||:P9_EMPID||')';
end;
Regards,
Marc

Similar Messages

  • Passing Multi-Value Parameter to a Stored Procedure

    Has anyone experienced passing a Parameter (MultiValue) to a Stored Procedure? I am aware that Crystal Passes the Param as an Array. How would you go about handling this within a Stored Procedure???

    Hi Daniel
    Try as below:
    1. Create a Crystal report, and add a multi-value parameter.
    2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
    //Formula: @JoinFormula
    Join ({?Multi-value parameter array},";")
    ====================
    NOTE:
    In the formula above, a semi-colon (";") is the delimiter.
    ====================
    3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
    4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
    Doing so passes a multi-value parameter to the stored procedure.
    Hope this helps!!!!
    Regards
    Sourashree

  • Passing multi value parameter to the Drill through report

    Hi
    I have two reports say Report A and Report B.
    Both reports using same parameters.
    I am Navigating from Report A to Report B using Jump to Report option.
    Now when I pass multiple parameter to the Report B it only displays first parameter results.
    In report B I have parameter multi value select to true.
    I would like to know if its possible or not to pass multi value parameter in drill through report?
    I would appreciate if someone can help me here.
    Regards
    Amit

    Yes you can pass multi value parameters to a drill through report.
    It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
    -- Robert

  • Passing multi-value parameter from BIEE dashboard to BIP report

    It is possibile passing multi-value parameter from BIEE dashboard prompt to BI Publisher integrated report? (BIP report has a DB data source (not a answers))
    Thank you
    R.

    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

  • How to pass this multi-value parameter via GoURL?

    Currency is equal to / is in 'USD', 'GBR', 'RUR'. How to pass such multi-value parameter via GoURL?
    P0=1&P1=eq&P2=Measures.Currency&P3=?

    Found. P0=1&P1=eq&P2=Measures.Currency&P3=3+USD+GBR+RUR

  • Would like to pass multi-value parameter to a stored procedure

    Hi,
    Is it possible to pass a multi-value parameter to a stored procedure using crystal reports.
    Is there is a way to do so??/
    Thanks,
    Brian.

    Hi,
    Is it that you want to pass 2 or more parameters to a stored proc. it is possible
    go to database expert
    select your connection and click on add command their you will have to create parameters and pass to a proc
    for ref..
    {CALL `menagerie`.`sp_timer`({?delay time},{?delay time2})}
    where `menagerie`.`sp_timer` is a stored proc.
    and delay time and delay time2 are  parameters.
    but if it is like you have to pass multiple values to stored proc using single parameter as per my experience its
    not possible.

  • 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

  • OpenDocument.aspx - pass multi value parameter when report type is actx

    We are running Crystal Reports XI R2 against a business objects infoview server.
    We have been successfully using the OpenDocuments method for opening crystal reports but have run into a snag.  When using a multi-value parameter, we can only get it to work when the viewer is set to HTML.  Setting to ActiveX prompts us to enter in the parameter values manually.
    This address works (using sViewer=HTML):
    http://vsx2af0x/businessobjects/enterprise115/infoview/scripts/opendocument.aspx?sType=rpt&sViewer=html&lsMpSiteIDs=[1235880],[1235891],[1235902],[1235913]&sPath=[Development][CGIS][Intranet Mapping][COS_Base]&sDocName=DetailedSite&sRefresh=Y
    This address does not work (using sVIewer=actx):
    http://vsx2af0x/businessobjects/enterprise115/infoview/scripts/opendocument.aspx?sType=rpt&sViewer=actx&lsMpSiteIDs=[1235880],[1235891],[1235902],[1235913]&sPath=[Development][CGIS][Intranet Mapping][COS_Base]&sDocName=DetailedSite&sRefresh=Y
    Any thoughts on the problem?

    As I understand what you need is to use LookupSet function. 
    Suppose if your dataset is like this (for simplicity I'm showing only required fields)
    PersonID Project Company
    ID1 P1 C1
    ID1 P2 C1
    ID1 P3 C2
    ID1 P4 C2
    ID1 P5 C3
    If you want to get the full project list for the person just send the PersonID alone and filter using it in the subreport. You can keep the project/company parameters optional in that case and put a default value. This would be the easiest thing.
    Now if you want pass the project parameter also you need to pass it like this
    =Join(LookupSet(Fields!Person.Value,Fields!Person.Value,Fields!Project.Value,"DatasetName"),",")
     This would act like a self lookup and return you full list of projects for the person and then you can use this to set the parameter value in the subreport.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • CR XI - Pass a Multi-value Parameter to a Stored Procedure

    Hello,
    Here is my problem !
    My Main Report accept a Multi-value Parameter "myParameter".
    I create a formula "lstParameter" (Join({?myParameter},',')  linked to my SubReport (string static parameter based on a Stored Procedure  which returns a RefCursor (ORACLE)).
    When I launch the Main Report, he is blank...but if I open the subreport in the overview i can see the result...
    it seems like the MainReport don't call the SubReport, or something like that...
    I hope you can help me !
    Thanks
    Anthony
    Edited by: anthony.44 on Jan 12, 2012 4:53 PM
    Edited by: anthony.44 on Jan 13, 2012 9:51 AM

    hello,
    I resolve my problem....just inside into the detail of the Master report a result of a query (ex: select sysdate from dual)...and the sub report is called correctly

  • Reporting Services Multi Value Parameter

    I have an SSRS 2005 report that I want to enable for multi value. However, I always run into the issue with the way it passes multiple values. How exactly do I get a multi-value parameter setup and working on both the report AND SQL side?
    I used the MS example of checking the multi checkbox for the parameter and then using a WHERE Column IN (@MultiParam), but this doesn't work. When you select one item, or is it multiple I can't remember, it fails. I really appreciate the help!
    Nathon Dalton
    Software Developer
    Systems Administrator
    Network Administrator
    Blog: http://nathondalton.wordpress.com

    Here's a sample of the SQL stored procedure that I use to get the dataset:
    Create
     proc [dbo].[spStoredProcName]
    @supervisor
    varchar(max) 
    as
    begin
    create
    table #tempSups
    Supervisor
    varchar(62)
    declare
    @i
    int
    select
    @i = 0
    select
    @i =
    charindex(',',@supervisor
    begin
    if @i
    <> 0
    while @i
    >0
    begin 
    insert
    into #tempSups
    values
    (ltrim(rtrim(left(@supervisor,
    @i-1))))
    select @supervisor
    =
    right(@supervisor,
    len(@supervisor)
    - @i)
    select @i
    =
    charindex(',',
    @supervisor)
    end
    end
    insert
    into #tempSups
    values
    (ltrim(rtrim(@supervisor)))
    From there, simply join your query to the temp table

  • CASE Statement in Where Condition with Multi Valued parameter in SSRS

    Hi All,
    I am little confused while using CASE statement in Where condition in SSRS. Below is my scenario:
    SELECT
    Logic here
    WHERE
    Date IN (@Date)AND
    (CASE
    WHEN NAME LIKE 'ABC%' THEN 'GROUP1'
    WHEN ID IN ('123456', '823423','74233784') THEN 'GROUP2'
    WHEN ABC_ID IS NULL THEN 'GROUP3'
    ELSE 'GROUP4'
    END ) IN (@GROUP)
    So above query uses WHERE condition with CASE statement from @GROUP parameter. I want to pass this parameter as multi- valued parameter and hence I have used CASE statement IN (@GROUP).
    For @Date one dataset will pass the available and default values and
    for @GROUP parameters, another dataset will pass the available and default values.
    But this is not working as expected. Please suggest me where I am making mistake in the query.
    Maruthu | http://sharepoint-works.blogspot.com

    Hi Maruthu,
    According to your description, I create a sample report in my local environment. It works as I expected. In your scenario, if the selected values from the Date parameter contains some of the Date field values, the selected values from the GROUP parameter
    contains some of GROUPS (‘GROUP1’,’GROUP2’,’GROUP3’,’GROUP4’) and the corresponding when statement is executed , then the dataset returns the corresponding values.
    In order to trouble shoot this issue, could you tell us what results are you get and what’s your desired results? If possible, you can post the sample data with sample dataset, then we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Parameter gets reset and Multi-value parameter doesn't work

    Hi
    Two Issues:
    I've set the value of a Date parameter (Start Date) when moving from the home screen (Report 1) to the next screen (Report 2) as the first day of the current year (DateSerial(Year(Today),1,1). In report 2, if I try to change the Start Date to another date,
    it gets reset to the first day of the year. I had the default value set as the first day of the year and even after removing it, the Start Date gets reset.
    I've set a multi-value parameter (Area) in Report 1 that collects four integers. I pass Area to Report 2 (through Join (Parameters!Area.value,",")). I also used SPLIT (Join (Parameters!Area.value,","),",") to get the value.
    Then, in the data set, I call this parameter as "Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW WHERE ID IN (?)". But this query throws an error that the query could not be executed. I ran the same query on the server side and it runs fine.
    Note:
    We cannot reference parameter names as @area for example because the Composite Server doesn't allow that.
    Split and Join operate on strings but my parameters are of integer type. Is this an issue?
    Please help.

    1. Are setting an expression for available values of parameter in report 2? Is the value you pass a valid among the set of values?
    2. IN wont work with comma separated values. You need to parse the individual values out using a string parsing udf as a table and then join to that
    so in your case you would be like
    Select A1,A2,A3,B1,B2,B3 FROM TEST_VIEW t
    INNER JOIN dbo.ParseValues (@Area,',')f
    ON t.ID = f.Val
    ParseValues UDF can be found in below link
    http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Multi Value Parameter in URL

    I have a report(SSRS 2008) on top of a CUBE which have a subreport which needs to be opened in a new window, Passing the (MDX)parameters from URL, I have created a link which takes single value parameters and works fine, but when i tried to pass multi value MDX parameters it is not working can someone help me on this. Number is multivalue MDX parameter
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no'" & ")"
    Thanks in Advance

    Hi Boyan, MDX is same between both the reports...my main report will show top 10 rows and when users wants to see more than ten rows he needs to click on the subreport link.
    I found a way to pass multivalue parameter but the problem is i am passing a MDX parameter which will have & ([Division].[Division Name].&[USA]) before the value...so in the java script while passing the parameter value it is taking &value(&[USA]) as new parameter and throws a error message saying &USA not found.
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& Parameters!Division.Value &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
    Here in the below link Division is a multi value parameter, after doing some research i found %2526% will replace &, but the problem is when passing the second parameter it is replacing &Division with %2526Division and asking me to enter division manually if i have selected more than one value.
    ="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& replace(Join(Parameters!Division.Value,"&Division="), "&", "%2526") &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
    Thanks.

  • Multi Value Parameter in SP  error in Crystal Report SAP B1 ?

    Hi Experts ,
    i am Getting an error in Crystal Report
    "Failed to retrieve data from the database.  Details:  42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '('. [Database vendor code: 120]" 
    I an executing the SP In Command  , I want to pass multi value parameter in SP
    When Pressing  ok
    than  On Ok Button  Error come
    So I have Some Question
    1> Why All parameter in Commend Are  Automatic getting  Compulsory  and How to Avoid It?
    2> How to Solve  this error ? this error is only coming with multivalued parameter ?
    i have many report in which i have to send the multi value parameter into query it self  so , Plz Help Me
    I am New to Crystal Report so it will be Kind Of you  if explain  with example .
    Thankks in Advance !!!
    Regards,
    Mayank Shah

    Hi Shachar,
    i will explain one because i think some thing is misunderstood
    please the images
    when all parameter record selected and no parameter record selected ... i want all record should display
    this blank report is problem
    Regards,
    Mayank Shah

  • Use one value of multi value parameter in dataset query

    I have a parameter @Period that is populated with posting periods from our financial system (e.g. 201301, 201302, 201303, etc.).  It is set as a multi value parameter to allow users to choose multiple posting periods.  This parameter
    is used in my main dataset.  If the user chooses 201301 and 201302, I want to choose the greatest value chosen and use it in a where clause such that MyPostPeriod <= @Period.  Since @Period is a multivalue, the ><= won't work. 
    I read that SSRS just passes this as a comma separated value (201301,201302).  How do I find the greatest value in the list and how do I use that in my where clause?
    the user is selecting projects with activity during the posting period but then I want to grab all costs and invoices since the project was created.  They choose to see activity in 201301 and 201302 but I need to get all invoices and costs <= 201302.
    The only option I have been able to come up with is to have two parameters - one for start period and one for end period. Any better solutions?  I'm not using stored procedures.
    Milissa Hartwell

    Hi Milissa,
    Based on your description, you want to get the Maximum value from a multi-value parameter. We can insert the selected values into a temp table and get the Maximum values. Suppose we have main dataset (DataSet1) include Period field, and a parameter Period
    in the report. Please refer to the following steps:
    Create another dataset named DataSet2 using the query below.
    CREATE TABLE #Max (COL1 INT)
    INSERT INTO #Max Values(1)
    SELECT * FROM #Max
    Double click DataSet2, change the dataset using the expression below:
    ="CREATE TABLE #Max (COL1 INT)" &
    "INSERT INTO #Max VALUES (" & Join(Parameters! Period.Value,"),(") &")" &
    "SELECT TOP 1 * FROM #Max ORDER BY COL1 DESC"
    Create a parameter (Max) set the Data Type to “Integer”, and get the available values and default values from the DataSet2 COL1. Then, set the visibility to “Hidden”.
    Double click the DataSet1, click Filters in the left pane. Fill with following values:
    Expression: [Period]
    Operator: <=
    Value: [@Max]
    Please refer to the following screenshot:
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

Maybe you are looking for

  • Adding a column of numbers in a form

    Hello.  I am new to using forms.  I was able to take a document and make it into a budget form where people can enter their expense.  I would like the amounts to total at the bottom but I don't understand how to do that or where to begin.  Can anyone

  • Can my '08 MacBook do Thunderbolt?

    From the on-line Apple publish specs on my machine (MacBook (Early 2008 and Late 2008) - Technical Specifications), I know I have a Mini-DVI port. I also have learned that Thunderbolt (up to 10 Gbps) works via Native Mini Display Port in the newer ma

  • Reminders Sort Order Issue

    If this has already been posted, I apologize.  I am having an issue with the Reminders app on my iMac.  I have the sort by listed as manual but when I manually try to sort the reminders it moves them back into some crazy order and not how I have them

  • JDBC..

    Hi! What are all the interfaces and classes that are available in latest JDBC version 3.0?. how can i retrieve the values from database without making use of ResultSet in JDBC?. is there any seperate methods are there other than Result Sets? -Thanx

  • Synaptics Driver Problems? [solved]

    Anybody else having issues with the synaptics driver lately?  I spent the last couple weeks messing around with some other distros, and this morning when I reinstalled Arch I couldn't get X to start without changing my mouse driver from "synaptics" b