Want to Count Number of records in one Column in a page

Hi all,
According to the requirement I am using format with multiple columns in the report page, i want to count the records in each column, according to the count i want to display one message at the end of the column like "***continue in next column ***" &
"***continue in next page **" & "*End of Records**"
Note: My report may contain multiple pages r will end up with only single column
Can any one help me on this....
Edited by: Sridhar Naljala on Mar 16, 2009 5:39 PM

Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

Similar Messages

  • Hi Gurus! how to count number of records in any column of ALV Grid report

    Hi Guys!
    I want to know how can we count the number of records in any column selected by the user. Like for oe customer there might be 20 sale order that means for 10 customer there will be 200 Sale order. So if i select cutomer number column ti should give 10 out put and whern select sale order it should give 200 as output.
    -Anurag Jain

    Hi,
    Either you can use the hotspot_click event or double_click to show the Pop-up info of the Sales Order count or customer Count depending on the selection.
    In the hotspot_click event  method you have E_ROW_ID E_COLUMN_ID..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.
    In the double_click event  method you have E_ROW E_COLUMN..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.

  • Count number of records in a internal table

    hi
    i want to count number of records in internal table
    pls let me know how to count the number of records in a internal table.
    regards
    Arora

    hi
    one way is
    data field type i.
    Decribe table itab lines field.
    write: / field.
    displays the no of records in tha internal table
    or if u want to write logic.
    data:
      w_count type i.
    loop at itab.
    w_count = w_count + 1.
    endloop.
    write: / w_count.
    displays the no of records.
    reward points if useful.

  • To count number of records in an internal table for a condition

    Hello All,
            I want to count number of records in an internal table for a condition.
    For e.g. -- I have one internal table IT which having fields F1, F2, F3, F4, F5.
                     Now, I want number of records in itnternal table IT where F1 = 'ABC'.
    Is it possible to do..?? If yes, then how.??
    Thanks in advance...!!
    Regards,
    Poonam.

    Hi,
    If you mean an internal table, there are a few ways to do this.
    1 One would be to loop over the table with a WHERE clause and increment a counter.
    data: lv_counter type i.
    clear lv_counter.
    loop at itab where fld1 = 'ABC'.
    lv_counter = lv_counter + 1.
    endloop.
    lv_counter now has the number of rows per the condiction.
    2  Well, you may want to try this as well, and compare to the LOOP way. Not sure what kind of overhead you may get doing this way. Here ITAB is our main internal table, and ITAB_TMP is a copy of it. Again I think there may be some overhead in doing the copy. Next, delete out all records which are the reverse of your condition. Then whatever is left is the rows that you want to count. Then simply do a LINES operator on the internal table, passing the number of lines to LV_COUNT.
    data: itab type table of ttab.
    data: itab_tmp type table of ttab.
    itab_tmp[] = itab[].
    delete table itab_tmp where fld1  'ABC'.
    lv_count = lines( itab_tmp ).
    Thanks & Regards,
    ShreeMohan

  • Counting number of records in a data block

    hi folks,
    Simple question for you guys: How can I count number of records in a data block.
    In other words, say I have 10 detail records listed on a data block (one of my columns is a non-database item for entering a number). Now I just want to do somethin like:
    Select count(*) From <data_block> into lnRecCount
    Where <non-database column> <> 0 ;
    Can I do this in a button trigger? I can't get it to work?
    Thanks,
    bob

    You should make a routine that go through records of the block and count the records that agree with your condition.

  • Hi, I have a large number of products in one column and prices of the products in another. Most prices are different. I want to know if it is possible to increase all of the prices by 5% or 10% etc. Hope someone can help. From Stiffy

    Hi, This is my first time I hope someone can help.
    I am working with numbers and I have a large number of products in one column and the relevent prices in another. All the prices are different and I want to increase the price of everything by 5% or 10% etc. Is this possible?
    Thanks in advance
    Stiffy123

    Ad a new, temporary column (or one you can hide when not using). Let's say the current Prices are in column C and the new column is D.
    you can inflate the prices in column C by 5% by entering the formula in the first cell of column D as:
    =C2*105%
    likes this:
    to fill down, select D2, then copy, then select the D3 thru the end of the column, then paste.  Now select C2 thru the end of column C, now paste over the existing values using the menu item "Edit > Paste Values"
    you can now hide column D until you need to use it again.

  • Merge records of one column in ALV?

    Hi friends,
    i am creating alv grid report(with out oops). i am calculating value for one field that value is common for all the records . so i want to display that as common value instead of displaying number of lines .
    is there any possibility to merge records of one column. using it_sort i tried . but it is not coming. since it is a currency field and i need to do display in the subtotal field.
    please let me know if u have the solution.
    regards,
    kani.
    Edited by: Julius Bussche on Sep 8, 2008 7:31 AM

    kani,
    refwer sample code.
    DATA: gt_sort TYPE slis_t_sortinfo_alv,
    gs_sort TYPE slis_sortinfo_alv.
    CLEAR gs_sort.
    gs_sort-fieldname = 'LDDAT'.
    gs_sort-spos = 1.
    gs_sort-up = 'X'.
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = v_repid
    i_callback_user_command = 'PROCESS_USER_COMMANDS'
    is_layout = w_layout
    it_fieldcat = i_fieldcat[]
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'A'
    it_events = v_events
    is_print = w_print
    TABLES
    t_outtab = i_final1

  • I have a one-column table in pages.  Each cell has text and a number separated by a colon.  Can I automatically make it two column with everything to the right of the colon in the second column?

    I have a one-column table in pages.  Each cell has text and a number separated by a colon.  Can I automatically make it two column with everything to the right of the colon in the second column?

    Here's another way that is pretty quick to do.
    Formula in Column B is:
    =LEFT(A, FIND(":", A))
    Formula in Column C is:
    =RIGHT(A, LEN(A)-FIND(":", A))
    You can eliminate the colon from the result in column B by writing:
    =LEFT(A, FIND(":", A)-1)
    Once you do the conversion, you should freeze the result by Selecting columns B and C and then Command-C, Edit > Paste Values.
    Regards,
    Jerry

  • Create Store Procedure to Count Number of records in Database for each table

    Hello,
    I have created the code which counts the number of records for each table in database. However, I want create store procedure for this code this code that when ever use execute the Store Procedure can provide the database name to execute it and as a result
    table will display number of records in each table.
    Below you will find the code its working:
    CREATE
    TABLE #TEMPCOUNT
    (TABLENAME
    NVARCHAR(128),
    RECORD_COUNT BIGINT)
    -- Creating a TEMP table
    EXEC
    sp_msforeachtable
    'insert #tempcount select ''?'', count(*) from ? with (nolock)'
    SELECT
    * FROM
    #TEMPCOUNT
    ORDER
    BY TABLENAME
    DROP
    TABLE #TEMPCOUNT
    This code need to be convert in store procedure and user can give database name when execute the procedure in order to count the records.
    Looking forward for your support.
    Thanks.
    SharePoint_Consultant_EMEA

    Something like:
    set quoted_identifier off
    go
    create procedure usp_TableCounts
    @DBName as varchar(1000)
    as
    set nocount on
    declare @SQLToExecute varchar(1000)
    CREATE TABLE #TEMPCOUNT (TABLENAME NVARCHAR(128), RECORD_COUNT BIGINT) -- Creating a TEMP table
    set @SQLToExecute = @DBName + ".dbo.sp_msforeachtable 'insert into #tempcount select ''?'', count(*) from ? with (nolock)'"
    print @SQLToExecute
    exec (@SQLToExecute)
    SELECT * FROM #TEMPCOUNT
    ORDER BY TABLENAME
    DROP TABLE #TEMPCOUNT
    GO
    Satish Kartan www.sqlfood.com

  • Count Number of Records in Oracle Database Table

    Please help me to see if I "set" and "return" the number of records in my database table correctly (I am using the Oracle 9i):
       public int getNumberOfRecipientBeans() throws AssertionException, DatabaseException
          Connection conn = null;
          PreparedStatement stmt = null;
          String query = "SELECT count(*) FROM ContactEntry WHERE ContactTypeID = 6";
          ResultSet rs = null;
          try
             conn = DBConnection.getDBConnection();
             stmt = conn.prepareStatement( query );
             rs = stmt.executeQuery();
             // do I have to set anything here?
             if ( !rs.next() )
                throw new AssertionException("Assertion in servuce.getNumberOfRecipients");
              // Am I returning the counts here?
              return rs.getInt( 1 );
          catch( SQLException sqle )
             sqle.printStackTrace();
             throw new DatabaseException( "Error executing SQL in service.getNumberOfRecipients." );
          finally
             if ( conn != null )
                try
                   stmt.close();
                   stmt = null;
                   conn.close();
                catch( Exception Ex )
                   System.out.println( "Problem occurs while closing " + Ex );
                conn = null;

    public class MyE extends Exception {
        public MyE() {
            super(); // this line is not necessary. An empty method would suffice
        public MyE(String msg) {
            super(msg);
        // Check the API for Exception or Throwable--I may have the args backward
        public MyE(String msg, Throwable cause) {
            super(msg, cause);
        public MyE(Throwable cause) {
            super(cause);
    // Replace the log_warn() calls with appropriate logging calls for your context
    public class Closer {
        public static final void close(ResultSet closeMe) {
            if (closeMe != null) {
                try {
                    closeMe.close();
                catch (Throwable th) { log_.warn("Closing " + closeMe + ": ", th); }
        public static final void close(Statement closeMe) {
            if (closeMe != null) {
                try {
                    closeMe.close();
                catch (Throwable th) { log_.warn("Closing " + closeMe + ": ", th); }
        public static final void close(Connection closeMe) {
            if (closeMe != null) {
                try {
                    closeMe.close();
                catch (Throwable th) { log_.warn("Closing " + closeMe + ": ", th); }
        public static final void close(ResultSet rs, Statement stmt, Connection con) {
            close(rs);
            close(stmt);
            close(con);
    }

  • How can I select random records from one column

    How can I random select 400 records from a column contains more than 500,000 records? And how long will it take in oracle? Thanks.

    here is one option: (just change 5 to suit your needs...)
    SQL>select * from (
      2  select object_name
      3  from all_objects
      4  order by dbms_random.random
      5  ) where rownum < 5
      6  /
    OBJECT_NAME
    UTL_SYS_COMPRESS
    GV_$LOG_HISTORY
    GV_$LOGMNR_LOGS
    WWV_FLOW_THEME_7
    SQL>/
    OBJECT_NAME
    WWV_FLOW_UPGRADE_REPORT
    WRI$_ADV_SQLT_STATISTICS_PK
    V_$DATABASE
    GV_$SERVICEMETRIC
    SQL>/
    OBJECT_NAME
    WWV_FLOW_CREATE_FLOW_API
    WRH$_SERVICE_WAIT_CLASS_BL
    EXU8SNAPL
    GV$SERVICEMETRIC_HISTORY
    SQL>                well, regarding how long will it take... it depends from lots of variables...
    Cheers,
    Andrea

  • How to count number  of records for a field based on condition?

    Hi guys,
    I want to know how to find count of records coming from the database for a particular field based on some condition.
    I need to use this count to suppress some headers. Because of this i am not able to use running totals. Is there any other way?
    Ex scenario:
    I have account number and currency fields, those are coming from database. And i need to count the number of accounts whose currency is not Euro.
    Thanks in advance,
    Vijay.

    A simple formula can do that:
    //Formula begin
    if {your account field}<>"Euro" then 1
    //Formula end
    This formula can be summarized. (by group or report)
    Bryan Tsou@Taiwan

  • Counting number of records using where clause in a large table

    SQL SERVER 2008
    I've to find the count of the rows matching some conditions. The table size is very large with around 50 columns. And every day around 3000 rows are adding. 
    My business logic is to count the number of payments made by a particular user, also if the count exceeds 10 then the user is GoldUser else NormalUser.
    here:
    select count(payment_id) from payments_master_table where payment_user = @payment_user;
    here payment_id is primary key. This query is very slow, since it has to scan the whole table. Is there any other optimized way to find the number of counts. 
    Also, one way I can do is, if the count of payment_id exceeds 10, stop the count,
    but I do not how to do this.  
    Please can anyone help me. 
    Thanks!

    not top 10, but suppose 
    if the count(payment_id) reached 10 for a particular user before scanning the whole
    table, why to proceed ahead. My condition is to apply any user as GoldUser if the count is 10 or more than that. So stop the count if it reaches 10.
    Then in that case you need to implement it as a correlated query
    ie like
    SELECT t.User,COUNT(*)
    FROM table t
    CROSS APPLY (SELECT TOP 10 payment_id
    FROM table
    WHERE payment_user = t.payment_user
    )t1
    GROUP BY t.User
    It will try to fetch random 10 rows for the user and then get count. But even in this case you cant tell it will stop at exactly 10 record for every user as it depends on few other factors too.
    In any case the index on the payment_user column will really help
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Number of Records in one table

    Hi All,
    Can anybody let me know that in Oracle9i lite database, one table can have how many records. I mean is their any restriction on maximum number of ROWs for a table, like Palm database (PDB files) has a restriction that one table can have maximum 64000 rows.
    Is the same thing happen with Oracle lite database also
    Thansk in advance.

    We have had several tests of hundreds of thousands of rows using 9iLite on a PocketPC host. The upper bound appears to be based upon the physical limit of the host and not 9iLite.
    RP.

  • Tutorials Announcment :: Counting Number of Records ::

    Hi Every body i made anew and simple tutorials that lets you to count a how many records are attached to a category in your database.
    - how it works:
    - first will create a category table that allows us to insert category name into it.
    - second the slave table will allow us to insert what ever records belongs to this category and using the foreign key to make the relation BTW them...
    for more details see the tutorials here:
    - for more dreamweaver developer toolbox please visit:
    www.developer-online.com

    You should make a routine that go through records of the block and count the records that agree with your condition.

Maybe you are looking for