Click here to Skip to main content
15,889,879 members
Please Sign up or sign in to vote.
4.67/5 (2 votes)
I have a numeric access database field. I want to display it without the thousand separator on the crystal report. I changed the property ThousandsSeparators to False and ThousandSymbol to blank but it does not prevent it from displaying..

Can anyone help???
Posted

Instead of using blank in thousand separator, try removing it completely. Also re-check that the field is actually numeric, not a string (for example if it's a result of a formula etc).
 
Share this answer
 
Comments
ashu2188 10-Apr-11 5:30am    
well I have removed the separator already and the field is numeric that is the reason its putting the separator
Wendelius 10-Apr-11 6:02am    
Sorry about the misunderstanding, I understood that you still had a whitespace in the separator.

If you like you can convert the numeric field to string using CStr, and place that formula in your report instead. That shouldn't have separators anymore.
ashu2188 10-Apr-11 6:24am    
as i posted earlier that the problem of separator has been solved but i am still getting the decimal in the field which i don't want..
Wendelius 10-Apr-11 7:17am    
Ok, you can use the three part version of CStr: CStr(YourField, 0, ''), meaning no decimals and no thousand separators. Hopefully that solves the problem.
ashu2188 10-Apr-11 8:10am    
thanx a lot...it worked...!! :)

final formula was : Replace (cstr({Field Name},0,''),',' ,'')
This discussion [^]may help.
 
Share this answer
 
Comments
ashu2188 10-Apr-11 5:32am    
well...my field is directly coming from database .. not using any formula.. i don't know if i can put up any here... i don't have that much knowledge about it.

Guide me if i can put up formula for field and remove the separator.
well... a progress in this issue is that thousand separator has been removed but still decimal places comes up

I removed the thousand separator by :

replace (cstr({FieldName}),',','')

But now my problem is that the decimal places still comes up... I have set the Decimalplaces property to 0 and the removed the decimal symbol but still it comes up..

please help
 
Share this answer
 
try replace(cstr(totext({FieldName},0)),',','')
 
Share this answer
 
Hi,

May be this could solve your problem.

1. Select the feild in the crystal report.
2. Right click on the feild and select format object.
3. Select the Number tab.
4. In the style box select the required style.

Thanks
 
Share this answer
 
Just Right Click on the field, Format Object -> Number -> Customize -> Check On Thousand Separator -> Click on Formula button Of Symbol (Right side of symbol text box) and add '""' two quotation mark click on save.
 
Share this answer
 
hai try to this coding for crystal report

first declare the variable
Dim mGrossWeight as String



SQL
if {sp_Rpt_Doc_PackingList.GrossWeight} >0 then
    if {sp_Rpt_Doc_PackingList.GrossWeight} = truncate({sp_Rpt_Doc_PackingList.GrossWeight},0) then
            mGrossWeight     =   ToText({sp_Rpt_Doc_PackingList.GrossWeight},0,"")
    else
            mGrossWeight    = ToText ({sp_Rpt_Doc_PackingList.GrossWeight},2)
    end if

    mGrossWeight = mGrossWeight
else
    mGrossWeight = ToText({sp_Rpt_Doc_PackingList.GrossWeight},0,"")
end if

formula = mGrossWeight
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900