Home » Developer & Programmer » Forms » On the Form how to show row count and total number of records in a multi record block?
On the Form how to show row count and total number of records in a multi record block? [message #81204] Wed, 22 January 2003 12:54 Go to next message
Swamy
Messages: 78
Registered: June 2002
Member
I have a multi record block in a Form module displaying 10 records at a time from the database. On the screen I need to show row count of the record that was selected by the user and total number of records available in the database, like 12th record out of 3782. How can I achieve this and what is the better approach? I appreciate for your help in advance. I am using Forms 9i on the web.
Re: On the Form how to show row count and total number of records in a multi record block? [message #81209 is a reply to message #81204] Thu, 23 January 2003 01:01 Go to previous messageGo to next message
Zaire
Messages: 36
Registered: October 2002
Member
Hi Swamy,

You can get the record number selected using the :system.cursor_record. For the total number of records, you can use the GET_BLOCK_PROPERTY('BLK',QUERY_HITS) property. This should work but if not, an alternative would be to select count(1) from table.

Hope this helps.

Reg
Za
Re: On the Form how to show row count and total number of records in a multi record block? [message #81213 is a reply to message #81204] Thu, 23 January 2003 05:04 Go to previous messageGo to next message
Ani
Messages: 56
Registered: November 2000
Member
Step 1 set the Query all Records property of the block to YES

step 2 write a WHEN_NEW_RECORD_INSTANCE at the block level
with text

message(:system.cursor/record ||'of'||
get_block_property('BLOCK_NAME',QUERY_HITS)||
' Records');
Re: On the Form how to show row count and total number of records in a multi record block? [message #637565 is a reply to message #81213] Wed, 20 May 2015 05:27 Go to previous messageGo to next message
tofajjalhnipu66@gmail.com
Messages: 18
Registered: May 2015
Location: Chittagong,Bangladesh
Junior Member
but both are not work....

what can i do ?
Re: On the Form how to show row count and total number of records in a multi record block? [message #637566 is a reply to message #637565] Wed, 20 May 2015 05:33 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It depends on what you want to do, what exactly you did so far (please, post code you used) and what "not work" means (any error? If so, which one?).
Re: On the Form how to show row count and total number of records in a multi record block? [message #637567 is a reply to message #637566] Wed, 20 May 2015 05:41 Go to previous messageGo to next message
tofajjalhnipu66@gmail.com
Messages: 18
Registered: May 2015
Location: Chittagong,Bangladesh
Junior Member
i use this code in when-new-record-instance trigger-

message(:system.record ||'of'|| get_block_property('employees',QUERY_HITS) || 'Records');


error message is -

bad bind variable'system.record'
Re: On the Form how to show row count and total number of records in a multi record block? [message #637568 is a reply to message #637567] Wed, 20 May 2015 05:44 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's no :SYSTEM.RECORD system variable. Open Forms Help and search for available & valid ones. Pick the one you find the most suitable for your needs.
Re: On the Form how to show row count and total number of records in a multi record block? [message #637569 is a reply to message #637567] Wed, 20 May 2015 05:47 Go to previous messageGo to next message
tofajjalhnipu66@gmail.com
Messages: 18
Registered: May 2015
Location: Chittagong,Bangladesh
Junior Member
i want to count only updeted data in tabular form ;

please help me
Re: On the Form how to show row count and total number of records in a multi record block? [message #637570 is a reply to message #637569] Wed, 20 May 2015 05:52 Go to previous messageGo to next message
tofajjalhnipu66@gmail.com
Messages: 18
Registered: May 2015
Location: Chittagong,Bangladesh
Junior Member
see it please
  • Attachment: COUNT.fmb
    (Size: 44.00KB, Downloaded 1689 times)
Re: On the Form how to show row count and total number of records in a multi record block? [message #637571 is a reply to message #637570] Wed, 20 May 2015 06:02 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Updated records have :SYSTEM.RECORD_STATUS = CHANGED. Try to loop through the whole block and count number of those records.
Re: On the Form how to show row count and total number of records in a multi record block? [message #637596 is a reply to message #637571] Wed, 20 May 2015 09:40 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
If you have the "Console Window" specified (this is a Module Property), then Oracle Forms will automatically display "current record"/"total records" in the Console/Status bar at the bottom of the Applet. To get the total record count, however, you must have your data block configured to Query All Records = Yes otherwise Forms will display the current record/? until you have navigated to the last row and then Forms will update the "?" to the total records.

If you have a multi-block form, which is common, as you navigate from one block to another, the record counts displayed in the Console status bar will change to reflect the current block.

Craig...
Re: On the Form how to show row count and total number of records in a multi record block? [message #637816 is a reply to message #637596] Tue, 26 May 2015 05:54 Go to previous messageGo to next message
tofajjalhnipu66@gmail.com
Messages: 18
Registered: May 2015
Location: Chittagong,Bangladesh
Junior Member
hi.

Thanks and regards to all.
Re: On the Form how to show row count and total number of records in a multi record block? [message #638183 is a reply to message #637567] Fri, 05 June 2015 06:46 Go to previous message
jgjeetu
Messages: 373
Registered: July 2013
Location: www.Orafaq.com/Forum
Senior Member

correct code is:-

message(:system.cursor_record ||'of'|| get_block_property('employees',QUERY_HITS) || 'Records');
Previous Topic: Oracle Forms Printing Message Token
Next Topic: RUN_PRODUCT without connecting to a database
Goto Forum:
  


Current Time: Fri Apr 26 13:34:55 CDT 2024