How to calculate total in multi-row block
How can I calculate and display the total amount in a multi-row
block that records are not yet save into database?
null
Kanekan (guest) wrote:
: How can I calculate and display the total amount in a multi-
row
: block that records are not yet save into database?
Hi,
I worked with similar type of requirement. If you are
working with Forms5.0 there is a new property of formula/summary
in property palette of text item. In the same block or in
control block create non database item( It's non base table item
in forms4.5). In it's property palette give the data type as
number and set the source item name and set summary property.(
opetions are max,min,sum etc available). This value will change
when you navigate from the source item( I mean after validation).
I think this is informative.
Nag
null
Similar Messages
-
How to calculate totals in Blocked ALV Report
Hi All,
Can any body tell how to calculate totals & sub totals in
Blocked ALV Report[Blocked List].
Thanks in advance
Thanks & Regards,
Rayeezuddin.read this it might help
Sums
15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
Only by fieldcatalog.
Value set: SPACE, 'X'
'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
Value set: SPACE, 'X'
'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
Value set: SPACE, 'X'
'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
18. No_subtotals(1) TYPE c : No subtotals possible
Value set: SPACE, 'X'
'X' = no subtotals.
19. Numc_sum(1) TYPE c : Totals only possible for NUMC-Fields.
20. No_unit_splitting TYPE c: No separate total lines by inh.units
21.totals_before_items TYPE c: Display totals before the items
22. Totals_only(1) TYPE c : Show only totals
Value set: SPACE, 'X'
'X' = only total records are output.
23. Totals_text(60) TYPE c : Text for 1st col. in totals
Value set: SPACE, string (max.60)
' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
'String = The string passed is output after the total indicated by '*', if the column is wide enough.
24. Subtotals_text(60) TYPE c : Texts for subtotals
Value set: SPACE, string (max.60)
' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
'String = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
ELSE TELL ME I WILL PASTE COMPLETE HELP
regards -
HOW TO MAKE CHECK BOXES EXCLUSIVE IN MULTI ROW BLOCK
Hi,
I have a multi row block with one item as check box.It is
required that at a time only one record can be marked as
selected through this item. If user marks a record as selected
the previous selected record should be marked as deselected.
How i can make these check boxes mutually exclusive ?
can anybody help me?
Thanks in Adv
Sharath.
nullSHARATH (guest) wrote:
: Hi,
: I have a multi row block with one item as check box.It is
: required that at a time only one record can be marked as
: selected through this item. If user marks a record as selected
: the previous selected record should be marked as deselected.
: How i can make these check boxes mutually exclusive ?
: can anybody help me?
: Thanks in Adv
: Sharath.
Hi
The check box can not be mutually exclusive.
This is a basic functionality.
You convert this item type into radio button.
It will satisfy your requirements.
Jeya Raman R
null -
How to re-query changed record in multi-row block after update in a called form
Hi,
I have a form that I use to perform searches, which is a multi-record block.
The user can navigate to a record, press a button on call another form which provides
more detail, and allows update of the record.
If the user changes it, and returns to the original search form, how can I re-query the
changed record to update the fields on the search form.
Is there a way other than to re-query the
whole block - a built-in to just update on record if it's changed on the database.
If not, can I use globals to pass back the data (since only a few fields are updatable),
and change the record without effecting its forms status.
Many thanks
BernieBD,
I haven't managed to look at a solution yet, but the block is a large multi-row block,
with an ORDER BY, and since it can return a large number of records, there is a short
delay. I was hoping there was a way of just
re-querying the one record, which was displayed
in the second form for update.
I'll give the query a go, or might try and pass back some globals with the update values.
By the way, DML Return Value is an excellent feature, but only works against Oracle 8.
It basiclly adds the RETURNING clause to any DML statement (see SQL manual), so that if
a trigger changes/adds values you didn't provide, it will return them back to you
so the values in your form are correct.
I use a trigger on the DB to populate history fields (create/update,who/when) and
the PK sequence. Using this feature, those values are returned to the block and displayed.
Regards
Bernie -
How can I handle data in a multi row block?
Hi all,
I have a form which contain a multi row block.
I put data in that block. Suppose that in the second column of
that block data no changes.I want to fill only the first cell of
the column and all the cells below first cell ( header) inherits
that value.
Example :
Block1
ITEM1 ITEM2
rec1 1 1999
rec2 2
rec3 3
When I insert in the table rec2 I want :
INSERT INTO(col1,col2) VALUES)(2,1999)!!!.
Best Regards !
nullvali (guest) wrote:
: Hi all,
: I have a form which contain a multi row block.
: I put data in that block. Suppose that in the second column of
: that block data no changes.I want to fill only the first cell
of
: the column and all the cells below first cell ( header)
inherits
: that value.
: Example :
: Block1
: ITEM1 ITEM2
: rec1 1 1999
: rec2 2
: rec3 3
: When I insert in the table rec2 I want :
: INSERT INTO(col1,col2) VALUES)(2,1999)!!!.
: Best Regards !
Mr. Vali,
I suppose you want to enter ITEM2 value only in first record and
duplicate that value in subsequent records automatically. There
are couple of methods to accomplish this and the following is one
of them:
Add this code in WHEN-NEW-RECORD-INSTANCE trigger for block1.
IF :SYSTEM.RECORD_STATUS ='NEW' AND :SYSTEM.CURSOR_RECORD > 1
THEN
IF :ITEM2 IS NULL THEN
GO_ITEM('ITEM2');
DUPLICATE_ITEM;
GO_ITEM('ITEM1');
END IF;
END IF;
good luck
null -
Dynamic visual attributes/multi-row blocks
We're using Headstart, Des2k V6.0.3.8. If you set preference CURREC = multi record block, you get the current record visual attribute (cg$current_record) attached to all displayed items in multi-row blocks. From the Headstart object library, these items also inherit a visual attribute of qms$item_font.
At runtime, Headstart code is invoked from the block's post-query trigger - this code dynamically assigns a readonly visual attribute to all items that are insert only, or the qms$item_font va to items that are update only. (Incidentally, it seems a bit strange that no va is assigned to items that are neither insertable nor updateable).
Assigning the va in this way seems to override the current record va for these items, which looks a little strange at runtime. I would prefer to see the current record va overriding the readonly/item_font va. In a future Headstart release, it would be nice if this functionality was configurable, but in the meantime can you suggest the easiest way of making this change to the Headstart code? I think it will be necessary to specifically set the va to stnd/readonly/current record in the when-new-record-instance trigger, & reset it on the post-record trigger. Once va's are being set dynamically, the current record attribute is pretty useless in multi-row blocks.
Incidentally - we've also changed the behaviour of va's in query mode processing. We wanted the query mode va to override the current record va; qms$record.highlight_items wasn't setting the selected va unless items have a current record attribute of DEFAULT. We wanted query mode to look the same regardless how many rows are in the block; it also looked a little odd in a multi-row block with overflow items, where the overflow items were being highlighted but the rest of the block wasn't. It would be nice if this was also a configurable option.Cheryl,
Good point! It does look a bit odd. I'll take this into consideration for HSD6i.
To customize your app, try the following.
Copy qms$event_data_block from qmsevh50.pll to your application library.
Copy procedure set_nav_items_exg_record from the qms$record package in qmslib50.pll to your application library -AND GIVE IT A NEW NAME- like set_nav_items_custom.
Change your copy of qms$event_data_block to call this new procedure in the post-query event.
Modify set_nav_items_custom as follows.
============================================
procedure set_nav_items_custom
( p_block in varchar2
, p_recno in number default current_record
is
l_rg_id recordgroup;
l_rgc1_id groupcolumn;
l_rgc2_id groupcolumn;
rg_rows number;
l_item_flag varchar2(1);
l_item_name varchar2(100);
l_first_io_item varchar2(100);
begin
qms$block.init_block_rg
( p_block,false,l_rg_id,l_rgc1_id,
l_rgc2_id, rg_rows);
if id_null(l_rg_id)
then
-- no insert-only or update only items
-- in block
return;
end if;
for j in 1..rg_rows loop
l_item_name := get_group_char_cell
(l_rgc1_id, j );
l_item_flag := get_group_char_cell
(l_rgc2_id, j );
if l_item_flag = 'I'
then
if l_first_io_item is null
then
l_first_io_item := l_item_name;
end if;
-- Item is insert-only, update not
-- allowed
-- Change background color to
-- read-only.
set_item_instance_property
( l_item_name,p_recno,navigable
, property_false);
/* customization */
if get_item_property(l_item_name
, current_record_attribute) is null
or p_recno <> :system.cursor_record
then
/* end customization */
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$user_prefs.get_va_readonly_item);
/* customization */
end if;
/* end customization */
else
-- Item is update-only, insert not
-- allowed */
set_item_instance_property
(l_item_name,p_recno
,navigable,property_true);
/* customization */
if get_item_property(l_item_name
,current_record_attribute) is null
or p_recno <> :system.cursor_record
then
/* end customization */
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$config.get_stnd_font);
/* customization */
end if;
/* end customization */
end if;
end loop;
-- 18-1-1999: If block only contains no
-- updatebale items, there are navigable
-- items left.
-- If this is the case make first
-- insert-only item navigable again.
if get_block_property(p_block,enterable) =
'FALSE'
then
if l_first_io_item is not null
then
set_item_instance_property
(l_first_io_item,p_recno
,navigable,property_true);
end if;
end if;
exception
when form_trigger_failure then raise;
when others then
qms$errors.unhandled_exception
('qms$block.set_mav_items_custom');
end set_nav_items_custom;
============================================
Next, as you suggested, add WHEN-NEW-RECORD-INSTANCE and POST-RECORD triggers to handle movement from one record to the next.
WHEN-NEW-RECORD-INSTANCE
============================================
procedure set_nav_items_wnri
( p_block in varchar2
, p_recno in number default current_record
is
l_rg_id recordgroup;
l_rgc1_id groupcolumn;
l_rgc2_id groupcolumn;
rg_rows number;
l_item_flag varchar2(1);
l_item_name varchar2(100);
begin
qms$block.init_block_rg
( p_block,false,l_rg_id,l_rgc1_id,
l_rgc2_id, rg_rows);
if id_null(l_rg_id)
then
-- no insert-only or update only items
-- in block
return;
end if;
for j in 1..rg_rows loop
l_item_name := get_group_char_cell
(l_rgc1_id, j );
l_item_flag := get_group_char_cell
(l_rgc2_id, j );
if l_item_flag = 'I'
then
-- Item is insert-only, update not
-- allowed
-- Change background color to
-- read-only.
if get_item_property(l_item_name
, current_record_attribute) is null
or p_recno <> :system.cursor_record
then
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$user_prefs.get_va_readonly_item);
else
set_item_instance_property
(l_item_name,p_recn o
,visual_attribute
,get_item_property(l_item_name
, current_record_attribute));
end if;
else
-- Item is update-only, insert not
-- allowed */
if get_item_property(l_item_name
,current_record_attribute) is null
or p_recno <> :system.cursor_record
then
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$config.get_stnd_font);
else
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,get_item_property(l_item_name
, current_record_attribute));
end if;
end if;
end loop;
exception
when form_trigger_failure then raise;
when others then
qms$errors.unhandled_exception
('qms$block.set_mav_items_wnri');
end set_nav_items_wnri;
============================================
For the POST-RECORD trigger, you will have to modify your object library since this trigger is not included by default. Add the trigger to the object library CGSO$BLOCK_MR.
Then add the POST-RECORD event to your copy of qms$event_data_block.
Finally, add a procedure for the POST-RECORD trigger.
============================================
procedure set_nav_items_pr
(p_block in varchar2
,p_recno in number default current_record
is
l_rg_id recordgroup;
l_rgc1_id groupcolumn;
l_rgc2_id groupcolumn;
rg_rows number;
l_item_flag varchar2(1);
l_item_name varchar2(100);
l_first_io_item varchar2(100);
begin
qms$block.init_block_rg
( p_block,false,l_rg_id,l_rgc1_id,
l_rgc2_id, rg_rows);
if id_null(l_rg_id)
then
-- no insert-only or update only items
-- in block
return;
end if;
for j in 1..rg_rows loop
l_item_name := get_group_char_cell
(l_rgc1_id, j );
l_item_flag := get_group_char_cell
(l_rgc2_id, j );
if l_item_flag = 'I'
then
-- Item is insert-only, update not
-- allowed
-- Change background color to
-- read-only.
if l_item_flag = 'I'
then
-- Item is insert-only, update not
-- allowed
-- Change background color to
-- read-only.
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$user_prefs.get_va_readonly_item);
else
-- Item is update-only, insert not
-- allowed
set_item_instance_property
(l_item_name,p_recno
,visual_attribute
,qms$config.get_stnd_font);
end if;
end loop;
exception
when form_trigger_failure then raise;
when others then
qms$errors.unhandled_exception
('qms$block.set_mav_items_pr');
end set_nav_items_pr;
============================================
Regards,
Lauri -
Multi row block record_group or cursor?
I've done a lot of research on the Forms OTN forum and can't find a solution to this problem. I'll continue to research until an answer is posted to this thread. I've used the forms forums and Metalink for years and they've been a great help.
My problem -
I have a multi-row block built off a view. Each row has a check box. The canvas also has a button. When the button is pressed, each record checked will be processed. The problem is, I need to sort the data selected (checked) before it's processed. To complicate matters, the sort criteria is not in the view. My plan was to build a cursor off the block, but I'm having problems populating due to the multi-row aspect.. I also tried building a record_group but again ran into complications with it being multi-row. I'm not sure which method to use since I haven't found a clear-cut solution.
btw - using 10gR2.
TIA,
abcAB, you're sure not very clear on this.
Aweiden has the correct suggestion: Create a PL/SQL table in the form, rather than a record group.
Here are the steps I would follow:
1. User queries and displays the data, and then checks some checkboxes. Do not use a when-checkbox-changed trigger, since they can check, then un-check boxes.
2. When user presses the process button, loop through the block as Aweiden has done above. However, I would call a procedure from within the loop to look up the values from the Mel_Item table. Store the values returned from the procedure within your pl/sql table, adding one row to the table for each row in your block that was checked.
As a side note, how difficult is it to join the Mel_Item table with your view when you query the block? You could store those sort values from Mel_Item along with the data from the view.
3. Once you are done processing the data block loop, sort the pl/sql table. (Maybe I can find the code lying around here somewhere, but a table sort like that can be coded in maybe 20 lines).
I am not sure, but are you saying above ("...insert each row into another table (other information is different so its not duplicate rows entirely)...") that you are inserting the data from the user-checked rows into a database table? That is certainly easier to do than writing your own sort, I guess.
4. After the pl/sql table is sorted, loop through it one more time, processing the data in the required sequence.
Actually, pl/sql table processing is quite fast. You don't really need to sort the rows. All you need do is to step through the table checking for the first row to process (by finding the lowest value of the sort items). Process that row's data, then remove (delete) it from the table, then repeat the process until you have processed and removed every row from the array. I believe I would use this method rather than trying to sort the pl/sql table, OR inserting into a database table.
Edited by: Steve Cosner on Oct 23, 2008 10:39 PM -
Overflow-field in multi-rows block
Hi!
How can i realize overflow-field in multi-rows block.
I place overflow fields in the footer area of block
and get value use ${uix.current['Description']} - but no have results.
Use javascript to set value of overflow-field?
thanksAndreas,
I was most intrigued by your offered solution, so I created a test case. Unfortunately, this solution gives inconsistent results. Here was my test case:
1. Table: Planets
Columns: 3 (PL_ID, Name, Description
2. Added nine entries for all 8 planets and one record for Pluto (sorry, grew up with this being classified as a planet! :) )
3. Created very basic form to display all 3 columns in Tabular (Multi-Record) format and displayed 5 rows.
4. Created button in a Control Block to display Cursor_Record, Trigger_Record and Top_Record
- Set Mouse & Keyboard navigate to NO
Ran Form and navigated to each row and clicked on button. The following was my results:
>
Row 1: Cursor Rec: 1, Trig Rec: 1, Top Rec: 1
Row 2: Cursor Rec: 2, Trig Rec: 2, Top Rec: 1
Row 3: Cursor Rec: 3, Trig Rec: 3, Top Rec: 1
Row 4: Cursor Rec: 4, Trig Rec: 4, Top Rec: 1
Row 5: Cursor Rec: 5, Trig Rec: 5, Top Rec: 1
Row 6: Cursor Rec: 6, Trig Rec: 6, Top Rec: 2
Row 7: Cursor Rec: 7, Trig Rec: 7, Top Rec: 3
Row 8: Cursor Rec: 8, Trig Rec: 8, Top Rec: 4
Row 9: Cursor Rec: 9, Trig Rec: 9, Top Rec: 5
Row 10: Cursor Rec: 10, Trig Rec: 10, Top Rec: 6 - New Record - NULL values
- Navigated back to Row 6: Cursor Rec: 6, Trig Rec: 6, Top Rec: 5 (however - visually in the screen Row 6 was the 2nd row of the 5 rows displayed.
- Navigated back to Row 3: Cursor Rec: 3, Trig Rec: 3, Top Rec: 3 (however - visually in the screen Row 3 was the 1st row of the 5 rows displayed.
>
Based on these results, the option to use the GET_BLOCK_PROPERT('BLOCK_NAME',TOP_RECORD) won't work either. :-( Unforntunately, displaying the MCHAR field in a static location or using Java (though hardest) are still the best solutions.
Craig... -
Multi-row block with many image-java-beans
Hi, I want to create a multi-row block based on a table, e.g. emp with 5 records.
Then I want to add 5 java-bean images in the same block. Now I want to read from the db-table emp the blob-column with the image of the corresponding empno. Is this possible? How can I do this? Can someone give me a sample for this?
Thanx BeaHi John, by running the scipts this message occurs:
[sql] Executing file: C:\Programme\Oracle\JDev11g\samples\Infrastructure\DBSchema\Scripts\DataScripts\DISCOUNTS_BASE.sql
[sql] Executing file: C:\Programme\Oracle\JDev11g\samples\Infrastructure\DBSchema\Scripts\DataScripts\MEMBERSHIPS_BASE.sql
[sql] Executing file: C:\Programme\Oracle\JDev11g\samples\Infrastructure\DBSchema\Scripts\DataScripts\SHIPPING_OPTIONS_BASE.sql
[sql] Failed to execute: INSERT INTO SHIPPING_OPTIONS_BASE VALUES (1, 'US', '3.15', '11.98', '27.50', 'Y', '0', SYSDATE, '0', SYSDATE, 0)
BUILD FAILED
C:\Programme\Oracle\JDev11g\samples\Infrastructure\Ant\build.xml:16: The following error occurred while executing this line:
C:\Programme\Oracle\JDev11g\samples\Infrastructure\DBSchema\build.xml:146: java.sql.SQLException: ORA-01722: invalid number
What shall I do?
Bea -
Dynamically Changing Labels for Multi Row Block Buttons
Forms [32 Bit] Version 9.0.4.1.0 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
On my local: Windows 7 OS
I am having a difficult time in doing the following in forms, and not sure if it can be done?
I have a multi row block,based on DB table, which displays filename and another column from the table.
It also has a push button on each row, which opens and displays the physical file from its source, when clicked. The filename thus can have 3 diff statuses depending on its sources and accordingly corresponding button should display appropriate label:
a) View Image (its is in content server and successfully imaged. In this case I display the file in the browser, from the content server, when the button is clicked)
b) View File (Display the file from file system)
c) View Error (Display imaging error message from the table, as file failed to make it to the imaging server)
I have this logic currently coded in the post query trigger, at the block level, and tried using set_item_property(button_id, label, <button_lable>), where I programmatically set the button lable, based on the file status (imaged, not imaged or has error) in that row. This wroks well, only if all the files in the multi row block have the same status. If each of them have diff statuses, then only last processed files's status gets reflected into the button label. For eg: The file in the first row of the block is imaged, and one in the second row has an imaging error. The button label for the first row should say 'View Image' and button for the second row should say 'View Error'. But now buttons for both the rows display 'View Error', as thats what got processed last!
I __can not use set_item_instance property for 'label'__ (which lets us dynamically change the label on the push buttons).
Is there any way to do this for ORacle forms? I am now playing with having 3 diff button items in that block, laying them on top of each other and showing only those that are appropriate and hiding the others... But I am not sure it is going to give me what I need? I think I am going to end up facing the same issues as in above case!!
Any expert advice is highly appreciated.
Thanks in advance for your time:
Libran_Girl
Edited by: libran on Aug 30, 2011 8:04 AM
Edited by: libran on Aug 30, 2011 8:05 AM<p>I have just updated this existing PJC, that was originally constructed to handle Text Fields. You can, now, also handle buttons with it.
Set the Button's Implementation Class property to : oracle.forms.fd.MultiButton.
</p>
This is the code you have to put one triggers of your based block:
When-New-Record-Instance trigger: (based on the EMP table)
declare
LN$Pos pls_integer ;
LN$Rec pls_integer := Get_Block_Property('EMP', CURRENT_RECORD) ;
LN$Max pls_integer := Get_Block_Property('EMP', RECORDS_DISPLAYED) ;
LC$C Varchar2(15) ;
Begin
LN$Pos := LN$Rec - (trunc(LN$Rec/LN$Max) * LN$Max) ;
If LN$Pos = 0 Then LN$Pos := LN$Max ; End if ;
If LN$Pos > 0 Then
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LOG', 'true' );
-- Add the new item --
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_NEW_REC', to_char(LN$Rec) );
-- Set some properties --
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LABEL', to_char(LN$Rec) || ',' || :EMP.ENAME );
If :EMP.JOB = 'MANAGER' Then
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FONT', to_char(LN$Rec) || ',Arial,bold,14' );
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FGCOLOR', to_char(LN$Rec) || ',0,0,255' );
End if ;
If :GLOBAL.I > 250 Then :GLOBAL.I := 5 ;
Else :GLOBAL.I := :GLOBAL.I + 5 ;
End if ;
LC$C := To_Char(LN$Rec) || ','
|| To_Char(255) || ','
|| To_Char(255-:GLOBAL.I) || ','
|| To_Char(255-:GLOBAL.I) ;
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_BGCOLOR', LC$C );
Synchronize;
End if ;
end;When-Create-Record trigger:
declare
LN$N pls_integer ;
LN$Rec pls_integer := :system.cursor_record ;
LC$C Varchar2(15) ;
Begin
if get_block_property('EMP',TOP_RECORD) > 1 Then
LN$n := :system.cursor_record - get_block_property('EMP',TOP_RECORD) + 1 ;
else
LN$N := :system.cursor_record ;
end if;
If LN$N > 0 Then
Set_Custom_Property('EMP.BT', LN$n, 'SET_LOG', 'true' );
-- Add the new item --
Set_Custom_Property('EMP.BT', LN$n, 'SET_NEW_REC', to_char(LN$Rec) );
End if ;
end;Post-Query trigger:
declare
LN$Pos pls_integer ;
LN$Rec pls_integer := Get_Block_Property('EMP', CURRENT_RECORD) ;
LN$Max pls_integer := Get_Block_Property('EMP', RECORDS_DISPLAYED) ;
LC$C Varchar2(15) ;
Begin
LN$Pos := LN$Rec - (trunc(LN$Rec/LN$Max) * LN$Max) ;
If LN$Pos = 0 Then LN$Pos := LN$Max ; End if ;
If LN$Pos > 0 Then
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LOG', 'true' );
-- Add the new item --
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_NEW_REC', to_char(LN$Rec) );
-- Set some properties --
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_LABEL', to_char(LN$Rec) || ',' || :EMP.ENAME );
If :EMP.JOB = 'MANAGER' Then
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FONT', to_char(LN$Rec) || ',Arial,bold,14' );
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_FGCOLOR', to_char(LN$Rec) || ',0,0,255' );
End if ;
If :GLOBAL.I > 250 Then :GLOBAL.I := 5 ;
Else :GLOBAL.I := :GLOBAL.I + 5 ;
End if ;
LC$C := To_Char(LN$Rec) || ','
|| To_Char(255) || ','
|| To_Char(255-:GLOBAL.I) || ','
|| To_Char(255-:GLOBAL.I) ;
Set_Custom_Property('EMP.BT', LN$Pos, 'SET_BGCOLOR', LC$C );
Synchronize;
End if ;
end;Don't forget to copy the multirecord.jar file in your /forms/java folder, then add it to the archive and archive_jini tags of your /forms/server/formsweb.cfg file.
Enjoy it,
Francois -
How to calculate total number of pages in a script
hi
how to calculate total number of pages in a scriptJyothsna,
Date:-&sy-datum&
Time:-&sy-timlo&
Total No.of Pages:-&sapscript-formpages&
Page No:-&PAGE&/&SAPSCRIPT-FORMPAGES&
Give the above said lines in your text editor,and given the paragraph format.Better create one more window and give the above said lines in the text editor.
K.Kiran. -
Microsoft optical mice and wheel scrolling in multi-row block
Hi.
One part of our form is a multi-row block. It has a scroll bar and upto this point you can scroll using the wheel when your mouse is on the scroll bar or if the pointer is anywhere within the multi-row block, you can use the wheel to scroll. This works for logitech ball and optical mice, ibm ball mice and even microsoft ball mice. All of them have the wheel. We do find a problem with microsoft optical mice whether its the explorer or optical brand. The wheel mouse works when the pointer is on the scroll bar but it does not scroll if the pointer is within the multi-row block. I have spoken with Oracle and of course they say its microsofts problem. Has anyone come across this? I have contacted microsoft but no word as yet.
Thank you,
JaymeForms has no support for the Wheel Scrolling action - if it works at all it's because the Mouse driver is clever enough to work out when it is on a ScrollBar and send the relevant Windows Events. You may find it also works in Multi-line text items.
-
Multi-row blocks overlap on same canvas
Hi,
I have a problem designing a Form. We use Designer 6i and we generate with the Headstart 6.5 (first version) scripts.
I want to make a master-detail form and both of those blocks have to be on 1 tabpage. Both blocks also are multi-row block. Every time i generate it the two blocks overlap eachother in the canvas. I tried it with item groups for both blocks. I used the X and Y position in the properties of the block (module components) but they keep on overlapsing (Because it looks like both blocks start from the same starting point, so that makes them overlap). Is this a know bug or did anyone ever had the same problem?
Oh yeah, and on both blocks i did put the preference set from Headstart (QMS65_MULTI_RECORD_BLOCK).
Please help.
Kind regards,
DaveHi,
Set the "placement property" of the master block component to "new tab canvas page" and the detail component to "Same tab canvas page". You can set the size of the first master block for example: X = 102 and Y = 61
You dont need to set the size of the detail block.
Hope this helps you,
CB -
How to calculate total no of days in List column
Hi,
I've start date and end date. Can you please help me how to calculate total number of days.
Column Name = Leave Start Date (05/02/2015)
Column Name = Leave End Date (19/02/2015)
Column Name = Total Days (This is calculated column)
I used below formula but its showing only 14 days however it should show 15 days
=DATEDIF([Start Date], [End Date],"d")
Thanks,I got the answer
Formula is
=DATEDIF([Start Date], [End Date]+1,"d")
Thanks.:) -
How can I have a multi-row tabbar in Thunderbird?
Plain and simple.
How can I get a multi-row tabbar in Thunderbird like, for instance, Tab Mix Plus extension implements in Firefox ?
I have searched the Web over and over again and have not found a single hint.
Thanks!No idea.
Perhaps you could email the maker of tab mix plus and ask them.
Maybe you are looking for
-
The 'Find Criteria' in Bridge no longer finds my keywords.
RE: CS5 Operating System: OS X 10.9.4 I recently tried to use my Adobe Bridge 'Find Criteria' and it is not locating any files that have been tagged with keywords. The keywords assigned to the files are still there when I click on the file. However
-
Help my ipod is in "disk mode"
i dont know what this means and i dont know how to get out of it please help, thanks.
-
Print out spry menu structure?
Is there a way to print out the complete Spry Menu Bar structure that someone builds in dreamweaver so it would show how each menu listing branches off?
-
Apple Final Cut Pro: No Importable Files
I'm trying to add a movie file to Apple Pro to burn, and it keeps saying "No importable files. None of the selected files or folders can be imported. Change the selection and try again." Can anyone please help?!
-
Forgot restriction passcode, tried to restore but it asked for my restrictions passcode
I'm in a catch 22. Can't remember restrictions code, but need to turn off restrictions. Tried to factory restore and it first asks for my regular passcode, then asks for restrictions passcode. I don't have iTunes.