JDBC receiver adapter to call MS SQLServer stored procedure with parameters

We are trying to use the JDBC receiver adapter to call a stored procedure in MS SQLServer with parameters.  According to the help documentation for the JDBC receiver adapter for action=EXECUTE,  "The elements within the stored procedure are interpreted as parameters" and "The parameter names must be identical to those of the stored procedure definition".  The parameters within a MS SQLServer stored procedure are required to begin with the '@' symbol.  The element names within a XML document i.e. used to call the stored procedure can not contain a special character such as '@' in the first position.  For all of the tests we have done where the parameter name in the XML document omits the '@' character, the parameters are not being received by the stored procedure.  Is there a way around this  problem?
Thank you,
Harold

Hello Harold - I am facing the EXACTLY SAME problem.Pls let me know how did you fix this problem ?
This is the message I am passing on to the DB SP:
<?xml version="1.0" encoding="UTF-8"?>
<MRIRequestInbound>
   <StatementName>
      <prc_FC_InsertStagingJournalEntries action="EXECUTE"/>
      <JournalData isInput="true" type="STRING">
<NewDataSet><Table ITEM = "" ENTITYID = "" PERIOD = "" ACCTNUM = "" DEPARTMENT = "" JOBCODE = "" AMT = "" REF = "" DESCRPN = "" ENTRDATE = "" BASIS = " " BALFOR = "N" REQUESTNUM = "" ACCTNAME = "" TYPE = "" DESCRPTN = "" GDEP_DESCRPN = "" GJOB_DESCRPTN = "" JOBTYPE = ""  /></NewDataSet>
</JournalData>
   </StatementName>
</MRIRequestInbound>
Out of which,
<NewDataSet> tag contains the value of the parameter in the SP. So, my value to the SP's parameter is :
<NewDataSet><Table ITEM = "" ENTITYID = "" PERIOD = "" ACCTNUM = "" DEPARTMENT = "" JOBCODE = "" AMT = "" REF = "" DESCRPN = "" ENTRDATE = "" BASIS = " " BALFOR = "N" REQUESTNUM = "" ACCTNAME = "" TYPE = "" DESCRPTN = "" GDEP_DESCRPN = "" GJOB_DESCRPTN = "" JOBTYPE = ""  /></NewDataSet>
Any clue ?
Cheers,
Amrish.

Similar Messages

  • JDBC receiver adapter to call MS SQLServer stored procedure

    Harold,
    Could you please post/email ou IR details to call Stored procedure and the SP itself.
    It will greately help me in my next senario.
    Thanks
    Venu
    [email protected]

    Hi,
    Go thru this blog to get the feel of this-
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    http://help.sap.com/saphelp_nw2004s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm
    Regards,
    Moorthy

  • Calling Stored procedure with Parameters in PowerPivot DataModel

    Hi All,
    I wanted to call a SQL stored procedure from PowerPivot(Excel) on based on changing slicer's value. 
    Currently, we can call stored procedure wihtout any parameter from Data Model tab using 
    Exec stored_proc_name in Table Properties window.
    What if I want to call the same procedure with a parameter whouse value will come by changing slicer's value. I  meant, changing slicer value will act as a parameter to that stored procedure & it should return updated results. 
    Is this possible in PowerPivot?

    Hi Rameshwar,
    According to your description, you call a SQL Server stored procedure in PowerPivot data model, now the problem is that you need to pass a parameter to the stored procedure, right?
    Based on my research, it seems that we cannot achieve this requirement directly in current version of PowerPivot data model. Here is a similar thread for you reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5350228d-bc62-4a3b-a1a6-e847483e2858/powerpivot-for-excel-2013-call-execute-stored-procedure-with-parameters?forum=sqlkjpowerpivotforexcel
    If you have any concern about this behavior, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
    in the following release after official confirmation.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Calling stored procedures with parameters with the Database Connectivi​ty Toolkit

    Hi all,
    I am new to the forum and am having difficulty finding a solution to a particular problem I am having regarding using the LabVIEW Database Connectivity Toolkit on a project I am currently working on at my job.  I have a database in which I have tables and stored procedures with parameters.  Some of these stored procedures have input, output, and return parameters.
    I have been trying to follow this example but to no avail:  http://digital.ni.com/public.nsf/allkb/07FD1307460​83E0686257300006326C4?OpenDocument
    One such stored procedure I am working on implementing is named "dbo.getAllowablePNs", which executes "SELECT * from DeviceType" (DeviceType is the table).  In this case, it does not require an input parameter, it has an output parameter that generates the table [cluster], and has a return parameter which returns an integer value (execution status code) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int, not null), PN (nvarchar(15), null), and NumMACAddresses (int, null).  I have gone over many examples and have talking to NI support to try to implement this and similar stored procedures in LabVIEW but have not been successful.  I am able to connect to the database with the Open Connection VI without error, but am running into some confusion following this step.  I am then trying to use the Create Parameterized Query VI to call the stored procedure and set the parameters.  I assume I would then use the Set Parameter Value VI for each parameter that is wired into the parameters input on the previous Parameterized Query VI?  I am also having some confusion during and following these steps as well.  I would greatly appreciate any advice or suggestions anyone might have in regards to this situation as I am not a SQL expert.  Also, I would be happy to provide any more information that would be helpful.
    Regards,
    Jon
    Solved!
    Go to Solution.

    Also, I don't know if this would be helpful but here is the actual stored procedure in SQL:
    CREATEPROCEDURE [dbo].[getLastSequenceNumber]
    @p1 nvarchar(10)='WO-00000'
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SETNOCOUNTON;
    -- Insert statements for procedure here
    selectmax(SequenceNumber)from Devices where WorkOrderNumber= @p1
    END
    GO

  • T-sql 2008 r2 place results from calling a stored procedure with parameters into a temp table

    I would like to know if the following sql can be used to obtain specific columns from calling a stored procedure with parameters:
    /* Create TempTable */
    CREATE TABLE #tempTable
    (MyDate SMALLDATETIME,
    IntValue INT)
    GO
    /* Run SP and Insert Value in TempTable */
    INSERT INTO #tempTable
    (MyDate,
    IntValue)
    EXEC TestSP @parm1, @parm2
    If the above does not work or there is a better way to accomplish this goal, please let me know how to change the sql?

    declare @result varchar(100), @dSQL nvarchar(MAX)
    set @dSQL = 'exec @res = TestSP '''+@parm1+''','' '''+@parm2+' '' '
    print @dSQL
      EXECUTE sp_executesql @dSQL, N'@res varchar(100) OUTPUT', @res = @result OUTPUT
    select @result
    A complicated way of saying
    EXEC @ret = TestSP @parm1, @parm2
    SELECT @ret
    And not only compliacated, it introduces a window for SQL injection.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Reporting off oracle stored procedure with parameters error

    Erorr message: Error in File xxx.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 907 ]
    Asp.net 2.0 web application.
    CR XI R2 sp2 in BOE XI R2 sp2 on Solaris 10.
    Database: Oracle 10g on Solaris 10. Oracle stored procedure defined in package.
    Happens with reports reporting off stored procedure with parameters.
    The sp is used in the crystal report.
    The web application passes parameters to crystal report, which then passes the parameters to stored procedure.
    Encountered error if:
    r.PromptOnDemandViewing = false;
    r.UseOriginalDataSource = false;
    r.CustomServerType = CeReportServerType.ceServerTypeOracle;
    Report can retrieves data if:
    r.PromptOnDemandViewing = false;
    r.UseOriginalDataSource = true;
    r.CustomServerType = CeReportServerType.ceServerTypeOracle;
    In addition
    The steps are:
    1)     Create oracle package and stored proc.
    2)     In CR Designer, select the stored proc as datasource.
    3)     The parameters names were "generated" by the CR Designer.
    4)     Rename the parameter names.
    5)     Drag the fields onto report.
    We noticed the following with different setting of database logon info:
    When previewing from BOE, get error when "Use custom database logon information specified here"
    However, no error when "Use original database logon information from the report". 
    Am i missing something?

    Please re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • Urgent: unable to call a plsql stored procedure with a struts data action

    Hello ALL,
    I'm trying to call a plsql stored procedure within a struts DataAction,
    The scenario is:
    When a user a click on a button, then it should call a specific stored procedure,,
    I create struts data action a class to handle the event which is to call the procedure
    Here is my code:
    public class RequestAction extends DataForwardAction
    public void onCall(DataActionContext ctx)
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    try{
    AppModuleImpl myAm = (AppModuleImpl)am;
    DBTransaction tr = (DBTransaction) myAm.getTransaction();
    CallableStatement stmt = tr.createCallableStatement
    ("begin pkg_test.test; end;", DBTransaction.DEFAULT);
    stmt.execute();
    stmt.close();
    tr.commit();
    catch(Exception e){System.out.println(e.getMessage());}
    Configuration.releaseRootApplicationModule(am,true);
    but when I ran the application and click on the button, I got the following Exception:
    04/07/08 00:45:50 ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PKG_TEST.TEST' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It seems that the DBTransaction object unable to see the stored procedure,
    Am I do something wrong or miss something???
    I've checked the examples on the OTN HOW TO, and searched in the JDeveloper Forum but unable to find an answer,
    Please anyone can help???
    Thanks a lot
    With Regards,
    Hayat

    Here's an example application that illustrates how to do this. I haven't had a chance to writeup a little paper to go with it yet, but will as soon as I have a chance.
    http://otn.oracle.com/products/jdev/tips/muench/storedproc/CallStoredProc.zip
    See the "callStoredProcedure" method in the application module in the Model project.
    See the "callStoredProcedure" method binding in the binding container of the "CallStoredProcedure" data page.
    Notice the name "event_callStoredProcedure" of the (Call Stored Procedure) button on the CallStoredProcedure.jsp page which triggers the declaratively invocation of the method.
    You could also call the method from code in a custom data action.
    The code example illustrates how to create your own JDBC prepared statement for invoking the stored procedure, and doing it in a way that is efficient by keeping the prepared statement around across invocations.

  • How to call PL/SQL stored procedure with TWO or more arguments from URL?

    Hi all,
    does anybody know, how to call stored procedure with more than one argument?
    How to do this with one argument is known -
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#" width="70" height="80" alt="No Picture">
    But if I need to call procedure with two formal parameters? And need to pass through URL, for example, two page item values?

    Just separate with an "&". Using your previous example, I'll add i_name and i_type:
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#&i_name=somename&i_type=jpg" width="70" height="80" alt="No Picture" />
    Tyler

  • Call stored procedure(with parameters) via odbc

    In my application I like to use the below statement to call a stored procedure with parameter and return a result set.
    {CALL PP.getPerson('daniel')}
    but this will just return errors to my application.
    If I change the statement to:
    {CALL PP.getPerson(?')}
    and bind a parameter and its value, it will work.
    My question is, is it possible to call a stored procedure via ODBC without binding parameters in application? I mean, what will be my SQL equivalent if I don't want to do parameter binding in my application?
    Thanks in advance. I appreciate any help :-)

    hi 
    Please see the e.g bellow
    create proc proc_test(@SchoolNumber int,@SchoolName
    varchar(100),@StudentNumber int, @StudnentName
    varchar(100)output ,
    @StudentAddress varchar(100) output,
    @Studentbirthdate datetime output,
    @StudentPhoneNumber varchar(100) output,
    @GuardianName varchar(100) output)
    as
    begin
    select @StudnentName varchar=StudnentName ,
    @StudentAddress =StudentAddress,
    @Studentbirthdate =Studentbirthdate ,
    @StudentPhoneNumber =StudentPhoneNumber,
    @GuardianName =GuardianName
    from table where schoolno=@SchoolNumber
    and SchoolName=@SchoolName
    and StudentNumber=@StudentNumber
    return
    end
    http://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx
    http://www.lynda.com/SQL-Server-tutorials/Using-input-output-parameters/104964/113058-4.html
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • Calling DB2 Stored procedure(with parameters) from powershell

    Hi 
    I am trying to call a DB2 stored procedure that has parameters from Powershell scrip and I am not able to can some one help me here?
    $ServerName = 'XXXX'
    $dbalias='XXXXX'
     $conn_string = "Provider=IBMDADB2;DBALIAS=$dbalias;Uid=;Pwd=;"
     $conn = new-Object system.data.Oledb.OleDbconnection
     $conn.ConnectionString = $conn_string
     $conn.open()
     $query="CALL DBID_CONTROL.GET_TABLE_MAINT_CTL(?,?,?,'MSAS','DATABASE_CONNECTIONS_CUBE','CUBE_PARTITION');"
     $cmd = new-Object system.data.Oledb.OleDbcommand($query,$conn)
      $ds=New-Object system.Data.DataSet
     $da=New-Object System.Data.OleDb.OleDbDataAdapter($cmd)
      $da.Fill($ds) [int]$cur_utc_date_key = $ds.Tables[0].Rows[0][0]
     $cur_utc_date          = $ds.Tables[0].Rows[0][1]
     ###list current date key & current date values
     write-output "current date key value is $cur_utc_date_key"
     write-output "current date value is $cur_utc_date"
     write-output " "
    Thanks

    Hi 
    This is the error message i get when i run the script
    Exception calling "Fill" with "1" argument(s): " CLI0100E  Wrong number of parameters. SQLSTATE=07001"
    At line:45 char:10
    +  $da.Fill <<<< ($ds)
        + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : DotNetMethodException

  • Power Pivot- calling stored procedure with parameters

    Hi,
    Can I use stored procedure as datasource in powerpivot. Stored procedure will have 3 parameters which needs to be passed.
    I need to fetch the parameter values at run time and pass to stored procedure.
    Is this possible?

    Hello,
    Yes, it's possible. In PowerPivot Window click on "From Database" => "From SQL Server", in the Wizard select "Write a query that will specify the data to import" and then enter the call for the stored procedure, here an example for "AdventureWorks":
    EXEC [dbo].[uspGetWhereUsedProductID] @StartProductID = 1, @CheckDate = N'1/1/2015'
    Later you can modify the SP call via function "Table properties":
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to call stored procedure with parameters?

    I created a stored procedure in db like:
    CREATE PROCEDURE dbo.MySP
    @name varchar(50),
    @access_date datetime
    AS
    BEGIN
    --insert data into a table
    End
    Then I create pb function to call this sp like( I use pb 11.5)
    datetime ll_date
    ll_date =datetime(today(), now())
    DECLARE mytest PROCEDURE FOR MySP @objname = :is_name, @access_date = :ll_date USING is_tran;
    IF is_tran.SQLCode <> 0 THEN
          MessageBox ( "Error", "DECLARE failed" )
          RETURN
    END IF
    EXECUTE mytest;
    IF ( is_tran.SQLCode <> 0 ) and ( is_tran.SQLCode <> 100 ) THEN
          MessageBox ( "Error", "EXECUTE failed" )
          RETURN
    END IF
    Then I run the app, first time to call this function without any error, but no data inserted, no thing happen.
    keep in the app and call the function again, give me error declare error.
    debug give me SQLCode = 100.
    SP is fine, I can insert data with isql like:
    exec MySP 'name', '2014-06-18'
    How to figure out the problem and fix it?

    You didn't mention the database in question, but the first thing I would recommend is making the call via and RPCFUNC declaration on a user object to type transaction rather than embedded SQL.  Embedded SQL (IMHO) should be a last resort.
    See:  Using Transaction Objects to call Stored Procedures

  • Calling Stored Procedure with parameters from a C program

    Hello, I need to call a PL/SQL stored procedure from a C program.
    Something like this sample program provided by Oracle -
    main()
    int i;
    EXEC SQL BEGIN DECLARE SECTION;
    */* Define type for null-terminated strings. */*
    EXEC SQL TYPE asciz IS STRING(20);
    asciz  username[20];
    asciz  password[20];
    int    dept_no;    / which department to query */*
    char   emp_name[10][21];
    char   job[10][21];
    EXEC SQL VAR emp_name is STRING (21);
    EXEC SQL VAR job is STRING (21);
    float  salary[10];
    int    done_flag;
    int    array_size;
    int    num_ret;    / number of rows returned */*
    int    SQLCODE;
    EXEC SQL END DECLARE SECTION;
    */* Connect to Oracle. */*
    strcpy(username, "SCOTT");
    strcpy(password, "TIGER");
    EXEC SQL WHENEVER SQLERROR DO sqlerror();
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
    printf("Enter department number: ");
    scanf("%d", &dept_no);
    fflush(stdin);
    */* Set the array size. */*
    array_size = 10;
    done_flag = 0;
    num_ret = 0;
    */* Array fetch loop - ends when NOT FOUND becomes true. */*
    EXEC SQL EXECUTE
    BEGIN personnel.get_employees
    *(:dept_no, :array_size, :num_ret, :done_flag,*
    *:emp_name, :job, :salary);*
    END;
    END-EXEC;
    The question is - how is the Stored procedure get_employees declared ? Or more specifically, how is the salary parameter declared in get_employees ? Any help is highly appreciated.

    Hope following will help
    NOTE: Not tested
    Calling a stored procedure
    This program connects to ORACLE using the SCOTT/TIGER
    account. The program declares several host arrays, then
    calls a PL/SQL stored procedure (GET_EMPLOYEES in the
    CALLDEMO package) that fills the table OUT parameters. The
    PL/SQL procedure returns up to ASIZE values.
    It keeps calling GET_EMPLOYEES, getting ASIZE arrays
    each time, and printing the values, until all rows have been
    retrieved. GET_EMPLOYEES sets the done_flag to indicate "no
    more data."
    #include <stdio.h>
    #include <string.h>
    EXEC SQL INCLUDE sqlca.h;
    typedef char asciz[20];
    typedef char vc2_arr[11];
    EXEC SQL BEGIN DECLARE SECTION;
    /* User-defined type for null-terminated strings */
    EXEC SQL TYPE asciz IS STRING(20) REFERENCE;
    /* User-defined type for a VARCHAR array element. */
    EXEC SQL TYPE vc2_arr IS VARCHAR2(11) REFERENCE;
    asciz username;
    asciz password;
    int dept_no; /* which department to query? */
    vc2_arr emp_name[10]; /* array of returned names */
    vc2_arr job[10];
    float salary[10];
    int done_flag;
    int array_size;
    int num_ret; /* number of rows returned */
    EXEC SQL END DECLARE SECTION;
    long SQLCODE;
    void print_rows(); /* produces program output */
    void sql_error(); /* handles unrecoverable errors */
    main()
    int i;
    char temp_buf[32];
    /* Connect to ORACLE. */
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    strcpy(username, "scott");
    strcpy(password, "tiger");
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
    printf("\nConnected to ORACLE as user: %s\n\n", username);
    printf("Enter department number: ");
    gets(temp_buf);
    dept_no = atoi(temp_buf);/* Print column headers. */
    printf("\n\n");
    printf("%-10.10s%-10.10s%s\n", "Employee", "Job", "Salary");
    printf("%-10.10s%-10.10s%s\n", "--------", "---", "------");
    /* Set the array size. */
    array_size = 10;
    done_flag = 0;
    num_ret = 0;
    /* Array fetch loop.
    * The loop continues until the OUT parameter done_flag is set.
    * Pass in the department number, and the array size--
    * get names, jobs, and salaries back.
    for (;;)
    EXEC SQL EXECUTE
    BEGIN calldemo.get_employees
    (:dept_no, :array_size, :num_ret, :done_flag,
    :emp_name, :job, :salary);
    END;
    END-EXEC;
    print_rows(num_ret);
    if (done_flag)
    break;
    /* Disconnect from the database. */
    EXEC SQL COMMIT WORK RELEASE;
    exit(0);
    void
    print_rows(n)
    int n;
    int i;
    if (n == 0)
    printf("No rows retrieved.\n");
    return;
    for (i = 0; i < n; i++)
    printf("%10.10s%10.10s%6.2f\n",
    emp_name, job[i], salary[i]);
    /* Handle errors. Exit on any error. */
    void
    sql_error()
    char msg[512];
    int buf_len, msg_len;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    buf_len = sizeof(msg);
    sqlglm(msg, &buf_len, &msg_len);
    printf("\nORACLE error detected:");
    printf("\n%.*s \n", msg_len, msg);
    EXEC SQL ROLLBACK WORK RELEASE;
    exit(1);
    Remember, the datatype of each actual parameter must be convertible to the datatype of its corresponding formal parameter. Also, before a stored procedure is exited, all OUT formal parameters must be assigned values. Otherwise, the values of corresponding actual parameters are indeterminate.
    SQLCHECK=SEMANTICS is required when using an anonymous PL/SQL block.

  • Calling an oracle stored procedure with output parameter

    Hi,
    I am trying to execute a procedure with 2 input and 1 output parameters by using SQLQuery. I tried each mode (Command, FixedQuery & FixedQueryWithOutput) with following statements.
    call cm_test_prod([Param.1],[Param.2],[Param.3])
    Error:"missing expression "
    call cm_test_prod([Param.1],[Param.2],?)
    Error:"wrong number or types of arguments in call to 'CM_TEST_PROD'"
    call cm_test_prod([Param.1],[Param.2],:var)
    Error:"wrong number or types of arguments in call to 'CM_TEST_PROD' "
    or
    Error: "not all variables bound"
    If I use without output parameter, in Command mode, It works fine.
    call cm_test_prod([Param.1],[Param.2])
    or
    call cm_test_prod('[Param.1]','[Param.2]')
    works without error.
    SAP XMII: Version 12.0.5 Build(126)
    Oracle 10G
    Any help would be greatly appreciated.
    Thanks,
    Tunur.
    Edited by: Namik Tunur on Dec 14, 2010 3:34 PM
    Edited by: Namik Tunur on Dec 14, 2010 3:36 PM

    Hi,
    @Marcelo,
    I  used your package just by replacing 'varchar2' instead of 'varchar(100)''. I got the error message 'ORA-00900: invalid SQL statement'. I didn't understand how we handle output parameter with this:
    Query = Call MYPKG.MyProcedure(1,'Test FixedQueryWithOutput',?)
    What is Query in here? If we have two output parameters, how would we get the outputs?
    My procedure is:
    CREATE OR REPLACE
    PROCEDURE XXXXX.CM_TEST_PROD_OUTPUT(v1 in number,v2  in number, v3 out number) IS
    BEGIN
      update test_table set no2 = (v1+v2);
      commit;
      v3 := v1+v2;
    END;
    declare
    a number;
    BEGIN
      cm_test_prod_output(1,6,a);
    END;
    if I use this
    call cm_test_prod_output([Param.1],[Param.2],?)
    with FixedQueryWithOutput mode,
    I get the following error:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'CM_TEST_PROD_OUTPUT'
    @Mike,
    I already tried both with quotes and without quotes, also I tried both with number output and with string output.
    As I mentioned before, if I use number inputs without output in Command mode,
    call cm_test_prod(http://Param.1,http://Param.2)
    or
    call cm_test_prod('http://Param.1','http://Param.2')
    works succesfully.
    Regards,
    Tunur

  • Stored procedure with parameters

    Morning all,
    I was wondering how can you pass report parameters to the stored procedure so that the records can be filtered accordingly.
    I have created a Command under CR2008 using the following SQL however when I ran the report with my parameters according to Customer account, the stored procedure did not filter the records accordingly.
    Here is the SQL
    Select Unique Count (Order_header.order_no)
    from order_lines,order_header
    where order_lines.order_no=order_header.order_no
    and order_header.date_entered=Today
    and order_header.order_status<>0
    On the Report Record Selection formula I have setup a parameter value of Account number
    ({foccredsum.date_created} in Yeartodate)and
    ({foccredsum.reason_code} >= {?Start Code} and
    {foccredsum.reason_code} <={?End Code}) and
    *(not hasvalue ({?Account Number}) OR {foccredsum.account_no}={?Account Number}) and*
    (not HasValue({?Product Group}) or {foccredsum.product_code} = {?Product Group}) and
    (not HasValue({?Sales Area}) or {foccredsum.area_code} in {?Sales Area});
    I thought the Sp collects all the data and then filters it according to the parameters set in the report. Is it not true?
    Many thanks for your advice
    Kind Regards
    Jehanzeb

    You are right! First the report runs and gets all the data from SP and then it filters the data according to the record selection.
    Regards,
    Raghavendra

Maybe you are looking for

  • How might I merge 2 photos, and object from one photo cleanly onto a background from another?

    I paint from photos, and wish to merge 2 photos together. I now use PS7. I would like to  clearly merge an object from one photo onto a background in a 2nd photo. The photomerge options in a trial PS10 do not create the composite I wish, ie, a clean

  • Help needed in getting computer to recognise kindle

    Our library (Liverpool (UK)) has just started using Adobe Digital Edition so that ereaders can read loaned e-books. My Toshiba laptop has the software installed and authorised but although the laptop recognises my Kindle paperwhite it does not appear

  • Exception placement in anonymous block

    Hi, I am having difficulty trying to figure out why this exception won't work. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> DECLARE num NUMBER;   2  compile_rec VARCHAR2(200);   3  v_owner VARCHAR2(50);   4 

  • Snapshot report

    Hi all, I have one requirement in share point 2013.I have one custom list in share point 2013 site and this list is associated with workflow. i have to develop one report and this report would provide a snapshot of the current project data in the pro

  • Web Service - Invoke Web Service not trapping errors

    Greetings All: I am having an issue trying to trap errors coming out of the Invoke Web Service service. I have a Fault Route set up for SYSTEM EXCEPTION, and direct it to an ExecuteScript service. If the process I am developing fails, it appears to l