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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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.


    Add comment
    10|10000 characters needed characters exceeded