SAP Crystal Report - How to override default formating for number and currency field in formula - crystal-reports

I am using tonumber function but its adding default formatting and i don't want that mainly thousand separator.
Also, for currency, I don't want currency symbol.
As I am using these fields in formula field, I cannot set properties, right?

To remove the thousand separator, I generally do something like
Replace(ToText(YourField),',','')
To remove currency symbols do the same
Replace(ToText(YourField),'£','')

Related

Formatting decimal point in crystal reports in required format

I have a number field in report which is having below type of values.
19707.51
9834.01
Now I need to format the above field to get the decimal place before 4 digits.
I tried giving this
mid(totext({Command_2.INVOICE_AMT},4),1,1)+'.'+
mid(totext({Command_2.INVOICE_AMT},4),2,length(totext({Command_2.INVOICE_AMT},4))-1)
Required output is
1.970.751,00
983.401,00
Create a formula which multiplies your values by 100.
Use the Format Editor for the formula. Choose an existing format or define your own if you need to.

how to set number separated by comma in crystal report

How to set number in crystal report separated by commas.
There is a provision for thousand separator. But actually i need the number in the form like the below example.
Eg : 12,34,556.00
not like 1,23,456.00
What you probably want is Indian currency format i.e Lakhs and not Millions.
This is based on your culture information.
You can use a formula to format each field. Right-click on one of your numeric fields, select "Format Field" and select the Common tab. Click on the formula (X+2) button to the right of "Display String" near the bottom and enter a formula like:
CStr (CurrentFieldValue, "#,##,##,##,##,###.00")
Give this a try and see if it displays correctly.

Programmably set currency format to field in access 2010 form?

I have an access 2010 table with order line detail which includes a field with the price and a separate field for the currency type. That currency type field currently only supports "USD" or "EUR". When the record is shown on a form, I'd like to have the price field format automatically use either Currency or Euro (in design view this can be set manually via property sheet) based on the currency type field. How is that done?
Thank You.
Format will do that, either set as property of a textbox ("Currency") or by an expression:
=Format(123.45, "Currency")

Crystal Report - Placing decimal point

I'm getting an integer value as 2345 but I want to display it as 234.5
is it possible??
To get what you are looking for in a simple fix is like what kingpin stated above. Divide the value by ten. To do this just create a new formula in crystal by going into your field explorer and right clicking on the formula fields section. Under there should be a option to create a new formula. Then in window that comes up put the field you want to manipulate in the formula and then divide that by ten. And there you go. Now use the formula field in the report instead of the original field.
Here is a example of how it could look.
{Table_Foo.value_Bar} / 10
There is a field property for it. Don't have access to crystal reports at the moment, but I know it's there:
Crystal Report Provides an easy to use default thousand separator for numeric Fields. You can use it by checking Thousand Separator from Field Properties.
If you need a customized separator, check Customized Thousand Separator in Crystal Report.
You also might want to find some tutorials on the Crystal Reports themselves if you still have trouble.

How to have multiple formats in a single text field in jasper reports?

I have a text field that displays 3 parameters with different formats. It has a Date value, a BigDecimal value and a value that has to be displayed using percentage display.
Can I use a single text field for this or do I have to use one text field for each to have the correct format for each?
You have a few approaches, presuming it is one of the three parameters you want to display in the same location:
Use three different fields and a PrintWhenExpression for each parameter.
Convert the different fields to a single String variable, with appropriate formatting, and then a single field for that variable value.
The second approach is probably the most applicable for your task. For the conversions, look at:
BigDecimal.toString()
SimpleDateFormat
String.sprintf
See also:
Java: Literal percent sign in printf statement