cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove comma for number drop down list parameter?

Former Member
0 Kudos

Hi Support,

Do anyone knows how to remove comma for number drop down list parameter? I have created a parameter for the field in number data type. When the parameter prompt, the number has comma (for eg. 7,400). May i know any formula to remove the comma?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You should be able to create it

Then drag it to the report and format it NOW right click and choose your options. Place or combine it.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey calyn,

Why don't you just change the parameter to a String type, and then

change it back to Number type when you process the parameter value ?

The Panda

Former Member
0 Kudos

hi all,

the database type for the field is number. May i know what is the formula or way to convert the dynamic parameter from number type to string type?

Former Member
0 Kudos

You can modify your regional settings in Windows, however changing it for this will change it for all numbers that are used on your system.

Former Member
0 Kudos

Hi Sean,

Act i have changed the regional setting but the setting doesn't work for crystal report dynamic parameter.

Former Member
0 Kudos

Calyn,

There one way to do it. You will need to convert the data source of your parameter to text. To do thatyou will need

to use a SQL Command. Try something like this:



SELECT
CAST(OrderID AS VARCHAR(10)) AS OrderID
FROM Orders;

Setup your dynamic parameter based on the new command

In the Select Expert convert it back to a number in the selection criteria:



{Table.OrderID = ToNumber({?ParameterName})

Hope this helps,

Jason

Former Member
0 Kudos

Hi Jason,

Thanks for your reply. I would like to ask you where to write the sql query in crystal report? is it create a formula?

Former Member
0 Kudos

Hi Calyn,

as Jason has suggested create a commond table in that convert the number into String and use that Variable from the commond table as your parameter and put this parameter in record selection as (Commond.field)={?Parameter} it will work.

Former Member
0 Kudos

Calyn,

Here are the steps to add a SQL Command:

1) Open the Database Expert (the same place where you would go to add database tables to your report)

2) Look in the left pane on the window where all of your data sources are listed and find your desired data source.

3) Expand out the data data source, by clicking the + next to it.

4) You'll see the "Add Command" option listed above the database name.

5) Double click it.

Please note: The SQL you enter into a Command has to be in the native SQL language of your database. Crystal does not modify it

before passing it back to the database. There is no "Crystal Syntax" here.

Cheers,

Jason

Former Member
0 Kudos

Hi Calyn,

Are you able to resolve this issue? I am running in to the same issue and looking for the possible answers.

I am able to run the report but with same parameters (having comma in parameter value) reports are failing while

schedule to print.

Sincerely,

Rinkesh