Decimal places: Using Textsybols as variable
Hi Freinds,
is it possible to use variable as decimal indicator anf if yes please how.
&symbol(E.2)& = two decimal
my intension:
&symbol(E.2)& = to replace 2 with variable e. g. &QAMV-STELLEN&
Thanks,
Blacky
Hi ,
Please create a subroutine pool to get the desired output. please see the documentation of text symbols below:
Text Symbols
All symbols that do not correspond to one of the three types of symbols described above are text symbols. You define the value of a text symbol yourself in the text module.
There are two ways of doing this:
In the text editor, choose Include ® Symbols ® Text.
All the text symbols contained either in the current text or in a form assigned to the text are displayed. You can assign a value of up to 80 characters to a text symbol. Enter this value in the same form as it is to appear in the output.
The effect of assigning a value is temporary, since the values assigned are not stored with the text but are lost as soon as you leave the editor. You use this kind of value assignment if you had a ready-made text containing symbols that you want to print with specific values in place of the symbols, and you want to do this only once without storing the u2018changedu2019 text.
In the text, use the control command DEFINE.
Since control commands are stored with the text module, any value you assign in this way is preserved when you save the text. You can change the value assigned to a symbol in the text at any time simply by issuing another DEFINE command.
Remember always to use the ' (inverted comma) character to delimit a value. The maximal length for these values is also 80 characters.
Regards,
Chandra kavali
Similar Messages
-
Determine Number of Decimal Place using BigDecimal
I was interested to have the following getNumberOfDecimalPlace function :
System.out.println("0 = " + Utils.getNumberOfDecimalPlace(0)); // 0
System.out.println("1.0 = " + Utils.getNumberOfDecimalPlace(1.0)); // 0
System.out.println("1.01 = " + Utils.getNumberOfDecimalPlace(1.01)); // 2
System.out.println("1.012 = " + Utils.getNumberOfDecimalPlace(1.012)); // 3
System.out.println("0.01 = " + Utils.getNumberOfDecimalPlace(0.01)); // 2
System.out.println("0.012 = " + Utils.getNumberOfDecimalPlace(0.012)); // 3
I use the following code
public static int getNumberOfDecimalPlace(double value) {
final BigDecimal bigDecimal = new BigDecimal("" + value);
final String s = bigDecimal.toPlainString();
System.out.println(s);
final int index = s.indexOf('.');
if (index < 0) {
return 0;
return s.length() - 1 - index;
}However, for case 0, 1.0, it doesn't work well. I expect, "0" as result. But they turned out to be "0.0" and "1.0". This will return "1" as result.
0.0
0 = 1
1.0
1.0 = 1
1.01
1.01 = 2
1.012
1.012 = 3
0.01
0.01 = 2
0.012
0.012 = 3
Any solution?Please [don't cross-post!|http://stackoverflow.com/questions/2296110/determine-number-of-decimal-place-using-bigdecimal], it's considered rude. If you must do it, then at least link each post so that people can find out which answers you've already got in order to avoid duplicate work on our part.
Please read [_How To Ask Questions The Smart Way_|http://www.catb.org/~esr/faqs/smart-questions.html]. -
Yielding the desired number of decimal places using the AVG function in t-sql
Hello again. Confused retired hobby coder having trouble setting up a scalar-valued function to return the desired number of decimal places from a AVG query.
Whenever I run the following script I get the number of decimals I desire:
Using the above I created a scalar-valued function as follows:
Running this function as: SELECT [dbo].[TestHCIPartial] (1,3) my return is -7.
Can you help me with the function causing it to yield the answer to 6 decimal places?
Thanks and regards, Minuend.You've not specified precision and scale in UDF return type. So you're leaving it to server to interpret it based on default settings
If you want exactly up to four decimal places tweak udf as below
ALTER FUNCTION..
RETURNS decimal(20,4)
AS
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to display 2 decimal places using DecimalFormat?
Hi, i would like to display an account balance from database using child.getAccountBal(). Before that, i want to use DecimalFormat to display 2 decimal places. I would like to know whether the codes below are correct. Can anybody guide me? Thanks.
public static double roundTo2DecimalPlaces(double value){
DecimalFormat df = new DecimalFormat("0.##");
double d = df.format(value);
System.out.println(d);
return value;
And inside the jsp page...is that how i call the values?
Account Balance: <%=roundTo2DecimalPlaces(child.getAccountBal())%>DecimalFormat's format method returns a String not a double,
os you must return a String instead of a double.
public String roundTo2DecimalPlaces(double value)
DecimalFormat df = new DecimalFormat("0.00");
String stringValue = df.format(value);
return stringValue;
<%= roundTo2DecimalPlaces(child.getAccountBal()) %> -
@ Decimal Places in Packed Type Variable
How to check if a packed type variable has decimal placed or not?
Hi,
Try to use the statement DESCRIBE. See the help to understand the usage. The syntax is:
DESCRIBE FIELD <field> DECIMALS <dec>.
This will show the number of decimals place.
Then, you can use a condition to test.
Regards
RP -
How 2 extract 2 decimal places from a float variable
Hiya,
I have a float variable say x with a value 10.56879, how do i extract 56 without rounding it up. I want to store 56 in an integer variable after extracting it from float.
Cheers
DeepakThis works when f is positive,
float f = 10.56879f;
int i = Math.round((float)Math.floor(((f - (float)Math.floor(f))*100.0f)));
System.out.println(i); -
Decimal places when exporting HFM form to Excel
Hi All,
We are on HFM 9.3.1.3.
From the web, when we export a data form to Excel, we lose the decimal places.
In our data form we use 3 decimal places, however all exports to Excel deafult to 0 decimal places. We can reproduce in Excel 2003 and 2007.
Is there a setting we can change so that an export to Excel picks up the decimal places used in the data form?
Thanks for your help.
SebHi,
Thanks for the reply. I just checked and both settings are the same:
decimal separator is a . in the server's regional settings and user preferences.
I have tried changing the regional settings to no avail.
The strange thing is that if I connect from my laptop to another 9.3.1 environment then I can export to excel with the correct decimal places.
I'd say this is definitely an environment issue.
Thanks again for your help.
Seb -
Custom decimal places in OBIEE Presentation Services
Hello All,
In the OBIEE presentaion services for a column of type number there is an option to override the default data format.
In this option in the decimal places we have a value "up to 6".
Is there any way I can change this to "up to 10" (at the backend) because the user data has 10 places of decimals.
Thanks
NeerupamaHi,
Specify the decimal places using override option and select save and you will see two options
1) wide default for Table.Column
2) wide default for this data type.
First one will apply this formatting only for this particular column whereas the second one will apply this formatting for all fields having same data type. -
So, I checked the release notes for the newest version of Premiere Pro CC (2014.2). I was happy to see the ability to switch between frames and seconds when choosing the default durations of transitions and still images.
Immediately found a bug. Decimal places don't work correctly after switching units.
Open Preferences.
Switch Video Transition Default Duration units from the default Frames to Seconds. Try to insert a decimal place using the keyboard. It doesn't work.
Hit OK to close the Preferences, with Video Transition Default Duration now set to seconds
Open preferences again and change the units back to frames. Now try to input decimal places. No matter where the text cursor is, the decimals just get added to the end of the form field.
This seems to affect all three form fields (not just Video Transition, but Audio and Still Frame as well).
Really weird bug, and I'm not sure how you guys at Adobe missed this one...
Anyone else having this bug? I'm on Windows 7.
If so, can someone please file an official bug report? I'm at work and low on time, but I felt like I needed to bring this up to make sure I'm not the only one in this boat.I've reproed this issue and logged a bug report.
A workaround is to toggle the Unit setting, click Okay to close Preferences, then reopen Preferences and adjust the Value. Sorry for the inconvenience.
I urge you to submit your own bug report (Adobe - Feature Request/Bug Report Form). The more customers who report an issue, the higher the odds that a fix will make it into the next release... -
Sql Function to return 2 decimal places
Hi,
Can you please tell me how can i convert any integers to 2 decimal places using sql.
for e.g 124 to 124.00
150.2698 to 150.27
12.3 to 12.30
Thanks,
ParvezLike this:
SQL> with t as
select 124 n from dual union all
select 150.2698 from dual union all
select 12.3 from dual
select n, to_char(n,'9999.00') n_new from t
N N_NEW
124 124.00
150.2698 150.27
12.3 12.30
3 rows selected.? -
I need to key in a number that contains at least 17 decimal places using numeric digit control and i need to use expression note as well. Can anyone help?
After laying down a numeric control right click on it and select "Format and Precision..." to change the number of decimal places. You can also right click and change the "Representation" of the numeric control. By default it will be a DBL which is a 64 bit decimal number with an approximate range of 10**(-308) to 10**308. This is about 15 decimal digits of precision. I know SGL will only give you 10**(-38)to 10**38, which is about 7 decimal digits of precision. Neither of these will cut it for what you are trying to do.
I would recommend using the Extended Precision (EXT) representation. According to the linked document La
bVIEW's implementation of the Extended Precision follows the IEEE 80-bit spec(on Windows OSes). Supposedly even the IEEE 128-bit spec(not implemented on the Windows OSes)only gets you 19 decimal places but I am not sure what the limitations of LabVIEW's implementation are. (I found a good table in the LabVIEW help title, "Numeric Data Types Table".)
I was able to successfully get 17 digits after the decimal point but that was with a leading 0 only before the decimal point. I think you may just be approaching the limit of how a number can be represented in this programming language.
Anyone else?
-scraggs99 -
How do I get 2 decimal places when using a formula for a quotient? It only gives me whole integers. Most of the results will be less than 1 so I need 2 decimal places
the quotient function returns only whole number portion of the dividing two numbers. If you want the actual decimal value use the divide operator. you enter this as:
A/B
if the numerator is in A1 and the denominator is in B1 you can enter the formula like this:
=A1/B1 -
Decimal places in formula variable
Hi all,
I have a formula variable, for an integer (num of days), ready for input, that by default has 5 decimal places in the selection screen (g.e. 5,00000). It is possible, and if so, where can I change the number of decimal places to show in that variable?
Please adviceIn my case the formula variable is properly displaying the value without any extra decimal places.
I have done the following settings.
Variable Entry - Mandatory
Ready for Input
Dimension indicator - Number
Default value - 95.
When i execute the report i can see just 95.
Don't know why it is showing extra decimal places? -
B1 Query returning truncated decimal places when the CASE statement is used
Hi All,
Perhaps this is a friday thing.
In B1 the price setting is for 5 decimal places. I have a query the run a business process looking at the data in the Special Prices Tables. When I run the Query in SQL, the output show the correct number of decimal places. However, when the Query is then saved and run in B1, the output is truncated to 2 decimal places. Any ideas as to how I can prevent this for happening?
T0: Points to teh OSPP Table
T1: Points to the OSP1 Table
The portion of the query causing the issue is as follows:
case
when (T1.price is not null) then
T1.price
else
T0.price
endHi Earl
Seems you are right, I have tested with a few different formats and each time get a 2 decimal result. In SQL help I found the following which may explain why:
Result Types
Returns the highest precedence type from the set of types in result_expressions and the optional else_result_expression. For more information, see Data Type Precedence (Transact-SQL).
Even tried it in SQL with a stored procedure storing to a temp table and it shows the full decimals, but executing the SP in SAP Business One results in 2 decimals again.
This is indeed a strange occurrence and I a not sure how you are going to solve it! You can use NVARCHAR for example except that it right aligns the values returned, but at least it doesn't drop the decimals.
Kind regards
Peter Juby -
Decimal places for formula variable
Hello,
I have created a formula variable of type manual entry and type number. I'm multiplying it to an amount. The problem is that the user is unable to enter a decimal place value.
eg:
cannot enter 0.5 or 0.05. the query regards it as 5 (converts 0.5 or 0.05 to 5)
when i enter 5.1, it converts it to 51
when i enter 51.11, it converts it to 5.111
when i enter 51.111, it keeps it the same and does not change it.
Is there a setting that i need to change in the query or the fomula variable? I need the variable to accept decimal values with out changing the decimal places.
Regards,
SameerThis was an issue with the number format setting for the user.
His setting was 1.000.000,00 and he was trying to enter it in this format: 1,000,000.00
Hence I noticed the fictional change in decinal places.
Should have caught it sooner.
Regards,
Sameer
Maybe you are looking for
-
How can I share my photos with family with text to ID the photo
I have our families' photos on CD/DVD/my Mac's but I would like to share them with the rest of the families by way of CD/DVD. I'm also probably the only one in my family who could id the subjects in the photo's......how can I use text ON the photo
-
MacBook Air from prior MacBook Pro leads to poor performance?
Last week my laptop (MacBook Pro) was stolen. I decided to buy a MacBook Air and reinstall my applications and some of my data from the MBP to a new MBA. I love the size/weight of the MacBook Air and the battery life but I've been having a number of
-
Hey there, I have PopUpCalendar installed but none of my date fields has the popup calendar for selecting dates. I created a new metadata of type date but it's still only a text field. Is there anything special I have to do to see the calendar popup
-
Dear all, I have to create a cube where I count my active customers per timeframe. The simplest design would be to put a line for each active customer linked to a time dimension into the cube. Something like customer_no(dimension_key for customer dim
-
Saving forms with interactive fields.
I am using Adobe Reader XI. I am filling out a form with interactive fields and the purple bar at the top which states "data typed into this form can be saved". However, when I save the form and then reopen it, the form is blank. Is there anything