How to use a parameter field value as a substring in a "like" statement?

Hi all,
I'm trying to use a parameter field in a Record selection formula where the parameter field value would be a substring of the data stored in the field.
My parameter field (SlctResearcher) is constructed as follows:
Type: string
List of Values: static
Value Field: (Reports) RptAuthors
(in Value Options) Allow custom values?: True
{Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
{Reports.RptAuthors} like "*{?SlctResearcher}*"
When I hit F5 to generate the data, I get no results (and the parameter prompt field does not even come up...)
If I modify the formula to put a hard-coded string, like
"*Jones*"
after the 'like', I get results (all the reports where "Jones" is a substring in the RptAuthors string.) If I modify the formula to just use the parameter field without the quotes/stars like:
{Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
{Reports.RptAuthors} like {?SlctResearcher}
I do get the parameter prompt field, but still no results even if I put in a valid substring value (since it is not searching for a substring anymore...)
How can I do this?
Thanks,
Will

1st thing... Make a copy of your report before doing anything!!!
To use a SQL Command, you'll want to open the Database Expert and look at the Current Connections. Expand the data source and the 1st option you see is the Add Command option.
To find the SQL That CR is currently using, choose Database from the menu bar and select Show SQL Query...
You can copy this and paste it directly into the command window. (If you you can write your own SQL you don't need copy CR's, it's just an option.)
You'll also want to take not of any parameters that you have, you'll need to add them the the Parameter List of the command as well... be sure to spell them EXACTLY as they are in the design pane.
Anyway, once the SQL statement is in the Command window you'll be able to alter the WHERE clause to use the wild cards.
For future reference... What type of database are you reporting against???
Jason

Similar Messages

  • How to ignorenon-numeric parameter field value

    Post Author: burhan.survery
    CA Forum: General
    I am passing a parameter to a subreport. While running the report, I get an error which says that the parameter field is a non-numeric value. I'm not sure why since, the parameter field should be passing a quantity. Is there a way for me to check if the parameter field is passing a non-numeric value and if so, ignore it so  that the report continues.
    thanks.
    b

    Post Author: bettername
    CA Forum: General
    Strange! I would have imagined from the fact that it gave you the original "non-numeric" error that it must be passing a string (how can a number be non-numeric!), but that's clearly not the case.  I'm stumped...  What does Crystal identify the 'source' field as (do a 'browse data' or 'show field types')? I assume that the parameter datatype is the same as the source field? 
    What's your data source (SQL Server, DB2 etc...)?  Is there a way you can validate everything is numeric outside of Crystal?

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • How to Hide the Parameter field at run time....

    Hi,
    I have a parameter field which behaves differently depending on the User logged in.
    It has the LOV coming from following SQL.
    SELECT customer_name FROM Cust_mast;
    If the user = 'INTERNAL' then the Where clause will be
    WHERE cust_id in('DELL', 'SBC', 'BANK')
    Else there will be no WHERE clause or the parameter field
    should be hidden in the parameter form.
    So my questions are:
    1) How to hide the Parameter field during Run time?
    OR OR OR
    2) How to change the LOV select statement during Run time?
    Thanks.
    Ram.

    Hi Ram,
    Is there any way to play with the sql query SELECT using DECODE ?I'm not sure of this part, maybe someone else can suggest a way.
    However, what you want can be done in 2 other ways:
    1. Build 2 reports. Both reports will just be duplicates of each other, only difference being that the 'LoV where clause' will be different. Now you can fire the appropriate report in many ways. For example, if the customer is alreay logged inside your custom application, and therefore you already know whether the user is internal of external, you can design your button or link which launches the report to contain logic such that one of the 2 reports is fired depending on who the user is.
    1. Use a JSP parameter form, not a paper parameter form In this case, just build an HTML parameter form in the web source of your report. Use Java logic to populate the LoV drop-down list. When you have to launch the final report, just launch the paper-layout of the report. For example (you will have to modify this):
    <form action="http://machine:port/reports/rwservlet?report=ParamForm.jsp+..." name="First" method="post">
    <select name="selected_customer" onChange="First.submit()" >
    <option value="">Choose a Customer Name
    <rw:foreach id="G_cust_id" src="G_cust_id">
         <rw:getValue id="myCustId" src="CUSTOMER_ID"/>
    <rw:getValue id="myCustName" src="CUSTOMER_NAME"/>
    <option value="<%=myCustId%>"><%=myCustName%>
    </rw:foreach>
    </select>
    </form>
    In the code above, you will have to make sure that your report's data model defines 2 CUSTOMER_ID's (like CUSTOMER_ID_INT and CUSTOMER_ID_EXT). These 2 will be internal and external Cust ID's. Use Java logic to show one of them.
    Navneet.

  • How to use shared parameter on request set

    Hi
    I have a request set with two stages
    First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
    i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
    based on these values i need to get the name in next parameter where my Type is SQL Statment
    select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
    I have written SQL as
    select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
    I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
    Appreciate if any one has idea about this.

    hi user;
    please check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
    http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
    Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
    Hope it helps
    Regard
    Helios

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • Parameter Field Value Elimination Based on Another Parameter

    I'd like to make 3 grouping parameters with static values to produce 3 drop downs in the user prompt.  The problem is, I'd like for the second drop down to eliminate the choice made from the first drop down and the third drop down to have been eliminated to only one choice.  Is there a way to edit the parameter field values from the formula workshop?...Or maybe this would be better handled in the group selection formula area.  Any help would be very much appreciated.

    Can't be done unless you use one of the 3rd-party Crystal viewers listed at http://kenhamady.com/bookmarks.html
    A simpler approach is to have a record selection formula that causes no records to be retrieved if 2 parameters have the same selected value.  You can then unsuppress a text object telling the user their parameter selections can't be the same.

  • 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

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program 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

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • How to pass the FORM Fields value by Form Personalization

    Hi ALL,
    I want to pass form filds values in to procedure. I am calling this procedure through form personalization of that form..... But it's not accepting any form field's value there... when i am passing hardcoded vales procedure is executing fine...
    can any one suggest what to do???
    i tried with these syntax
    TEST_EMP_FP(:ADDR.ADDRESS_ID,'ABC')
    TEST_EMP_FP(${item.ADDR.ADDRESS_ID.value},'ABC')
    Regards
    Ravi

    Hi,
    Iam calling an SRS from forms personlization. Can any body tell me how to pass the Form field values as parameters to the Reports. (Example when they call this Concurrent request from Transact5ions screen, The invoice number should be defaulted in the report parameter).
    Regards,,
    Anil.

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • HOW TO USE LEXICAL PARAMETER IN FORMS9I

    CAN I USE LEXICAL PARAMETER IN FORMS9I I WANT TO CREATE QUERY LIKE THIS
    SELECT * FROM &TABLE_NAME
    WHERE &CHOICE
    WHERE &TABLE_NAME = EMP, AND &CHOICE EMPNO=12344
    PLS HELP

    No, you can do it in sqlplus or reports but not in forms.
    If this is a datablock query you need to use set_block_property.
    If it is in a trigger you need to use execute immediate.

  • How to use import parameter to be instead of SQL where sub-sentence ?

    I wrote a RFC to read data from SAP table. To fetch data flexibility, I want to use import parameter xx instead of where sub-sentence in SQL sentence.
       For example, "SELECT * FROM T WHERE XXX",  and "XXX" is a importing parameter.
       How can I use it.
       Thanks a lot.
       Frank.

    FUNCTION ZRFC_04.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(TARGETTABLE) LIKE  MAKT-MAKTX
    *"     VALUE(TWHERE) LIKE  MAKT-MAKTX
    *"  EXPORTING
    *"     VALUE(ZRETURN) LIKE  MAKT-MAKTX
    *"  TABLES
    *"      TMP_TEST1 STRUCTURE  ZTEST1
      DATA:
      TRANSACTION_ID LIKE ARFCTID,
      V_VAILD(1) TYPE C,
      scond(80) TYPE c.
      V_VAILD = 'X'.
    GET PARAMETER twhere fields scond.
    The error " 'LATE FIELDS' expected, not 'TWHERE FIELDS' " generated.

  • How to use a screen-field when applying BADI or User Exit to a T Code

    Hi Experts,
    I need your help on this problem.
    I have created a BADI for the transaction code miro. I have got the Exit name on which the enhancement has to be done. I want to perform a check on a text field (Scrren field name INVFO-SGTXT).
    When my break point occurs i enter INVFO-SGTXT in the field to check the value present in it. But it shows that no such field exists.
    My Basic doubt is how to use a value entered in a text field in a tcode while performing a User Exit or BADI on it.
    Do I have to declare it. If yes please mention how?
    Thanks in advance guys.

    Hi,
    The first question here would be... do you plan on having multiple implementations down the road because if not there really isn't any reason to create a BADI inside the exit.  If that is the case then add the field as an importing parameter in your BADI interface and then you should be able to see it inside the BADI at your break-point.
    Regards,
    Ryan Crosby

Maybe you are looking for

  • Year view

    Is there a way to view an entire year?

  • Unable to deploy ADF application on weblogic 10.3

    Hi, The steps followed for creating Fusion web application (ADF) in jdev and deployment are as follows: 1. Create a new application in jdev using the template for Fusion web application (ADF) app. 2. Created couple of .jspx's (JSF's) and navigational

  • Can't read or write to disk...

    I know that there are a lot of similar posts out here, but they all seem to die out without a straight answer. But anyways, my problem is that about halfway through a sync, an error message pops up and says "Device _ cannot sync: disk cannot be read

  • Weblogic Server error - OutOfMemoryError: PermGen space

    Dear All, For Oracle BPM 11g (Implement the Process Model) implementation on windows I am using windows 7 64 Bit OS. I have  Installed 10g DB Run the RCU Utility for SOAINFRA, ORABAM, SSPDM and MDS schemas successfully. Installed Weblogic Server 11gr

  • Connecting to multiple mysql databases......

    hi everyone, I had some question, if I'm connected to more than one mySQL database, and I want to create such a table at specified database, what syntax should I write at the executeUpdate() statment ? thanx --------