cancel
Showing results for 
Search instead for 
Did you mean: 

How to create static parameter?

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Works like a charm!  Thank you, Abhilash.