Getting format mask property in PJC
I am developing a PJC that extends oracle.forms.ui.VTextField.
I would like to read out the "format mask" property set in Oracle forms.
How to get it? Maybe this.getProperty(ID.??) or is there a memeber function that I can use?
Thanks in advance.
Mario
You don't need to change the NLS_LANGUAGE; the separators are determined by NLS_NUMERIC_CHARACTERS:
CHE_TEST@tcp_asterix_impl> alter session set nls_numeric_characters='.,';
Session altered.
CHE_TEST@tcp_asterix_impl> select 1/2 from dual;
1/2
.5
CHE_TEST@tcp_asterix_impl> alter session set nls_numeric_characters=',.';
Session altered.
CHE_TEST@tcp_asterix_impl> select 1/2 from dual;
1/2
,5So what you would want is to set NLS_NUMERIC_CHARACTERS to ',.'
cheers
Similar Messages
-
I have a field cat_no. varchar2 (9) now I want the values should be save in this field such as 11-23-765, 23-45-876 etc. I use Format mask property of this field as
FM99"-"99"-"999, but It can not save with dash (-) such as 11-23-344, it save as 1123344, but I want it should be save in the database as 11-23-344.
So kindly send me the solution of this problem.
Best regards,
ShahzadI use Format mask property of this field as FM99"-"99"-"999, but It can not save > with dash (-) FM99-99-999 is not a valid Format Mask because of that you cann't save it.
I'm not sure that you can use Format Mask Property for that purpose.
Write a function which returns formated sting instead of using Format Mask Property.
Cheers! -
Date format Mask for CHAR datatype
hi
i want to assign a format mask like 'dd/mm/yyyy' to a field which has char datatype can i ?The quickest answer to your question is to try it! :-) If you click on the Format Mask property of your Text Item and then press F1 Forms will display the Format Mask Help information for this property. All of the valid combinations for a Text Field Format Mask will be displayed.
To answer your question, you can put a format mask on a Text Item that can enforce the basic format of 'DD/MM/YYYY', but you could get data like: 99/99/9999. You would have to write code in a When-Validate-Item trigger that would ensure the user has entered a valid date.
Hope this helps.
Craig... -
Justification property is not working when using a format mask
Hi all,
I have a text item with number data type and right to left reading order,
I put the justification property to right.
I used a format mask to set two decimal places for the entered number.
The problem is the justification property is not aligning right, I noticed that it's aligning right only if i removed the format mask or changed the reading order to (left to right).
I hope there is a solution for this
ThanksFormat mask and justification will not work for Non english character sets.
To support bidirectional languages such as Arabic, do not use Left or
Right justification (numeric text items can use Right justification). Use
Start and End instead.
Rajesh ALex -
Numeric Format Masks on Text Items
Hello all.
I've been struggling to find the best way to use format masks for numbers on text items.
So far, I've found that the property "Format Mask" on the SOURCE group does not work. Am I correct?
I am trying to use To_Char to format the number, but I always get "NUmeric or Value Error".
In short, what is the easiest and most widely used way to format numbers (my language is pt-br). Ex.: 12500.00 becomes 12.500,00.
ThanksPeter's solution shows you the syntax for to_char to get what you want; just replace the hard-coded number in his example with the value (or the expression giving the value) you're trying to format. So, something along the lines of:
select to_char(t.value, 'FM999G999D00', 'NLS_NUMERIC_CHARACTERS='',.''') val,
to_char(t.factor, 'FM999G999D00', 'NLS_NUMERIC_CHARACTERS='',.''') fct,
to_char(t.value * t.factor / 100, 'FM999G999D00', 'NLS_NUMERIC_CHARACTERS='',.''') rslt
from table t
where...Or, in a slightly more readable manner (I don't like having to constantly escape quote marks):
select to_char(t.value, 'FM999G999D00', q'{NLS_NUMERIC_CHARACTERS=',.'}') val,
to_char(t.factor, 'FM999G999D00', q'{NLS_NUMERIC_CHARACTERS=',.'}') fct,
to_char(t.value * t.factor / 100, 'FM999G999D00', q'{NLS_NUMERIC_CHARACTERS=',.'}') rslt
from table t
where...-David -
Changing the format mask of a numberic field in a report
Hi,
I'm fethcing some numeric values from the DB and displaying them in the report. I'd like to use comma as the decimal separator but I can't get it to work. I'm very lost with all the NLS settings. I've tried using the format mask ad '9999990D00' but it still displays as dot as the decimal separator. What do I have to do in order to use comma as the decimal separator?
ThanksTry putting
SRW.DO_SQL('alter session set NLS_NUMERIC_CHARACTERS='', ''');
in the Before Report Trigger.
The setting might be reused for the next report if Reports is set to reuse the database connection.
To avoid this, I guess you change it back to default in the After Report Trigger.
Hope this helps!
Morten -
Using a datepicker with format mask MM/YYYY gives error on submit
I'm trying to use a datepicker with the format MM/YYYY.
The item is linked to a database column of type DATE.
The items displays correctly (month and year), but when submitting the page, I get an "ORA-01843: not a valid month" error from the built-in DML process.
Shouldn't Apex apply the same date format mask to the item value when trying to save it to the database?
- Morten
http://ora-00001.blogspot.comHi Mike,
I can/need to do that for my own PL/SQL processes, but the problem is with the Built-In DML Process....
- Morten
http://ora-00001.blogspot.com -
Hi,
I am facing problem in validation data in FDQM.
When I am trying to validate data,I am getting an error as ' An Error occured.Please verify that SQL Date Format Mask is correct'
The current Date Format in our application is YYYYMMDD.
I did not have this problem earlier in validating data.This problem is occuring now only and also this error is coming for few entities only.
Could any one suggest me on how this can be resolved.
ThanksHi Kelly,
I checked periods in control tables and there are no duplicates.
The Period Date Format Mask is MMM-YYYY where as the SQL Date Format Mask is YYYYMMDD.
These settings are there since the time I created application.Has it got anything to do with database.
Appreciate your quick response
Regards,
Mrudula -
Presentation Variable Optional Format Mask
Hi,
On page 45 of the Answers documentation at
http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31767.pdf
It says that you can specify an optional format mask for a presentation variable:
##Start Of Extract##
@{variables.<variableName>}{<value>}\[format] - for presentation variables
For example, @{variables.myFavoriteRegion}{Central} - inserts the value of the
presentation variable myFavoriteRegion.
❏ variables - prefix that is required when you reference a presentation variable in a request.
❏ variableName - a reference to an object available in the current evaluation context. For example: @{variables.myFavoriteRegion}.
❏ value - (optional) - a constant or variable reference indicating a value to be used if the variable referenced by the variableName isn't populated (is undefined).
❏ format - (optional) - a format mask dependent on the data type of the variable. For example: #,##0, MM/DD/YY hh:mm:ss, and so on.
##End Of Extract##
Has anyone got this optional format mask to work? I've tried things like:
@{pv_my_date}{01/01/2009}\[YYYY-MM-DD]
hoping that it would render the 01/01/2009 into 2009-01-01 format but to no avail. Annoyingly there are no examples of a format mask being used, and I can't see any examples in Paint or Sales either, so maybe the documentation is wrong.
But wouldn't it be great if it did work - render dates into exactly the format you want, regardless of what locale the user is using!Try to look into that prompt column to see why you are getting different date format.
If it is not correct as per you application then I would suggest to correct it using column->Data Format and then Save.
I would suggest to convert the filter to SQL format to handle it, you may get it after Filter... button add date and then use Advanced button. using SQL you have options to do it.
Thanks
Edited by: Srini VEERAVALLI on Apr 12, 2013 7:47 AM
What is Print Date?!! Is that available column in Subject Area? If you dont know why its like that investigate.
Edited by: Srini VEERAVALLI on Apr 12, 2013 8:10 AM -
4.2 blob download format mask not working
I am using Apex 4.2
I have been working through the book Beginning Oracle Application Express 4. In chapter 6 the a blob is added to a report.
I have pasted the code example into the report definition (albeit with my own page numbers) :
SELECT
"TICKET_DETAILS"."TICKET_DETAILS_ID" "TICKET_DETAILS_ID",
"TICKET_DETAILS"."TICKET_ID" "TICKET_ID",
"TICKET_DETAILS"."DETAILS" "DETAILS",
"TICKET_DETAILS"."CREATED_ON" "CREATED_ON",
"TICKET_DETAILS"."CREATED_BY" "CREATED_BY",
dbms_lob.getlength("ATTACHMENT") ATTACHMENT
FROM
"TICKET_DETAILS"
WHERE (("TICKET_DETAILS"."TICKET_ID" = :P5_TICKET_ID))
I go to the report attributes and click on the attachment column. I enter the suggested format mask
DOWNLOAD:TICKET_DETAILS:ATTACHMENT:TICKET_DETAILS_ID::MIME_TYPE:FILE_NAME:::inline:Download.
When I press apply I keep getting :
1 error has occurred
"" not found. (Go to error)
I have confirmed that the query runs and that P5_TICKET_ID does exist on page 5.
Not understanding what this meant I tracked down this page
17.10 About BLOB Support in Forms and Reports
and the section "Providing a Download Link" seems to confirm that the above format mask is correct.
Any pointers would be greatly appreciated.I've also done the exercises in the book and it worked for me.
Your format mask is correct. But before pressing submit you also have to enter the blob column attributes:
*Format Mask (Value Required): DOWNLOAD
*Blob Table (Value Required): TICKET_DETAILS
*Blob Column (Value Required): ATTACHMENT
*Primary Key Column 1 (Value Required): TICKET_DETAILS_ID
Primary Key Column 2:
Mimetype Column: MIME_TYPE
Filename Column: FILE_NAME
Last Updated Column
Character Set Column:
Content Disposition: ATTACHMENT
Download Text: Download
Maybe you forgot that? -
Problem with format mask and currency
Hi,
I am trying to apply a format mask to a report column.
I want my format to be: 4500 ==> $4,500.00
I have tried to apply: FML999G999G999G999G990D00, and i get #4,500.00
Do i have to set a currency parameter somewhere for this format mask to work?
I have done a select * from nls_database_parameters:
NLS_LANGUAGE AMERICAN
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET US7ASCII
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
Thanks in advance,
ImmanuelImmanuel,
Here's what I believe is going on:
1) Your database character set is US7ASCII. US7ASCII cannot store a '£' character.
2) Although the real NLS_CURRENCY symbol for NLS_TERRITORY UNITED KINGDOM is '£', it's displaying a converted character of '#', due to the above reason.
3) The currency symbol from the format mask is determined by your NLS_TERRITORY (and hence, your NLS_CURRENCY) settings for the session.
4) Your application is most likely setup to run with an application primary language of English United Kingdom. Thus, your application will always set NLS_TERRITORY to UNITED KINGDOM.
To get your desired result, either:
1) Change your application primary language to en-us
or simpler yet
2) Hard-code the $ sign in your format mask.
Joel -
An alignment problem of format mask in PDF output
Hi,
I'm testing iAS10g on WIN2000.
Both the Reports Developer and Reports Server versions are 9.0.4.2.
The database character set is UTF8,
and I'm using Adobe asian font pack in the [PDF] section of the uifont.ali config file to print Chinese characters.
The PDF reports run well except one problem:
The right align field attribute seems fail due to the format mask.
The right aligned number field with format mask NNN,NNN,NN0
overlaps with its right field when its value is greater
than 999 (when the comma appears).
Please help.
Thanks.Excel takes it's format from the regional settings of the PC. It is a *** to get around this mandatory Excel feature. You can add a single quote in front of the value, i.e. '99-99-9999. Excel treats this as a text value.
-
Getting the required property of an item in a bean
Hello all,
is it possible to get the required property of e.g. a VTextField inside a PJC?
I am trying to write a bean that iterates through all the components of a form a puts a red border on all fields marked as required in Forms. I cannot find an appropriate getter or ID to use with the getProperty(ID) method.
Any help is appreciated
AchimThere is already a functionality which makrs all required fields:
Open the file $ORACLE_HOME\forms\java\oracle\forms\registryregistry.dat with a texteditor
At the end of the file you'll find two entries
app.ui.requiredFieldVA=false
# The background color is specified as an RGB triple.
app.ui.requiredFieldVABGColor=255,0,0Set the first one to true and the second one to a color of your choice, restart OC4J and check the results, maybe it fits your requirement. -
Hi guys.
I have a report in which I want to give format to a number, but I'm getting an issue with the 0 (zero).
The format mask I'm using is "999,999,999.99", but when I got a 0 it is printed like ".00" and I want to print it like "0.00", in any other case I want to print the number like "123,456,789.00"
Hope somebody can help me.
regardsuse "999,999,990.00"
-
Page Item / Source / Format Mask - Table Column Numeric
Form page to maintain a table row, the item is for a numeric column. Selected/Entered the format mask "999G999G999G999G990D00" for the Page Item / Source. I was under the impression that this would result in the page item being formatted with the mask when navigating out of the item. I can enter non-numeric values and navigate out with no error being raised/reported ... is this expected behaviour?
ThanksAPEX was touted at being a MS Access application killer and a RAD tool. If the user is presented with having to understand the complexities of session state variables, page item variables, etc. then a lot of developers/users will be switched off. APEX was supposed to appeal to the masses as the pipes and plumbing coding behind having a web application front end on an Oracle database backend was being hidden. The converse seems to apply when implementing functionality like a format mask being applied both on entry and display of several page items. So I may be able to implement the required format validation using Javascript but if I have to apply this functionality to more than one page item in now way does APEX lend itself to RAD, e.g. In Oracle Forms you could select multiple Block/Items and then change a property to apply to all the selected items.
Maybe you are looking for
-
Help / suggestions with multiple apple id's
I would like to give a scenario and hopefully get some advice / help / suggestions on how best to approach this: We are an Academy in the UK with over 700 students on roll ranging from 14 to 18 years old. Each student has an iPad mini. Not all stud
-
Requirement: Creation of new report similar to VA05u2026
The Sales team need to use transaction VA05 to show all open orders, for all order types. It currently takes 9 minutes to run an open order report, 11 to include exporting the file from SAP. There are currently nearly 30,000 Finished Goods open orde
-
Apple TV update 5.1 broke chapter forward and back buttons.
Ever since updating to Apple TV software 5.1 (iOS 6), the chapter forward and backwards buttons just make the video stop playing and go to the movie/episode selection screen. Is anyone else having this problem?
-
Variable is undefined exactly after it has been assigned.
Hi There, I've written a class in AS2 that extends the Object class. It's an abstract class for debugging purposes. The class is defined in an external .as file. The problem is that in an .fla file, after I assigned a variable to a new instance of
-
Dear All, I am getting differences in FSV and COPA - KE30. Even the top-line does not match. I have no unassigned accounts. Can you anyone please let me know.