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

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

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

  • 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

  • Pass a null value to a JDBC stored procedure call?

    pass a null value to a JDBC stored procedure call? Is this even possible? My DBA gave me a procedure to call that sometimes requires a null value. I don't think this is even possible.

    do you mind tell me how to resolve your problem?i using the setnull method,but it doesn't work.

  • Multi-Value Parameters to Oracle Stored Procedures via SQL Commands

    Hi,
    When you used stored procedure in CR, you need to declare REF CURSOR, This type of cursor is a dynamic cursor not a static cursor. Hence, you are able to manipulate dataset in this type of cursor.
    Regards,
    Titanium0203

    As far as I know the documentation on CR & stored procedures says that the REF CURSOR has to be a strongly bound one.
    Could you go into a little more detail? Do you mean I should put a multi-valued parameter into a REF CURSOR? Can you post some code snippets here?

  • How to pass a table as parameter on a stored procedure

    Hello all,
    I want to pass the name of a table as parameter into a stored procedure, that will be used for cursors etc.
    But when i pass the parameter and i compile the S.P. it give me error (error: table not existing...)
    Any Help?
    Thanks in advance, Marco

    Marco wrote:
    As i've written above, i'm using stored procedures like 'batch' programs which will be executed with oracle scheduler (passing to s.p. the name of the 'input' tables)
    These input tables are 'external' tables which have got the same structure; for example i've got TABLEX_001, TABLEX_002, XXTAB etc. with the same structure.
    This is the the reason... what do you think?An external table definition can reference multiple files via the LOCATION definition or you can user "ALTER TABLE" to alter the location and change the file that the external table points to.
    Thus you only need one static External Table and use an alter table (via execute immediate) to change the file location it points to, or if you want all the data together, just specify all the files in the location.
    That would be clean design, using one fixed table, without the need to pass any table names, just dynamically altering the file names if necessary at run time.

  • Add Table Valued Parameter to a stored procedure

    I have a stored procedure that voids an invoice and puts the items back into inventory and makes available the payment that was used to apply to this invoice... I would like to be able to do all this for a number of invoices at a time using a table valued
    parameter how would I be able to do it?
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: Debra
    -- Create date: March 25, 2014
    -- Description: Void an invoice.
    -- =============================================
    CREATE PROCEDURE AR_VOID
    -- Add the parameters for the stored procedure here
    @Invoice INT,
    @InvType nvarchar(3)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
        -- Insert statements for procedure here
    IF(@InvType = 'reg')
        BEGIN
    UPDATE INV SET ONHAND = ONHAND + ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED + ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
    WHERE ARD.INVOICE = @Invoice
    MERGE INTO RECEIPTSH target
        USING (SELECT JOURNAL, SUM(AMOUNT) AMOUNT FROM Applied
        WHERE INVOICE = @Invoice GROUP BY JOURNAL) AS source
        ON target.Journal = source.Journal
        WHEN MATCHED THEN 
        UPDATE 
        SET Applied = Applied - SOURCE.Amount;
        DELETE Applied WHERE INVOICE = @Invoice
        END
        ELSE 
        BEGIN
    UPDATE INV SET ONHAND = ONHAND - ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED - ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
    WHERE ARD.INVOICE = @Invoice
    MERGE INTO ARH target
        USING (SELECT INVOICE, SUM(AMOUNT) AMOUNT FROM CREDITMEMO WHERE CINVOICE = @Invoice GROUP BY INVOICE) AS source
        ON target.INVOICE = source.INVOICE
        WHEN MATCHED THEN 
        UPDATE 
        SET [OPEN] = 'TRUE', CLOSEDATE = NULL, PAID = target.PAID - source.AMOUNT;
    DELETE CREDITMEMO WHERE CINVOICE = @Invoice
        END
        UPDATE ARH SET SUBTOTAL = 0, TAXES = 0, PAID = 0, STATUS = 'VOD', [OPEN] = 'FALSE', CLOSEDATE = CONVERT(DATE,GETDATE()) WHERE INVOICE = @Invoice
    UPDATE ARD SET QTY = 0, ARD.PRICE = 0 WHERE INVOICE = @Invoice
    END
    GO
    Debra has a question

    Try
    CREATE TYPE InvoicesList AS TABLE (InvoiceID INT)
    GO
    - =============================================
    -- Author: Debra
    -- Create date: March 25, 2014
    -- Description: Voids passed invoices.
    -- =============================================
    CREATE PROCEDURE AR_VOID
    @InvoicesList InvoicesList READONLY,
    @InvType nvarchar(3)
    AS
    BEGIN
    SET NOCOUNT ON;
    IF(@InvType = 'reg')
    BEGIN
    UPDATE INV SET ONHAND = ONHAND + ARD.Qty ,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED + ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
    WHERE ARD.INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
    MERGE INTO RECEIPTSH target
    USING (SELECT JOURNAL, SUM(AMOUNT) AMOUNT FROM Applied
    WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList) GROUP BY JOURNAL) AS source
    ON target.Journal = source.Journal
    WHEN MATCHED THEN
    UPDATE
    SET Applied = Applied - SOURCE.Amount;
    DELETE Applied WHERE INVOICE IN (Select InvoiceID FROM @InvoicesList)
    END
    ELSE
    BEGIN
    UPDATE INV SET ONHAND = ONHAND - ARD.Qty,STAMPED = CASE WHEN INV.TYPE = 'CIG' THEN STAMPED - ARD.QTY ELSE 0 END, LASTDATE = CONVERT(DATE, GETDATE()) FROM ARD JOIN INV ON ARD.ITEM = INV.ITEM
    WHERE ARD.INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
    MERGE INTO ARH target
    USING (SELECT INVOICE, SUM(AMOUNT) AMOUNT FROM CREDITMEMO WHERE CINVOICE IN (SELECT InvoiceID FROM @InvoicesList) GROUP BY INVOICE) AS source
    ON target.INVOICE = source.INVOICE
    WHEN MATCHED THEN
    UPDATE
    SET [OPEN] = 'TRUE', CLOSEDATE = NULL, PAID = target.PAID - source.AMOUNT;
    DELETE CREDITMEMO WHERE CINVOICE IN (SELECT InvoiceID FROM @InvoicesList)
    END
    UPDATE ARH SET SUBTOTAL = 0, TAXES = 0, PAID = 0, STATUS = 'VOD', [OPEN] = 'FALSE', CLOSEDATE = CONVERT(DATE,GETDATE()) WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
    UPDATE ARD SET QTY = 0, ARD.PRICE = 0 WHERE INVOICE IN (SELECT InvoiceID FROM @InvoicesList)
    END
    GO
    I didn't look too close into your code, so I just translated your code as is into TVP.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

Maybe you are looking for

  • JDriver and weblogic.jar for the wlserver 6.1 sp2

    Hi all, After I download the jDriver for Ms sql 2000 server, I set the classpath as document told, I test it using the utils.dbping it works fine. But when I try to use it with the weblogic server 6.1 I have the problem as following: I included the j

  • Acrobat 8 Professional - Autocad - Adobe PDF options

    I have Windows XP Pro 2002 SP2, Autocad 2008 and Acrobat 8 Professional Trial version. when I am in Autocad and do a print to adobe pdf, I am always prompted for the filename and folder where the pdf file will be saved. the filename which is proposed

  • How to choose paper type in PSE 12 running on OSX version 10. 9. 2

    I have read all the posts and answers bu none of them apply to my predicament can someone help please.

  • How to run OC4J

    This question is regarding stanalone OC4J I have deployed my war file inside the J2EE/Applications of Standalone OC4J . After starting OC4J how should i test my application . My question is What should be the values here : http:localhost: ----------

  • Terminal command for showing bandwidth

    Hallo, is there a way to show my current internet or LAN bandwith in the terminal? Thank you. Hannes