Total row count - where from is that value?

Hi,
I need the value of total row count that is displayed at the button of portal report. I need this value to use in my java script.
Is that value somewhere in database? Maybe any variable or hidden form element on the page?
Where from does the portal know when to show only the previous button and when both next and previous? It must by calucated somehow.
Thanks in advance.
best regards
Krzysztof Jungowski
null

Thanks. Just to make clear:
Probelm:
I need to display links to pages with part of results at the bottom of page - just like in discussion group: Pages: [1] [2] [3] ....
Solution:
I know that there is a hidden form on every report rendered by portal. In that form there are several elements like:
pagenumer, minrow and maxrows. Updating these elements I can jump to every page with results.
Total row count problem:
The problem is that I don't know the number of pages. If I had a total row count value I would calculate the number of pages and create links only to existing pages.
best regards
Krzysztof Jungowski

Similar Messages

  • The best way to do paging and get total rows count given a sql statement

    Hi,
    Just got a quick question.... what is the best way to do paging as well as the total rows count given by a sql statement.
    e.g. "select * from emp"
    1. I need to know the total row count for this statement.
    2. I also need to do a 10 rows per page....
    Is there a way to do it in a SINGLE statement for best performance?
    Thanks experts.

    Sounds more like a "formatting" problem...
    If Sql*plus is your reporting tool, check out the guide:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/toc.htm

  • 3.0.9.8.5 - Total Row Count in reports

    "Total Row Count" seems to be broken after applying patch 3.0.9.8.5.
    After applying the patch, we viewed an existing report which returned (let's say) 25 rows (and I've got max rows per page set to 5):
    The first page correctly says: "Total Row Count in Report- 25" and "Row(s) 1 - 5 "
    But then clicking the 'next' button, the following page incorrectly says: "Total Row Count in Report- 10" and "Row(s) 6 - 10 "
    So, the total row count is getting screwed up. Clicking "previous" in the example above, the total row count goes down to '5'.
    Another 3.0.9.8.5 patch problem appears to be 5 extra <br>'s within the report customize page top level of buttons and the criteria form. Looks ugly.

    Thanks for the reply.
    Is there nothing I can do to fix this problem before the next 3.0.9 patch comes out? We've have perhaps another few months to go before we make the move to portal release 2.
    This one issue with patch 3.0.9.8.5 is mostly definitely a show-stopper for us...we cannot live with customers seeing errors as basic as "total rows" returned in queries....we will have to roll back to our previous patch level 3.0.9.8.3. By doing this, we will continue to get bad customer feedback because of the awful performance introduced by that patch (Internet Explorer HTTP 1.0 vs 1.1 / keepalives / SSL issue). That's not to mention that we won't see the benefits of the content-area export/import bug fixes in this latest pathset.
    So, if there is ANYTHING we can do to fix this one problem, we (and our customers) would greatly appreciate hearing about it.
    thanks,
    -john

  • How to return "Final Row Count" - where I have suppression filters etc

    I am building a data interface that outputs "trade records"
    Each report/file has a primary header record
    each report/file has a secondary header record for EACH TRADE
    each report/file has trade details per account under the secondary header record for EACH TRADE
    each report/file has a primary footer record, that shows the total row count of the resultant details
    the "Records" count in crystal is not what I need, as when the report prints/Exports, certain of those records are suppressed.
    I only need what "lands" in my txt file in respect to that final number of total rows of data
    Any suggestions are very greatly appreciated.  My search thru the forum did not return an answer that I could see.
    thank  you!
    Chris
    Edited by: CHRISTOPHER MAINARD on Jul 27, 2010 5:14 PM

    Thank  you  - I very much appreciate your response - but about the same time you posted - my experimentation and borrowing of like situation formulae seemed to solve it with some tweaking! 
    first I added this formula to count each "trade record"
    Whileprintingrecords;
    numbervar linecnt := linecnt +1
    then, in the "file footer" added this:
    tonumber({@totalRowCount})DistinctCount ({MoxyAllocation.OrderID})1
    thank you again for your input, I'm betting I'll find a use for that in the near future.
    CBM

  • Answers: total row count

    Ist it possible to print the total row count on the first or each page?
    Regards,
    Stefan

    I am relatively new to Answers. How do use row level count function?

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Query to get rows betwen x and y + table total row count

    Hi,
    I try get rows between e.g. 100 and 150 when I sort by some column
    My query is now like this
    SELECT  *
    FROM
      (SELECT a.*,
        row_number() OVER (ORDER BY OWNER ASC) rn,
        COUNT(1) over() mrn
      FROM (SELECT * FROM all_objects) a
    WHERE ROWNUM BETWEEN least(100,mrn) AND 150It is not very fast if I run that kind select from big table
    Any tips to optimize this query?
    Regards,
    Jari

    Hi,
    I'm so bad with SQL :(
    Here is sample where I need that kind query.
    http://actionet.homelinux.net/htmldb/f?p=100:504
    It looks standard Apex report but it is not.
    It is just test to use query to output html using htp package
    I send parameter start row, max rows, column I like order by.
    Now I do query for cursor
        /* Report query */
        l_sql := '
          SELECT * FROM(
            SELECT a.*, row_number() OVER (ORDER BY '
            || l_sort_col
            || ' '
            || l_sort_ord
            || ') rn, COUNT(1) over() mrn
            FROM(' || l_sql || ') a
          ) WHERE rn BETWEEN LEAST(' || l_start_row || ',mrn) AND ' || l_last_row
        ;Then I loop cursor and output html.
    You can order report by click heading and there is that pagination
    I did not know that I could find examples by "pagination query" =), thanks for that tip for both of you.
    I know Apex have reports ,
    but I need have features that Apex templates can not provide at least yet.
    So I have study that generating html tables using custom package instead Apex report should be best approach to get layouts I need.
    Regards,
    Jari
    Edited by: jarola on Jan 21, 2011 10:38 PM

  • How to find total row count on weekly basis

    I have written a join query which works perfect and it give me total number of rows between two dates, however is there a way where i can modify my query so that i can see the result on weekly basis from January 2014 to may 2014
    ;WITH SourceData
    as
        SELECT tablet.Approach.ApproachId
        ,StartDateTime
        ,QuestionId, Stage
        FROM Tablet.Approach
        JOIN tablet.DataCapture ON tablet.Approach.ApproachId = tablet.DataCapture.ApproachId
        WHERE QuestionId in (9,10)
        and Stage = 2
        and StartDateTime between '2014-01-01 00:00:00' and '2014-05-20 00:00:00'
    ,RecordCnt
    AS
        SELECT COUNT(ApproachId) AS TotalInformationEffectContacts
        FROM SourceData
    Select * from SourceData Cross join RecordCnt
    order by StartDateTime asc

    Use GROUP BY datediff(ww,@startdate,@enddate)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to reset a row count based on a column value?

    OracleBI Discoverer 10g (10.1.2.3)
    Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)
    I've got a Discoverer Plus report that shows item receipts, receipt dates, and if the receipt was inspected. I've got items that should be inspected every 5th receipt. There's got to be a handy-dandy function I can use to do this, right?
    Item        Receipt Date      Inspected         
    Bracket     1/1/2009               Y
    Bracket     2/1/2009               N
    Bracket     3/1/2009               N
    Bracket     4/1/2009               Y <--let's assume someone didn't follow the instructions
    Bracket     5/1/2009               N
    Bracket     6/1/2009               N
    Bracket     7/1/2009               N
    Bracket     8/1/2009               N
    Bracket     9/1/2009     I'm looking to count the receipts and reset the counter when Inspected = Y
    Item        Receipt Date      Inspected     Inspect_Count       
    Bracket     1/1/2009               Y                  0
    Bracket     2/1/2009               N                  1
    Bracket     3/1/2009               N                  2
    Bracket     4/1/2009               Y                  0
    Bracket     5/1/2009               N                  1
    Bracket     6/1/2009               N                  2
    Bracket     7/1/2009               N                  3
    Bracket     8/1/2009               N                  4
    Bracket     9/1/2009                                  5 <-- receiver should inspect on this receipt I'm open to other methods if mine seems like a dud.
    -Tracy

    Hi,
    You can use this query for achieve your requierment in your view or you can include in your etl .
    REgards salim.
    SELECT item, receipt_date, inspected
      FROM table_inspect;
    ITEM    RECEIPT_DA INSPECTED                    
    Bracket 01/01/2009 Y                            
    Bracket 02/01/2009 N                            
    Bracket 03/01/2009 N                            
    Bracket 04/01/2009 Y                            
    Bracket 05/01/2009 N                            
    Bracket 06/01/2009 N                            
    Bracket 07/01/2009 N                            
    Bracket 08/01/2009 N                            
    Bracket 09/01/2009                              
    9 rows selected.Solution
    SELECT item,receipt_date,inspected,inspect_count
    from table_inspect
    model
    partition by (item)
    dimension by( row_number()over(partition by item order by receipt_date) rn)
    measures(receipt_date,inspected,0 Inspect_Count )ignore nav
    (Inspect_Count[rn]= case when inspected[cv()]='Y' then 0 else Inspect_Count[cv()-1]+1 end)
    order by receipt_date;
    ITEM    RECEIPT_DA INSPECTED  INSPECT_COUNT
    Bracket 01/01/2009 Y                      0
    Bracket 02/01/2009 N                      1
    Bracket 03/01/2009 N                      2
    Bracket 04/01/2009 Y                      0
    Bracket 05/01/2009 N                      1
    Bracket 06/01/2009 N                      2
    Bracket 07/01/2009 N                      3
    Bracket 08/01/2009 N                      4
    Bracket 09/01/2009                        5
    9 rows selected.Edited by: Salim Chelabi on 2010-03-03 07:49

  • Count total rows in database?

    Hello all,
    Is there a way to query the database for the total number of rows.... without using ANALYZE STATISTICS? (That would cause the db to sometimes use COST instead of RULE based optimization, slowing it down significantly.)
    I know I could could brute force a total row count with something like:
    spool get_total_rows.sql
    SELECT 'SELECT COUNT(*) FROM '||owner||'.'||table_name||';'
    FROM ALL_TABLES;
    spool off
    ...then run get_total_rows and manually add all the counts.
    But it just seems like there must be a cleaner way to do it.
    Thanks much,
    Natasha

    ok. here you have that information:
    ALL_TABLES
    ALL_TABLES describes all relational tables accessible to the current user. To gather statistics for this view, use the SQL ANALYZE statement.
    Related Views
    DBA_TABLES describes all relational tables in the database.
    USER_TABLES describes all relational tables owned by the current user. This view does not display the OWNER column.
    Note:
    Columns marked with an asterisk are populated only if you collect statistics on the table with the ANALYZE statement or the DBMS_STATS package.
    Column Datatype NULL Description
    OWNER
    VARCHAR2(30)
    Owner of the table
    TABLE_NAME
    VARCHAR2(30)
    Name of the table
    TABLESPACE_NAME
    VARCHAR2(30)
    Name of the tablespace containing the table; NULL for partitioned, temporary and index-organized tables
    CLUSTER_NAME
    VARCHAR2(30)
    Name of the cluster, if any, to which the table belongs
    IOT_NAME
    VARCHAR2(30)
    Name of the index-organized table, if any, to which the overflow entry belongs. If IOT_TYPE column is not null, this column contains the base table name.
    PCT_FREE
    NUMBER
    Minimum percentage of free space in a block; NULL for partitioned tables
    PCT_USED
    NUMBER
    Minimum percentage of used space in a block; NULL for partitioned tables
    INI_TRANS
    NUMBER
    Initial number of transactions; NULL for partitioned tables
    MAX_TRANS
    NUMBER
    Maximum number of transactions; NULL for partitioned tables
    INITIAL_EXTENT
    NUMBER
    Size of the initial extent in bytes; NULL for partitioned tables
    NEXT_EXTENT
    NUMBER
    Size of the secondary extension bytes; NULL for partitioned tables
    MIN_EXTENTS
    NUMBER
    Minimum number of extents allowed in the segment; NULL for partitioned tables
    MAX_EXTENTS
    NUMBER
    Maximum number of extents allowed in the segment; NULL for partitioned tables
    PCT_INCREASE
    NUMBER
    Percentage increase in extent size; NULL for partitioned tables
    FREELISTS
    NUMBER
    Number of process freelists allocated to this segment; NULL for partitioned tables
    FREELIST_GROUPS
    NUMBER
    Number of freelist groups allocated to this segment; NULL for partitioned tables
    LOGGING
    VARCHAR2(3)
    Logging attribute; NULL for partitioned tables
    BACKED_UP
    VARCHAR2(1)
    Has table been backed up since last change
    NUM_ROWS*
    NUMBER
    Number of rows in the table
    BLOCKS*
    NUMBER
    Number of used data blocks in the table
    EMPTY_BLOCKS*
    NUMBER
    Number of empty (never used) data blocks in the table
    AVG_SPACE*
    NUMBER
    Average amount of free space, in bytes, in a data block allocated to the table
    CHAIN_CNT*
    NUMBER
    Number of rows in the table that are chained from one data block to another, or which have migrated to a new block, requiring a link to preserve the old ROWID
    AVG_ROW_LEN*
    NUMBER
    Average length of a row in the table in bytes
    AVG_SPACE_FREELIST
    _BLOCKS
    NUMBER
    The average freespace of all blocks on a freelist
    NUM_FREELIST_BLOCKS
    NUMBER
    The number of blocks on the freelist
    DEGREE
    VARCHAR2(10)
    The number of threads per instance for scanning the table
    INSTANCES
    VARCHAR2(10)
    The number of instances across which the table is to be scanned
    CACHE
    VARCHAR2(5)
    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)
    TABLE_LOCK
    VARCHAR2(8)
    Whether table locking is enabled or disabled
    SAMPLE_SIZE
    NUMBER
    Sample size used in analyzing this table
    LAST_ANALYZED
    DATE
    Date on which this table was most recently analyzed
    PARTITIONED
    VARCHAR2(3)
    Indicates whether this table is partitioned. Set to YES if it is partitioned.
    IOT_TYPE
    VARCHAR2(12)
    If this is an index-organized table, then IOT_TYPE is IOT, IOT_OVERFLOW, or IOT_MAPPING. If this is not an index-organized table, then IOT_TYPE is NULL.
    TEMPORARY
    VARCHAR2(1)
    Can the current session only see data that it place in this object itself?
    SECONDARY
    VARCHAR2(1)
    Whether the trigger is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge (Y |N)
    NESTED
    VARCHAR2(3)
    Is the table a nested table?
    BUFFER_POOL
    VARCHAR2(7)
    The default buffer pool for the object. NULL for partitioned tables
    ROW_MOVEMENT
    VARCHAR2(8)
    Whether partitioned row movement is enabled or disabled
    GLOBAL_STATS
    VARCHAR2(3)
    For partitioned tables, indicates whether statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO)
    USER_STATS
    VARCHAR2(3)
    Were the statistics entered directly by the user?
    DURATION
    VARCHAR2(15)
    Indicates the duration of a temporary table:
    SYS$SESSION: the rows are preserved for the duration of the session
    SYS$TRANSACTION: the rows are deleted after COMMIT
    Null for a permanent table
    SKIP_CORRUPT
    VARCHAR2(8)
    Whether Oracle ignores blocks marked corrupt during table and index scans (ENABLED) or raises an error (DISABLED). To enable this feature, run the DBMS_REPAIR.SKIP_CORRUPT_BLOCKS procedure.
    MONITORING
    VARCHAR2(3)
    Whether the table has the MONITORING attribute set
    Try with ALL_TABLES and post if the results were zero too
    Joel P�rez

  • Unique row count in table footer

    JDev 11.1.1.6
    Hi,
    In my current table, I am able to show total row count at a table footer by using #{bindings.<myVO>Iterator.estimatedRowCount}.
    I have a request from my user to show unique total row count. For example rows below:
    1 A
    2 B
    3 A
    4 C
    The footer should show:
    4 3
    The second column has A, B, and C where A is counted only 1 (unique). Is there a way to achieve this?
    Thanks.

    Hi RRA,
    This may work for a static # of rows (no filtering). In the table I use, I can do filtering and that certainly will make the count result be different if I use another VO for distinct result.
    Thanks.

  • Dynamically Add Report Parameters & Get Row Count

    In out Portal reports, we are inserting records into our own logging tables at the beginning of the report and updating the record at the end of the report. Currently, the sequential key has been added as a parameter so that we can access it through-out the report execution. Therefore, it displays on the parameter screen. We don't want the users to see this item. Is it possible to add it to the parameter list without having it display on the screen? Can this be done using a procedure in wwv_standard_util? Any other suggestions?
    Also, we need to get the total row count of the query. Where can we get this value?
    null

    In out Portal reports, we are inserting records into our own logging tables at the beginning of the report and updating the record at the end of the report. Currently, the sequential key has been added as a parameter so that we can access it through-out the report execution. Therefore, it displays on the parameter screen. We don't want the users to see this item. Is it possible to add it to the parameter list without having it display on the screen? Can this be done using a procedure in wwv_standard_util? Any other suggestions?
    Also, we need to get the total row count of the query. Where can we get this value?
    null

  • Working with VERY LARGE tables - is it possible to bypass row counting?

    Hello!
    For working with large result sets ADF provides the `Range Paging` mechanism for views, described in the 27.1.5 part of the Developer’s Guide For Forms/4GL Developers.
    It works well, but as a common mode it counts total row count to allow paging. In some cases query `select count(1) from (SELECT ...)...` can take very, very long time.
    But if a view object doesn't know row count (for example we can override getEstimatedRowCount() method ), paging controls doesn't appear in user interface.
    Meanwhile I suggest that it's possible to display two paging links - Prev and Next, without knowing row count. Is it a way to do it?
    Thank in advance,
    Ilya Rodionov.

    Hi Ilya,
    while you wait for Franks to dig up the right sample you can read this thread:
    Re: ADF BC: Performance issue with getEstimatedRowCount (ER?)
    There we discuss the exact issue.
    Timo

  • Estimated row count

    hello
    i used estimatedrowcount on several occasions in my application to hide and show certain parts of the screen (normally in EL expressions)
    why is it called ESTIMATED and not EXACT. Of course, there is a reason why i ask,
    sometimes and in certain pages in which i add new row, it is not also the case that the value of EstimatedRowcount is always updated when a new row is inserted. Also what if another use is adding rows through the same page but from a different browser (different instance of the same applications).
    In other words, when does the framework issues SELECT count() on the page to reflect an updated SELECT count().
    In certain situation , i had to create VO in order to make sure that i control that the count() is specifically calculated when i need since i noticed that the default EstimatedRowCount does not always give the expected result and henceforth, could be unwise to depend on it to control the logic
    rgds
    ammar sajdi
    Amman jordan

    You are right, the estimated row count does not query the database every time you call the method. It just is designed to give you the estimated row count in the context of the "current query" of the VO. So, you perform a query. After the query is performed, the table binding, for example, calls the getEstimatedRowCount() method to determine how many rows are to be expected (keep in mind that probably not all rows are fetched at once after the query). Nothing wrong with that. The ViewObject is executed, 20 rows are fetched, the estimated row count tells the binding that there are 100 rows in the result. If then another user inserts a new row, then that typically will have no effect on the 100 rows, meaning you won't get 101 rows at a sudden. If you scroll through the result set, you will get the 100 rows. In order to get 101 rows, you will need to re-execute the query. Then the table binding will get the estimated row count and it will be 101.
    As soon as the fetch is complete, meaning that all rows are fetched from the database and are in memory, then getEstimatedRowCount() no longer accesses the database (why should it?!) but just returns the count of fetched rows. Of course, taking into account any unposted rows that you may have created.
    If you really want the row count from the database, why don't you just call getQueryHitCount()? Why must it be getEstimatedRowCount()?!
    Sascha

  • Get Table Row Count

    hi folks,
    How to get a tables' row count (number of records)?
    Values of table are filled by an RFC return structure. Or how can we get the number of records in the RFC return structure?
    thanks in advance
    nikhil

    Hi,
    Check the size of the node bound to the table
    lets say orders is the node bound to the table
    //Replace orders with the node bound to your table.
    wdContext.nodeOrders().size();
    Regards
    Ayyapparaj

Maybe you are looking for