Issue using a parameter twice in record selection

Setup:
1) Crystal Report: (Client, Start Date, End Date) parameters linked to the Sub reports
2) Four sub-reports: (All open issues), (Oldest issue), (Average age of open issues), (Average age of closed issues)
I need to report on issues based on Customer types of "Company" and "Customer."  All of the records I'm reporting on are in the same table (Subset), but the "Client" parameter I'm using exists in two different columns depending on the Customer type.
ie. My paramter for "Client" is "ABC"
"ABC" is found in Subset.Sitename for (Company records)
"ABC" is found in Subset.Companyname for (Customer Records)
My record selection formula is:
{Subset.Companyname}={?Pm-?Client} or {Subset.Sitename}={?Pm-?Client}
Showing the SQL query shows both values filled in correctly, and if I paste the query in SQL, I get the correct result set.  But if I use any kind of "Running total", "Average", "Maximum", etc... functions, Crystal doesn't include my Company records in its evaluations.  It only evaluates Customer records.
Does anyone have a work-around for this?  Is this is a limitation?

All Open Issues -- My work-around was:
1) Running total (count) of open Customer issues
2) Running total (count) of open Company issues
3) Formula (sum) function of 1 and 2
Oldest Issue -- No workaround yet; Parameters listed above are in the Record selection
1) Datediff between Received date and Current date
2) Maximum of the Datediff results
Average Open - No workaround yet; Parameters listed above are in the Record selection
1) Datediff between Received and Current Date
2) Average of Datediff results
Average Closed - No workaround yet; Parameters listed above are in the Record selection
1) Datediff between Received Date and Closed Date
2) Average of Datediff results

Similar Messages

  • Using the Parameter twice in a jsp page

    I need to use a parameter twice I am really new to this and I know very little
    about java I need to use it where I put HERE can anyone help me!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.sql.*"%>
    <%@page import="java.util.*"%>
    <jsp:useBean id="dbset"  class="Beans.dbset" />
    <html>
    <body>
    <%String  res = request.getParameter("image_id");
    String sql = "SELECT DISTINCT episode_id, episode_date, link FROM episode_char_Query where character_id = " + res ;
    dbset.setQuery(sql);%>
    <table>
    <%
    Vector outvec = new Vector();
       Vector invec = new Vector();
    outvec = dbset.getResults();
    invec = (Vector)outvec.elementAt(1);
    for(int i=0; i<outvec.size(); i++)
    %>
      <tr>
    <%
    for(int j=0; j<invec.size(); j++)
        if(i!=0 && j==0)
    %>     <td align="center">
           <a href="episode.jsp?episode_id=<%=((Vector)outvec.elementAt(i)).elementAt(0).toString() %>&character_id ="HERE/>Click here to show scenes</a>
           </td>
    <%    }
        if(i!=0 && j==2)
    %>     <td align="center">
           <a href='C:\eastenders\<%=((Vector)outvec.elementAt(i)).elementAt(2).toString() %>'/>Click here to play episode</a>
           </td>
    <%    }
        else
    %>       <td align="center"> 
             <%= ((Vector)outvec.elementAt(i)).elementAt(j).toString() %>
             </td>
    <%      }
    %>
      </tr>
    <%
    %>
    </table>
    </body>
    </html>

    um.
    yuck.
    I would suggest you use some JSTL.
    Mixing html and scriptlet code like this is a recipe for disaster:
    And whats with all this if j==1, j==2 crap?
    Seeing as you only have three items being returned, it would be much simpler just to have one loop, and access vector elements 0,1,2 directly rather than having a double loop.
    At LEAST pull some of the stuff into temporary variables.
    <c:forEach var="episode" items="${outvec}" varStatus="status">
      <c:choose>
        // first line is headings?
         <c:when  test="${status.first}">
            <td align="center">${episode[0]}</td>
            <td align="center">${episode[1]}</td>
            <td align="center">${episode[2]}</td>      
         </c:when>
            // all other lines print the data
         <c:otherwise>
      <tr>
        <td align="center">
           <a href="episode.jsp?episode_id=${episode[0]}&character_id=${param.image_id}">Show scene</a>
        </td>
        <td align="center">${episode[1]}</td>
        <td align="center"> <a href='C:\eastenders\${episode[2]}'> play episode </a></td>
      </tr>
      </c:otherwise>
    </c:forEach>You see how much clearer it is without the nested looping and complicated if syntax?
    Do yourself a favour - take a step back get JSTL and rewrite it from scratch.
    You will be thanking yourself later.
    Cheers,
    evnafets

  • And another issue - using : column like :item in a select in a cursor

    i use column like :item frequently but now i'm thinking that it slows down the select making it run much more slowly . any suggestions or documentation I might use ? Do you think that it would be better to use column = :item or not to use :item at all ? Thanks a lot !

    Like in Select is used as
    WHERE col1 LIKE 'aaa%'
    and disable the index on col1 (Sure exists Index-Function)
    as it's better writing
    WHERE account_name LIKE 'CAPITAL%'in comparison to
    WHERE SUBSTR(account_name,1,7) = 'CAPITAL'Sure is better if you can use col1 = :item but I don't know your goal.
    Regards

  • Cannot use Is Null in record selection

    I cannot use Is Null in a record selection expert.  I use the same wording in excel and SQL QA with no issues.
    I need all records that are not '5 - Project' including Nulls.  Once I put the criteria of '5 - Project' it excludes the null records.
    {@dtCompleted} = {?Completed_Date_ Range} and
    {TASKS.TYPE} = "Information Technology" and
    {TASKS.PRIORITY} <>'5 - Project'
    This does not give me the nulls for the Priority field.
    The one I use in QA or in Excel is
    {@dtCompleted} = {?Completed_Date_ Range} and
    {TASKS.TYPE} = "Information Technology" and
    ({TASKS.PRIORITY} <>'5 - Project' or {TASKS.PRIORITY} is null)
    This gives me the "The ) is missing" error.  Help!

    (isnull({TASKS.PRIORITY}) or {TASKS.PRIORITY} <>'5 - Project')
    and
    @dtCompleted} = {?Completed_Date_ Range} and
    {TASKS.TYPE} = "Information Technology";
    Make sure that under File | Report Options or under File | Options the the box next to "Convert Database Null values to default' is NOT checked.
    {TASKS.PRIORITY} NOT EQUAL TO '5 - Project'.  Use the Greater than and less than symbols.
    Edited by: Sanjay Kodidine on Feb 27, 2009 8:49 PM

  • Need help with parameter fields and report selection.

    Hi all:
    I hope some one can help me with the problem I am having with my parameter field and record selection.
    First, can anyone explain to me why my parameter field CustStart, which is dynamic and is based on the field Customer in the table CustMaster.  There are over 1800 records in the CustMaster table but the drop down list only shows maybe about half of them and there is no way to scroll down to the last customer record.  What am I doing wrong?
    Second, is there any way to base a parameter field on a formula field on my report?  On my report I have created a field Cust that is the customer name and number joined together in one field.  I would very much llike to use this formula in my record selection and in my parameter field.  Can it be done?
    All help is greatly appreciated
    Thanks,
    FatMan

    Hi,
    You can use the following for changin increasing the LOV.
    Crystal Reports XI BusinessObjects Enterprise XI
    For performance reasons, in Crystal Reports XI Release 1 and Release 2 the maximum number of values that are returned for a list of values is set to 1000. If you have a cascading List of Values (for example Country > Region > City), the lowest level (in this case City) will only display a maximum of 1000 values. This means that the higher-level prompts may display far fewer values than you expect. The list of values provides the data for the dynamic parameter list.
    How can you modify the maximum number of values available in a dynamic parameter list?
    Resolution
    To increase the maximum number of values available in a dynamic parameter list, you must add a registry key.
    CAUTION     The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk. For information on how to edit the registry key, view the 'Changing Keys and Values' online Help topic in the Registry Editor (Regedit.exe).
    It is strongly recommended that you make a backup copy of the registry files (System.dat and User.dat on Win9x computers) before you edit the registry.
    Crystal Reports XI Release 1
    1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV.
    NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV key.
    2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. NOTE: The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
    NOTE     The higher the number of values is, the longer it will take the Enter Values dialog box to populate with values.
    3.      After making changes to the registry, restart the affected service or application as required.
    Crystal Reports XI Release 2
    1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV.
    NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV key.
    2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. 
    NOTE     The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
    3.     After making changes to the registry, restart the affected service or application as required.
    I hope this helps you.
    Regards,
    Prashant

  • How to tune the SQL & solve UNIQUE Contraint issue using without duplicates

    CREATE TABLE REL_ENT_REF
      ROLL_ENT        VARCHAR2(4 BYTE)              NOT NULL,
      ROLL_SUB_ENT    VARCHAR2(3 BYTE)              NOT NULL,
      ROLL_ENT_DESCR  VARCHAR2(50 BYTE),
      ENT             VARCHAR2(4 BYTE)              NOT NULL,
      SUB_ENT         VARCHAR2(3 BYTE)              NOT NULL,
      ENT_DESCR       VARCHAR2(50 BYTE)
    CREATE UNIQUE INDEX REL_ENT_REF_IDX_PK ON REL_ENT_REF
    (ROLL_ENT, ROLL_SUB_ENT, ENT, SUB_ENT);
    ALTER TABLE REL_ENT_REF ADD (
      CONSTRAINT REL_ENT_REF_IDX_PK
    PRIMARY KEY
    (ROLL_ENT, ROLL_SUB_ENT, ENT, SUB_ENT);
    TOTAL NUMBER OF RECORDS FOR TABLE REL_ENT_REF : 123542
    CREATE TABLE REL_COA_REF
      ACCT                    VARCHAR2(9 BYTE)      NOT NULL,
      ACCT_LVL                VARCHAR2(2 BYTE)      NOT NULL,
      ACCT_ID                 VARCHAR2(9 BYTE)      NOT NULL,
      REL_TYPE                VARCHAR2(10 BYTE)     NOT NULL,
      ACCT_TYPE               VARCHAR2(2 BYTE)      NOT NULL,
      ACCT_DESCR              VARCHAR2(43 BYTE),
      POST_ACCT               VARCHAR2(9 BYTE)      NOT NULL,
      POST_ACCT_TYPE          VARCHAR2(2 BYTE),
      POST_ACCT_DESCR         VARCHAR2(43 BYTE),
      SIGN_REVRSL             NUMBER
    CREATE INDEX REL_COA_REF_IDX_01 ON REL_COA_REF
    (ACCT_ID, REL_TYPE, POST_ACCT);
    CREATE UNIQUE INDEX REL_COA_REF_IDX_PK ON REL_COA_REF
    (ACCT_ID, ACCT, REL_TYPE, POST_ACCT);
    TOTAL NUMBER OF RECORDS FOR TABLE REL_COA_REF : 4721918
    CREATE TABLE REL_CTR_HIER_REF
      ENT           VARCHAR2(4 BYTE)                NOT NULL,
      SUB_ENT       VARCHAR2(3 BYTE)                NOT NULL,
      HIER_TBL_NUM  VARCHAR2(3 BYTE)                NOT NULL,
      HIER_ROLL     VARCHAR2(14 BYTE)               NOT NULL,
      HIER_CODE     VARCHAR2(14 BYTE)               NOT NULL,
      SUM_FLAG      VARCHAR2(14 BYTE)               NOT NULL,
      CTR_OR_HIER   VARCHAR2(14 BYTE)               NOT NULL,
      CTR_DETAIL    VARCHAR2(14 BYTE)               NOT NULL,
      CTR_DESCR     VARCHAR2(50 BYTE)
    CREATE INDEX REL_CTR_HIER_REF_IDX_01 ON REL_CTR_HIER_REF
    (HIER_TBL_NUM, HIER_ROLL, SUM_FLAG);
    CREATE UNIQUE INDEX REL_CTR_HIER_REF_IDX_PK ON REL_CTR_HIER_REF
    (ENT, SUB_ENT, HIER_TBL_NUM, HIER_ROLL, SUM_FLAG,
    CTR_DETAIL, CTR_OR_HIER, HIER_CODE);
    CREATE INDEX REL_CTR_HIER_REF_IDX_02 ON REL_CTR_HIER_REF
    (ENT, SUB_ENT, HIER_TBL_NUM, CTR_OR_HIER, SUM_FLAG,
    CTR_DETAIL);
    TOTAL NUMBER OF RECORDS FOR TABLE REL_CTR_HIER_REF : 24151811
    CREATE TABLE REL_TXN_ACT_CM
      ENT               VARCHAR2(4 BYTE),
      SUB_ENT           VARCHAR2(3 BYTE),
      POST_ACCT         VARCHAR2(9 BYTE),
      CTR               VARCHAR2(7 BYTE),
      POST_DATE         DATE,
      EFF_DATE          DATE,
      TXN_CODE          VARCHAR2(2 BYTE),
      TXN_TYPE          VARCHAR2(1 BYTE),
      TXN_AMOUNT        NUMBER(17,2),
      TXN_DESCR         VARCHAR2(46 BYTE),
      TXN_SOURCE        VARCHAR2(1 BYTE)
    CREATE INDEX REL_TXN_ACT_CM_IDX_01 ON REL_TXN_ACT_CM
    (ENT, SUB_ENT, POST_ACCT, POST_DATE, EFF_DATE,
    TXN_AMOUNT);
    CREATE INDEX REL_TXN_ACT_CM_IDX_PK ON REL_TXN_ACT_CM
    (ENT, SUB_ENT, CTR, POST_ACCT, POST_DATE,
    EFF_DATE, TXN_AMOUNT);
    TOTAL NUMBER OF RECORDS FOR TABLE REL_TXN_ACT_CM : 111042301
    CREATE TABLE REL_CLPR_TBOX_GL_TXN
      ORGANIZATION  VARCHAR2(10 BYTE)               NOT NULL,
      ACCOUNT       VARCHAR2(10 BYTE)               NOT NULL,
      APPLICATION   VARCHAR2(10 BYTE)               NOT NULL,
      AMOUNT        NUMBER(17,2)                    NOT NULL
    CREATE UNIQUE INDEX REL_CLPR_TBOX_GL_TXN_IDX ON REL_CLPR_TBOX_GL_TXN
    (ORGANIZATION, ACCOUNT, APPLICATION);
        DELETE FROM REL_CLPR_TBOX_GL_TXN;
        INSERT INTO REL_CLPR_TBOX_GL_TXN
          ORGANIZATION,
          ACCOUNT,
          APPLICATION,
          AMOUNT
        SELECT  --+ INDEX(T REL_TXN_ACT_CM_IDX_PK)
          SUBSTR(REL_CTR_HIER_REF.HIER_CODE, 1, 5) || '.....',
          TXN.POST_ACCT,
          'GL-' || SUBSTR(TXN.TXN_DESCR, 1, 3),
          SUM
            CASE
              WHEN TXN.TXN_CODE IN ('01', '21') THEN 1
                    WHEN TXN.TXN_CODE IN ('02', '22') THEN -1
                    ELSE 0
            END
            CASE
              WHEN REL_COA_REF.ACCT_TYPE IN ('01', '25', '30', '40', '90', '95') THEN 1
                    WHEN REL_COA_REF.ACCT_TYPE IN ('05', '10', '20', '35') THEN -1
                    ELSE 0
            END
            REL_COA_REF.SIGN_REVRSL
            TXN.TXN_AMOUNT
        FROM
          REL_TXN_ACT_CM REL_TXN
            INNER JOIN
          REL_CTR_HIER_REF
            ON
              REL_TXN.ENT = REL_CTR_HIER_REF.ENT AND
              REL_TXN.SUB_ENT = REL_CTR_HIER_REF.SUB_ENT AND
              REL_TXN.CTR = REL_CTR_HIER_REF.CTR_DETAIL
            INNER JOIN
          REL_COA_REF
            ON REL_TXN.POST_ACCT = REL_COA_REF.POST_ACCT
            INNER JOIN
          REL_ENT_REF
            ON
              REL_CTR_HIER_REF.ENT = REL_ENT_REF.ENT AND
              REL_CTR_HIER_REF.SUB_ENT = REL_ENT_REF.SUB_ENT
        WHERE
          REL_TXN.EFF_DATE BETWEEN L_MONTH AND LAST_DAY(L_MONTH) AND
          REL_CTR_HIER_REF.HIER_TBL_NUM = '001' AND
          REL_CTR_HIER_REF.SUM_FLAG = 'D' AND
          REL_CTR_HIER_REF.CTR_OR_HIER = REL_CTR_HIER_REF.CTR_DETAIL AND
          REL_CTR_HIER_REF.HIER_CODE BETWEEN 'AAA' AND 'ZZZ' AND
          REL_COA_REF.REL_TYPE = ' ' AND
          REL_COA_REF.ACCT_ID = 'ALPTER' AND
          REL_COA_REF.ACCT_LVL = '9' AND
          REL_ENT_REF.ROLL_ENT = '999' AND
          REL_ENT_REF.ROLL_SUB_ENT = '111'
        GROUP BY
          SUBSTR(REL_CTR_HIER_REF.HIER_CODE, 1, 5),
          REL_TXN.POST_ACCT,
          SUBSTR(REL_TXN.TXN_DESCR, 1, 3)
        HAVING
          SUM
            CASE
              WHEN REL_TXN.TXN_CODE IN ('01', '21') THEN 1
                    WHEN REL_TXN.TXN_CODE IN ('02', '22') THEN -1
                    ELSE 0
            END
            CASE
              WHEN REL_COA_REF.ACCT_TYPE IN ('01', '25', '30', '40', '90', '95') THEN 1
                    WHEN REL_COA_REF.ACCT_TYPE IN ('05', '10', '20', '35') THEN -1
                    ELSE 0
            END
            REL_COA_REF.SIGN_REVRSL
            REL_TXN.TXN_AMOUNT
          ) <> 0;
    [\CODE]
    While try to run the query(only select statement), it is taking around 3+ hours & while try to insert the same query in the table, getting error called ORA-00001: unique constraint (INSIGHT.CLPR_TBOX_GL_TXN_IDX) violated.
    [\CODE]
    How to tune & resolve this UNIQUE Contraint issue using without duplicates?

    Should the SELECT statement be returning duplicate rows? If you know that there are duplicate rows in the underlying tables, you could add a DISTINCT to the select. Which forces Oracle to do an extra sort which will slow down the insert. If you don't expect duplicate rows, you would need to figure out what join criteria is missing from your query and add that criteria.
    Justin

  • Record selector dont work for specific record selection

    Hi,
       I have a issue with the record selector in a spotlight.
    I want to select specific record, but when I select the check the record don't go in the selected record tab!
    the files dataservice.json and endecaBrowserService.json are correctly configure I think. I did compare with the Discover app. but I don't see want would be the issue! not that the dynamic record selection work correctly
    endecaBrowserService.json
        "host": "W177",
        "port": "15101",
        "recSpecProp": "Product_SKU",
        "recAggregationKey": "Endeca_Rollup_Id",
        "recFilter": "",
        "recImgUrlProp" : "URL_Thumbnail1",
        "recDisplayProps": [ "Brand","Category_EN","Product_SKU"],
        "textSearchKey": "interface_EN",
        "textSearchMatchMode" : "ALLPARTIAL"
    dataservice.json
        "jcr:primaryType": "endeca:unstructured",
        "host": "W177",
        "port": "15101",
        "recordSpecName": "Product_SKU",
        "aggregationKey": "Endeca_Rollup_Id",
        "recordFilter": "",
        "wildcardSearchEnabled": false,
        "recordNameField": "product_name_en",
        "fields": {"Brand" : "", "Category_EN":"","Product_SKU":""}
    any Idea
    thanks

    Hi TimK,
          actualy I dont have space in the record spec, but it look like this 8-474F9138-409-2. I assume that '-' wore bad character like your space.
    when I transfore the record spec to 8_474F9138_409_2. the record selector work perfectly
    thanks TimK for leading me to the solution
    good day

  • How can i change the record selection criteria via SDK?

    Hi,
    I wanna change the record selection criteria  in rpt file in java program, What API is required?
    Thanks.
    Forest

    Hi,
    You can use RAS API to change record selection formula at runtime. Go to
    https://www.sdn.sap.com/irj/boc/index?rid=/webcontent/uuid/f0aea666-5384-2b10-ffb0-a6facef1d5e5
    and look for Report Application Server Java SDK Feature Samples. It contains the record selection change code.
    Thanks
    Aasavari

  • Using combination of insert into and select to create a new record in the table

    Hello:
    I'm trying to write a stored procedure that receives a record locator parameter
    and then uses this parameter to locate the record and then copy this record
    into the table with a few columns changed.
    I'll use a sample to clarify my question a bit further
    -- Create New Amendment
    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE, p_new_amendment_number in mipr.amendment_number%TYPE)
    return integer is
    new_mipr_id integer;
    begin
    THIS is causing me grief See comments after this block of code
    insert into mipr
    (select mipr_id from mipr where mipr_number=p_mipr_number),
    (select fsc from mipr where mipr_number=p_mipr_number),
    45,
    (select price from mipr where mipr_number=p_mipr_number),
    practical,
    (select part_number from mipr where mipr_number=p_mipr_number);
    THe above will work if I say the following
    insert into mipr
    (select * from mipr where mipr_number=p_mipr_number);
    BUt, Of course this isn't what I want to do... I want to duplicate a record and change about 3 or 4 fields .
    How do I use a combination of more than one select and hard coded values to insert a new record into the table.
    /** Ignore below this is fine... I just put a snippet of a function in here ** The above insert statement is what I need help with
    select (mipr_id) into new_mipr_id from mipr where mipr_number=p_mipr_number + amendment_number=(select max(amendment_number) + 1);
    return new_mipr_id;
    end;
    THANK YOU IN ADVANCE!
    KT

    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE)
    return integer is
    new_mipr_id integer;
    tmp_number number;
    tmp_mipr_id integer;
    begin
    tmp_number :=(select max(amendment_number) from mipr where mipr_number=p_mipr_number);
    Question:
    tmp_number :=1; works..
    tmp_number doesn't work with the select statement?
    Obviously I'm a novice! I can't find anything in my book regarding tmp variables... What should I look under is tmp_number a
    variable or what? In my Oracle book, variable means something different.
    Thanks!
    KT
    I have the following code in my stored procedure:
    Good luck,
    Eric Kamradt

  • Parsing an input parameter for the where clause or record select value

    In my limited CR experience, I've always used a command database connection so that I can write my own SQL.  However, now I have to parse a  pipe delimited parameter to get my value for the where clause, so I'm selecting several tables and joining them through the Database Expert Links tab.  All works fine, but after doing that and then parsing the parameter with the below formula in the Select Expert, I notice that there is no where clause in the SQL query, and although the report eventually displays the proper values, it runs through thousands of records first.  Here is my Select Expert - Record formula:
    StringVar array Parm1;
    Parm1 := Split({?DATA_AREA}, "|");
    {SO_ORDERS.CASE_ID} = Parm1[2]
    If I change "Parm1[2]" on the last line to a valid Case ID, then there is a where clause in the SQL and the report generates immediately. 
    It seems like the record select formula is applied AFTER all of the records (without a where clause) are searched when I use the parsed parameter value, but when I hard code a valid value, it places that into the where clause BEFORE the sql is executed.  Is there a way to get the parameter parsed first and then use that parsed value in the SQL where clause?
    Thanks.
    Bill

    Yes crystal will run the query first to get 100% data and then applies record selection condition. To increase the performance you need to pass the where condition at the command level instead of report level. So you need to create a report using add command like this
    select * from tablename where field={?Parameter}
    {?Parameter} is a command level parameter.
    Now insert this report as a subreport in another report which has no connection but has a parameter
    {?DATA_AREA} and create a formula like this in the main report
    Split({?DATA_AREA}, "|")[2]
    Now right click on the subreport and go to change subreport links and add this formula from main report and link this to sub report parameter {?Parameter} without linking any database field from the subreport.
    Now your subreport runs with the where clause to get the data.
    Regards,
    Raghavendra

  • Get more the one records  in  procedure by using out parameter

    Hi good evening every body,
    how to get more the one records in procedure by using out parameter ,
    give me one example of it.
    regards
    subba

    Like this ?
    SQL> set serverout on
    SQL> declare
      2    v_empno dbms_sql.Number_Table;
      3    v_ename dbms_sql.Varchar2_Table;
      4    PROCEDURE P1(p_in_deptno IN emp.deptno%TYPE,
      5                 p1_out OUT  dbms_sql.Number_Table,
      6                 p2_out OUT  dbms_sql.Varchar2_Table) IS
      7    BEGIN
      8      SELECT empno, ename BULK COLLECT
      9        INTO p1_out, p2_out
    10        FROM emp
    11       WHERE deptno = p_in_deptno;
    12    END;
    13  BEGIN
    14    P1(20, v_empno, v_ename);
    15    FOR i in 1 .. v_ename.COUNT LOOP
    16      dbms_output.put_line(v_empno(i) || '--' || v_ename(i));
    17    END LOOP;
    18  END;
    19  /
    7369--SMITH
    7566--JONES
    7788--SCOTT
    7876--ADAMS
    7902--FORD
    7941--ABCDEFGHIJKLMNOPQRSTUVWXYZAAAAAA
    7942--MY#@ ' "ABC
    PL/SQL procedure successfully completed.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • HR ABAP: Issue with using 'nocommit' parameter on FM HR_INFOTYPE_OPERATION

    Issue with using nocommit parameter on FM HR_INFOTYPE_OPERATION:
    My client has a requirement to create the following 4 infotypes in sequence in a LUW, i.e either all are created or none is created.
    9045   (custom infotype)
    0045
    0078
    0015
    I tried to use the nocommit parameter on FM HR_INFOTYPE_OPERATION to insert the 4 infotypes
    in a nocoomit mode and then at the end I have issued
    'Commit Work', but to my surprise only I/T 0015 is created in the database and the first three (9045, 0045 and 0078) did not make it to database.
    I searched many threads on SDN but could not find a solution.
    Please let me know if there could be any solution to implement the LUW.
    YOur inputs will be appreciated.

    Hi ,
    i think u can also try with this FM HR_MAINTAIN_MASTERDATA , see its documentations.
    no commit works like a simulation mode , what u can do is  ,
    call FM for all Infotypes and collect all error msgs if any , then finally call FM for all infotypes again without passing nocommit work ( i.e space).
    regards
    prabhu

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • Using a column twice in a dashboard prompt -- multi-select and wild-carding

    My client is using OBIEE 10.1.3.2; they cannot upgrade at this time. However, they want to be able to enter both a list of values and a wild-card search for additional values at the same time for a single column in a dashboard prompt.
    Since they cannot upgrade, they do not have the wild-card search feature of the enhanced multi-select prompt feature of 10.1.3.3 and later releases.
    Has anyone found another method to do this, perhaps by using a column twice in a dashboard prompt or in separate dashboard prompts on the same dashboard apge, in order to OR the results of a multi-select and an edit box (with wild-card pattern-match entry)? I suspect that will not work -- that the results sets of one prompt for a column will override any other prompt result sets for the same column.
    Has anyone found another way to do this, prior to release 10.1.3.3?

    Yes, it is possible.
    This is how to do it:
    In your report you need to add two filters on the same column and combine them with OR.
    First filter: is prompted.
    Second filter: is like presentation_variable
    Then protect this filter!* This will make that your prompt will be filtered on the pres. variable and that it won't be overwritten by another prompt.
    Now create your dashboard prompt:
    First add your column with an edit box and attach the presentation variable to it.
    Then edit the formula of the column, so it will not reference to the column anymore. (Which isn't needed, since the value will be set to the pres. variable.)
    Then add the same column with a multi-select.
    Then test it and check your results.
    Regards,
    Stijn

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

Maybe you are looking for