parenthesis for negative numbers in report - Reports

Hi
I want to know how to enclose a number field with parenthesis when the field returns a negative number.
Is there a format mask which can do that..
Can anyone provide a quick reply..
Thanks 

Hi,
You can use '()' in the format mask like (N,NNN) and it will automatically put in the ('s if you have a negative number. If you wanted to use something like (N,NNN.00) which might not be there by default, then you can add it under Tools->Preferences. There is an Edit Masks button at the bottom which will take you to a dialog where you can add it in.
Hope that helps, Toby

Related

Currency Format in report

I am currently working on a german report. I need to display the currency values in german format. For example if we have "2,345,223.55" it needs to be displayed as "2.345.223,55". the source of these values are formula and summary columns. I have tried using the masking option. I didn't find any option that would solve my problem. Can someone tell me how to do this....
Thanks.. 
select replace(replace(replace(to_char('2345223.55','999,999,999.99'),'.','x'),',','.'),'x',',') from dual
Thanks
Even easier then that, just create you own format mask. All you have to do is click in the format mask and type in the format mask you want. I know it sounds a little strang since it is an LOV. But the nice thing is once you create the format mask, it will be there for the next field. So you will only have to type it once, and then you can select it from the LOV.
I hope that helps,
Tom 
I agree with the format mask idea. SQL is fine, but just let reports format it for you. Its not going to take much overhead in my opinion.
Here's the complete guide to number formats. Just use this and your dreams will come true.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements4a.htm#34572 
As an afterthought, check your NLS_NUMERIC_CHARACTER setting. If its set to German, using the G as the format mask (group setting), it should default to a period instead of a comma (for the US).
Try those 2 things out.

Problem with number 0,01

Hello,
in my table is a field (number(8,2)). When I enter a value like "0,01" or "0,50" only the ",01" or ",50" is saved. But I need the whole value, including the 0. What can I do to display the value correct in a form and in a report?
Thank you,
Aline 
Aline,
That is your display format you need to look at. I'm a bit scratchy with it but it may be 09999D00
Change it in the colum formatting section of your report attributes 
Hello Chris,
thanks for your answer.
When I change the display format in 09999D00 values like 0,01 are displayed 00000,01 and that is not exactly what I want. But for know it has to work this way, so thank you very much for your help.
Aline 
I found a solution! :)
I only had to enter 0D00 in the display format.
Thanks,
Aline 
Hi, i dont think that the right format can be that one using "0" the correct format, or at least what im used to write is 999G999D99
being the "G" the separator for the thousands and and the "D" the decimals separator.
Hope it helps. 
I have a problem with decimals:
I use that format and in the database my number field is defined as number(5,2). When i enter a vat rate (whích is for example 19.6% ), I either get 196 stored in the database or the entries in my form do not correspond anymore.
The vat rates are displayed as a radiogroup, and i get the results from above depending on the return value.
The first thing happens when i set return value = 19.6
The second one when i set return value = 19,6
So does anyone have any idea of what to do?

Format number as text in Excel output

Ok, here is my problem. I'm creating my template in Word. I have a field (inside a table cell) that is a char datatype, but the data is numbers. For example, 0101. The report that I am creating I want to output to Excel, but when I do, that field has the leading zero truncated and displays as 101 instead of 0101. Excel is viewing that as a number instead of text.
Any ideas on how to get around this? I've tried everything I can think of. Thanks 
Try concatenating =" at the start of the field and " at the end. This will keep all digits and keep the field as a character.
Thanks, Rob 
Or even putting a <<space>> after the formfield holding the string value in your template.
Regards, Tim 
Hi Tim and Rob.
I have such situations. May be I write something wrong.
I have such field <?TASK_CODE?>, could you write me how I must to write and where.
in the Form Field Help Text --> Status Bar --> Type your own
or Form Field Help Text --> Default Text
Best Regards
Ilya 
Next to the form field on the template just put a <<space>> character immediately after the field. When this is rendered in Excel it will be treated as a string.
Regards, Tim 
Form Field Help Text --> Default Text -- <?TASK_CODE?><<space>>
Form Field Help Text --> Status Bar --> Type your own I write <?TASK_CODE?>
May be I write something wrong.
Please, write in the my example how I must to write. 
The default text is only what appears in the template, what you put there makes no difference. So you would have:
Form Field Help Text --> Default Text
TASK_CODE
Form Field Help Text --> Status Bar --> Type your own
<?concat('_',TASK_CODE)?>
When I put an underscore or some character, it works fine. If I put an empty space, then it doesn't (i.e. ' '). You can try experimenting to see if you can get something similiar working.
Hope that helps,
Brett 
Thank you Brett for your help. You are right.
Your expression <?concat('_',TASK_CODE)?> working OK, an empty space, then it doesn't.
But after that I have problem I must edit this data and than load by means of "Data Loader" back to OEBS.
But my data in the column "TASK_CODE" are mistaken.
I must write macros in Excel, but I should like without it.
Best Regards
Ilya 
Try using an Enter. The code should look something like this:
<?concat('
',TASK_CODE)?>

Strange number of blank chars in textfield

All i have a form on a table which enters information into a table, Once the information has been entered the page redirects to the report page where you can see the information. If a user clicks on the edit button he/she is redirected back to the form and can see the information and amend it.
One of the fields is a textfield which takes number, and when the user enters it with no spaces it goes into the database, and when he clicks on edit, and the form comes backup the same field comes up with spaces before the numbers, whats this all about ? 
Hi,
Do you have a format mask for that number? Remove it everywhere and try again.
I hope this could help.
Konstantin 
Yeah the format mask was causing the problem. so why is this happening. Can i not format this field ? 
Hi Ben,
Format Mask sets automatically -/+, dollar, and other signs at the front of the number.
It‘s depend of the mask. I suppose that in your case it is a -/+ sign.
It is not an easy task to control a text inside of the element. You should calculate a size, font, width, and format mask of the number to set it properly.
I use to have a JavaScript which does the task to some level. Unfortunately, I couldn’t find the script.
If you have time to find anything else to do the job I‘ll be happy to have it.
Konstantin 
I find it odd that the htmldb only supports $ as when you try the euro symbol you get a ? 
Ben,
To remove the blank space at the beginning of the number, try adding "FM" to the beginning of the format mask.
To have your local currency symbol used instead of the $ sign, try replacing the "$" in the format mask with a "L".
So, if your current format mask looks like $999,999,990.00
Try replacing it with FML999,999,990.00
Number Format elements are described here:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34570
FM is described here:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#SQLRF00216
Doug

OAMessageTexInput with NUMBER Datatype - Thousands separator not showing

Hi everyone,
Has any of you had a problem where a Text Input with NUMBER datatype does not display the thousands separator? As far as i know, the MessageTextInput should comply with the user preferences for Number Format (ours is 10,000.00). However, if we type in 10000 in a textField and submit, it shows 10000.00, whereas when we type 10,000.00, it shows the same. Seems that it is formatting the decimals but ignoring completely the grouping chars.
Is there any profile option to force OAF to show the complete formatted number, instead of only the decimal separator? Or do i need any controller code to make this happen? if this is the case, please advise on how to keep the number format in sync with the user preferences.
Thanks a lot and Regards,
Thiago Souza 
Use bean.setCurrencyCode("USD"); in the processRequest(){}
--Prasanna                                                                                                                                                                                        
Hi Prasanna,
I have used setCurrencyCode("USD") in my code and the result was the same. Nonetheless, i cannot assume that the value i am trying to display is in US Dollars, and i have no way of knowing the currency code of the record in my current application. Is it the only way?
Thanks and regards
Thiago

Categories

Resources