Skip to Content
author's profile photo Former Member
Former Member

Handling contains logic


In my report I have 2 fields one is picker for the curriculum name,

another is the text box for the Curriculum name(contains). i.e. the text box should have the

functionality to search for the name entered by the user.

e.g. if Curriculum name is 'Testing Curriculum' and user entered the 'Tes' in the text

box then report should display the all the curriculum whose name start with 'Tes'.

Also there is condition that if user select values from both i.e. picker and text box

then report should bring data for the curriculum which is entered in the picker and not from the text box.

Means if the Curriculum name field is used together with text box (Curriculum Name Contains logic) then latter

will ignored and picker should overpower it.

Any help is greatly appreciated on this.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 30, 2013 at 08:38 AM

    Hi Deepali,

    Does the Text box in reference here mean the Text Box in the prompt window?

    Assuming you're using CR 2008 or higher here's what you can do:

    1) Go to the Field Explorer > Right-click the parameter (picker) > Edit > Scroll down for an option called 'Optional Prompt' and set that to True

    2) Do the same for the other parameter (Text box) too

    2) Go to the Record Selection formula and use this code:

    if (HasValue({?Prompt1}) and hasvalue({?Prompt2})) then

    {Curriculum_Name} = {?Prompt1}

    else if (not(hasvalue({?Promp1})) and hasvalue({?Promp2})) then

    {Curriculum_Name} like {?Prompt2}&"*"



    Replace {?Prompt1} with the name of the Picker Prompt and the other one with the Text box prompt.


    Add a comment
    10|10000 characters needed characters exceeded

    • Optional Prompt will let you run the report without choosing a value for the parameter. I suggested to make both these prompts optional only because there may be a situation where the user would not like to select anything from the drop-down, instead just type in a wildcard in the text box or vice-versa.


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.