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

Similar Messages

  • Call report from forms6i, use report server from 10gAS

    Hi there,
    I have been searching for any info I can get that will help me to do the following:
    I want to call an Oracle 6i report from Forms6i but I want to specify a Report Server running on an Oracle10gAS box. Can this be done in a client/server fashion, meaning the forms/reports are on a Citrix box, accessed by many users.
    Everything is working fine, using "RUN_PRODUCT" and the "Report Background Engine" to generate the report on the Citrix box. However, I want to use the report server from 10gAS runinng on another box, to generate these reports.
    Please reply with any help you give.
    Regards
    shak

    Hello,
    You can use the compatible element in the reports server configuration file :
    Description
    The compatible element is available for backward compatibility with Oracle Reports 6i clients (RWCLI60.EXE, RWCGI60.EXE, RWQMU60.EXE, RWRQM60.EXE, RWRQV60.EXE, 6i Forms). When compatible is set to 6i, Reports Server will make use of an executable file named rwproxy that listens for requests from a 6i client and forwards them to a 10g server.
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_conf.htm#i1005999
    Regards

  • Passing single/multiple values to stored proc parameter from crystal report

    I tried below solution posted on this forum to pass either a single value or multi-value to a sql server stored procedure parameter (varchar datatype) from crystal report XI R2.
    In my crystal report , I am displaying all the available parameter values to the user  and the user will select either a single value or multi value.
    This worked when I select single value and when I say show sql query in my subreport  I see the following:
    {CALL "XYZ"."dbo"."storedprocedurename";1('Product  1')}
    But this did not worked when I selected multiple values and when I say show sql query in my subreport  I see the following:
    {CALL "XYZ"."dbo"."storedprocedurename";1('Product 1,Product 2')}
    I think it might work if it is as below:*
    For multiple values:
    {CALL "xyz"."dbo"."storedprocedurename";1('Product 1', 'Product 2')}
    Please advise.
    Solution Posted on this forum is as follows:
    Hi,
    As you must be aware of that a crystal report created of a stored procedure will allow only a single value for inserting a multiple value as a parameter in your report and pass those values to your stored procedure please follow the below work around which will be helpful for you.
    Symptom
    In Crystal Reports, you want to pass a multi-value parameter to a stored procedure. The problem with doing so is that Crystal Reports considers the multi-value parameter to be an array.
    How can you pass a multi-value parameter to a stored procedure?
    Resolution
    Here are the steps to pass a multi-value parameter to a stored procedure:
    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.
    Regards,
    Vinay

    Hi Vinay,
    First you need to make sure the stored procedure accepts multiple values in the fashion 'a','b','c'.
    Then, create this formula in the Main Report:
    numbervar i;
    stringvar s;
    for i:= 1 to ubound({?Parameter}) do
        s := s + "'" + {?Parameter}<i> + "'" + ",";
    left(s,len(s)-1);
    Link this formula to the sub-report's parameter.
    Hope this helps!
    -Abhilash

  • 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

  • Single-valued or multi-valued?

    Please knidly help to explain, in which case the filed should be single-valued, or multi-valued?

    Hi Alfred
    Say you're storing employee information in MDM, and the employee data structure includes a "Country of Birth" field, and a "Nationality" field.
    You can only be born in 1 country, so this field would be single-valued.
    However, you can have multiple nationalities, so this field would be multi-valued.
    Similarly, an employee could have "Preferred language" and "Spoken languages" fields. The "Preferred language" field would be single valued, while the "Spoken languages" field would be multi-valued. Both fields will lookup to the same table (Languages).
    HTH
    Mark

  • 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

  • [TimesTen]TT2778: Cannot infer type of parameter from its use

    Hi,
    On Timesten [[TimesTen 11.2.1.5.0 ] the below query results in error TT2778.
    SELECT COUNT(1) cnt123 FROM DUAL WHERE %Var1String LIKE %Var2String,
    Here both Var1String and Var2String are variables of String type.
    Error Trace:
    Caused by: java.sql.SQLException: [TimesTen][TimesTen 11.2.1.5.0 ODBC Driver][TimesTen]TT2778: Cannot infer type of parameter from its use -- file "saCanon.c", lineno 16963, procedure "inferExprTNLike()"
    at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3287)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3436)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3401)
    at com.timesten.jdbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:2285)
    at com.timesten.jdbc.JdbcOdbcPreparedStatement.<init>(JdbcOdbcPreparedStatement.java:194)
    at com.timesten.jdbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:342)
    Any pointer will be of great help.
    Thanks and Regards,
    Sud

    While TimesTen has a high degree of compatibility with Oracle DB SQL there are still some significant differences due to them being essentially different products from a different origin. For example, Timesten is not really compatible with Oracle in terms of the bind-mode. Oracle uses late bind-mode and prepares queries on the first execution. TimeTen employs early bind-mode and TimesTen needs the data type before preparing queries. Because of this, the query you mentioned has different behavior in Timesten and Oracle.
    You can work around this in TimesTen using somethign like the following:
    SELECT COUNT(*) cnt123 FROM DUAL WHERE CAST(%Str1 AS VARCHAR2(1000)) like CAST(%Str2 AS VARCHR2(1000));
    Chris

  • Problems with parameter button in Crystal Report Server  2008

    Dear all,
    I have problems with parameter button in Crystal Report Server 2008.
    when I created some parameters and groups in Crystal Report 2008, they showed both parameters in 'Parameter button' and group in 'Group button'  on the left, so I can choose or type without clicking 'Refresh button' But when I added it to Crystal Report Server 2008 and I click parameter button , it doesn't show any parameter. Only click refresh button to choose them. On the other hand, for 'Group Tree' is ok. When go to Default Setting-> Parameter, all parameters are in 'Unused parameter'  First time I think I had problems with my installation, but when I reinstalled it again, it was like before.
    Could any one help me with this?
    I appreciate looking forward to your reply
    Ketya

    Try posting your questionin the correct forum, this is for SAP Business One, not Crystal reports Server

  • 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

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi,
    I have one multi record block in which i want to fetch values
    (more then one record) from another table using select statement
    IN KEY NEXT ITEM.I am getting following error.
    ORA-01422: exact fetch returns more than requested number of rows
    Thanks in advance.

    In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
    Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
    However, you can replace the explicit cursor with implicit one like
    go_block('non_db_block_name');
    first_record();
    FOR v_tab IN (SELECT *
    FROM tab
    WHERE col_name = :variable)
    LOOP
    :non_db_block_name.field1 := v_tab.col1;
    :non_db_block_name.field2 := v_tab.col2;
    next_record();
    END LOOP;

  • 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.

  • How to popluate user defined values in Paramter field of a report using "Report Server Project", BIDS

    Hello,
    I am creating report using "Business Intelligence Development Studio", creating "Report Server Project" connected to TFS database.
    I have created Variance report and the output of report  as below sample:
    Project   Assigned To      Planned Effort        Completed    Remaining  Variance
    P1            X                        20                        
    10                 5              5
    P2            Y                        10                        
    10                 0             0
    P3            Z                          5                        
    0                  5              0
    By default I made Assigned To as parameter field and its showing data for selection in a drop down box (X, Y and Z) and data also filtered correctly.
    Q. how can I fill resource names in a drop down of my own choice (in this scenario, I want to display only X and Y) and display data based on the selected resource? By default parameter displays all the resources which I don't want.
    I did the below but could not get correct result:
    1. Right Click on "Assigned To" parameter, Clicked on "Available Values" and Selected "Specify values" instead of "Get values from query"
    2. Added X as Label and Value as 2 (Employee ID as mentioned in dbPerson table)
    Drop down displays X but when I clicked on report, it gives an error...
    Appreciate your help on this.
    Regards
    Abdul Kalam

    Hi Abdul,
    From the document, we know that CONSTRAINED flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to qualified
    or unqualified member names, the following error appears: "The restrictions imposed by the CONSTRAINED flag in the STRTOSET function were violated."
    So you need to make sure the members are passed properly to the STRTOSET function. For more details, please see the following links:
    http://ch1n2.wordpress.com/2010/02/21/the-restrictions-imposed-by-the-constrained-flag-in-the-strtoset-function-were-violated/
    http://www.bp-msbi.com/2010/04/passing-unconstrained-set-and-member-parameters-between-reports-in-reporting-services/
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSRS 2012 multi select parameter not working in Report Manager.

    Hello,
    I have one report with Multi select parameter. its working fine in bids, report server but I am facing some issue on report manager 2012.
    Issue is, In Multi select parameter I have Suppose 6 value a,b,c,d,e,f  after the deployment on report manager for the first time report is working fine with selecting all the value. but for the second time if my selection include either
    a or f report gives no result and check box get unselect.
    I also try on different report manager but same result.
    what can be a issue here causing problem only for two value but working fine for other value?
    Thanks,

    Hi Javed,
           The Issue is with when you click on View Report button of Report Manager for Parameters which contain CHAR(10) and CHAR(13).
    Where ever that Column is used in Report Data Set ,
    Use replace(replace(Param,char(10),''),char(13),'')  function.
    ----------------Please Mark This as Answer if it helps to solve your problem---------------------------- 

  • Execute SQL Task with Parameter - from DB2 to SQL Server

    I am pulling data from DB2 to SQL Server.
    1st Execute SQL task runs the following against DB2:
    SELECT TIMESTAMP(CHAR(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 1 MONTH)) as START_MONTH
    FROM SYSIBM.SYSDUMMY1;
    I'm storing it as a Result Set.
    Next I have a Data Flow Task.  This pulls data from DB2 where the date matches the parameter.
    FROM SCHEMA.TABLE t
    WHERE DATE_TIME_COLUMN= ?
    This works fine. Guessing, because the parameter source is DB2 and the Data Flow source is DB2.
    The problem is, I want to remove existing data for the same date in the SQL table.  IE, if I'm pulling March 2014 data from DB2, I want to be sure there is no March 2014 data in the SQL table.  The main use is for re-runs.
    So, I added another Execute SQL task after the first one that assigns the variable, and before the Data Flow Task. This runs the following statement against SQL Server:
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= ?
    The package fails at the new Execute SQL Task with the following error message:
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "DELETE FROM
    SBO.dbo.tblHE_MSP_FEE_BUCKETS
    WHERE T..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
    Task failed: Execute SQL Task
    SSIS package "Load_MSP_Fee_Buckets_SQL.dtsx" finished: Success.
    The program '[14240] Load_MSP_Fee_Buckets_SQL.dtsx: DTS' has exited with code 0 (0x0).
    I am assuming this is something to do with the Parameter source being DB2, and trying to use against SQL?
    Any suggestions on how to make this work??
    Thanks,
    -Al H

    Parameter name is unrecognized
    is the key, how come DB2 is related if it runs against SQL Server
    What I think is happening you do not use the OLEDB connection to SQL Server.
    Likewise, if it is ADO then the query needs to be
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= @MyDate
    Arthur My Blog

Maybe you are looking for

  • Inserting old swf into new fla with different frame rate

    Hi, I'm trying to insert an old banner ad into a new Flash site.  The problem is, the banner I made at 20 frames per second, and the Flash site is set to 41, so it literally plays the banner twice as fast.  Any ideas as to what I can do about this? 

  • How to get row index of data table in the while ValueChangeListener fired?

    Hi, i have a data table in my page, which contains various components like inputText, selectOneChoice in each row. i am invoking a method ValueChangeListener attribute of the selectOneChoice component. I have given the autoSubmit=true for this compon

  • HT4527 how do I get my Itunes library from my desktop/mac to my laptop?

    I would like to have my Itunes library that I have on my desktop, on my laptop as well. How do I do that?

  • Missing Advanced Dialog button

    Somehow the "Advanced Dialog" button is missing from the Photo Downloader box of my Elements 8. Does anyone have the same problem and know how to fix it?  Thanks.

  • BI Services in WEBI client

    I'm trying to use BI services so I can use my webi client queries in Xcelsius.  In WEBI client when I on "show BI Services", the component browser pops out and it sits on "refreshing, please wait"  When I click on Manage Servers I'm not able to see a