Skip to Content

How to create static parameter?

I've created a string static parameter in one of my report for users to enter vendor account number as their selection. However, the Vendor Account# field in the Vendor Master database that I'm connected to has some leading blank spaces in front of the Acct#. So when I keyed in a valid vendor account# in my parameter prompt, CR2008 returns no record since '12345' is not the same as ' 12345'.

Does anyone know how to make this work? I don't want to tell my users to hit the SPACE BAR 4 times before entering a Vendor Account#. Is there any go-around for this? Please any help will be appreciated. Thank you.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 17, 2015 at 02:46 AM

    Hi Fione,

    Are you using a Command SQL as the data source or joining tables in the report?

    Do you have a Record Selection formula? If yes, try changing it to:

    Trim({database field}) = {?prompt}

    Although this would word, I'm not a 100% sure if CR would translate this to a where clause. If it doesn't then it could lead to performance issues.

    In which case you could try:

    {database field} = ' '&{?prompt}

    Check the SQL generated by CR and hopefully you'd see a where clause that also includes this field.

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

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.