Bonsoir,
J'utilise oracle forms version 6i,
Je veux savoir comment afficher un calendrier en cliquant sur un bouton LOV, afin de remplir un champ de type DATE sachant que j'ai attaché une bibliothèque CALENDAR dans Bibliothèques attachées de forms.
Bonsoir,
J'utilise oracle forms version 6i,
Je veux savoir comment afficher un calendrier en cliquant sur un bouton LOV, afin de remplir un champ de type DATE sachant que j'ai attaché une bibliothèque CALENDAR dans Bibliothèques attachées de forms.
Bonjour,
je présumme que votre librairie calendar.pll a un package date_lov et une procédure display_cal dans ce package ?
Si oui, vous devez aussi avoir une librairie d'objet, soit stndrd20.olb ou stndard.olb (je ne suis plus trop sûr du nom de la librairie olb).
Dans ce cas, vous devriez être en mesure d'attacher le groupe d'objets CALENDAR dans votre écran. Il est préférable de "subclasser" le groupe d'objet plutôt que de le copier dans votre écran. Suite à cela, vous devriez remarquer plusieurs nouveaux objets, comme une fenêtre DATE_LOV_WINDOW, de nouveaux blocs, etc.
Ensuite, vous créer un WHEN-BUTTON-PRESSED sur votre bouton LOV et vous appelez:
date_lov.display_cal(<item_date>);
Vérifier si cette librairie contient un objet "CALENDAR". Il s'agit, en réalité, d'un groupe d'objets.
Si oui, vous devriez être en mesure de l'utiliser.
c'est fait avec succès
J'ai suivi ces étapes :
You will need to files
1) stndrd.olb
2) calendar.pll
******************
1) From within forms open the file stndrd.old via file, open. This will add the item "standards" to the object navigator/object libraries section. This will now always appear in the object navigator.
2) Next open theform that you wish the calendar to be on.
3) Expand the "library tabs" section of the "standards" item in "object libraries" to reveal 5 items, inc. "components". Right click on "components" & select "object libraries" from the menu that appears.
4) From the box that appears select the component "calendar" and drag it to the form you wish it to be added to within the "object navigator". It will then ask whether you want to "sub-class" or "copy". Select copy, or the form with the calendar will not work on PC's that does not have the standards item added. Copying will add all required bits you need for the calendar.
5) Next open the "calendar.pll" file & this will add a "calendar" item to the "pl/sql libraries" section on the "object navigator". Select the "program unit" section and drag it up to the "programs unit" sectino of your form. This will add 2 items to the "programs unit" section (date_lov - package spec & date lov -package body).
6) Next on my form i added a button to call the calender with a "when_button_pressed" trigger & added this code.
********************************
DATE_LOV.GET_DATE
(NVL(:BLOCK.ITEM, SYSDATE),
'BLOCK.ITEM',
200, 100,
'SELECT DATE',
'OK','CANCEL',
TRUE, FALSE, FALSE);
********************************
The block.item is where you want the date to be inserted into via the calendar user interaction.
Merci pour votre aide.
Partager