Sales Invoice - Fixing the number of rows isn't the solution. Ideas?

Hi All,
I have been working on converting the standard eBS Sales Invoice report to BIP over the past few weeks. I started to use the solution on Tim's blog:
http://blogs.oracle.com/xmlpublisher/2007/03/27/
For those people who haven't looked this, the solution uses variables to set and calculate the number of transaction rows to be displayed on a page. Filler rows are also inserted to pad out the page should the number of transaction rows be less that the number to be displayed on a page (if using this be careful though as there is a problem with the way the filler rows work as pointed out by Mike Parr in the comments of the blog http://blogs.oracle.com/xmlpublisher/2007/03/anatomy_of_a_template_ii_heade.html).
This solution is fine if the size of the data in the transaction row is never long enough to cause it to wrap within a column. For example, in the Sales Invoice, it is common for the Invoice Line Description to wrap 3 or 4 lines within the column. When this happens, the rows per page method goes out of the window as the number that can physically fit on the page is reduced due to the single data row spanning multiple layout rows.
I have had a good play around with fixing table row heights but to no avail. Also had a look at some of the standard RTF templates available in the latest release of R12. but couldn't find an example where this problem is addressed. I am 100% sure that someone must have hit this before so any advice and/or solutions would be greatly appreciated.
Perhaps the solution for this could be incorporated into a future blog post or example?
Cheers,
Jon.

Yep agreed. With fixed width fonts you could determine how many characters will display on a line but there is no telling where the word wrapping will occur. Suppose you could get really clever and use the position of the spaces to determine where the wraps will occur, then work out how many rows the line will take up (gulp!). Anyway, using fixed width fonts like courier will make the report look rubbish so I want to avoid this.
A response from the Oracle bod's wouldn't go a miss on this? Tim, et al?
Cheers,
Jon.

Similar Messages

  • How can i now the number of rows afected by the last query?

    how can i now the number of rows afected by the last query?
    For example:
    i made this update :
    update trl_trial set status = 1 /* Validation */
    where trial_id = cobject_id
    and status = 0; /* Initial */
    if NUMBERS_OF_ROWS = 0 then
    end if;
    how can i do this?
    thank u!!!!

    how can i now the number of rows afected by the last query?
    For example:
    i made this update :
    update trl_trial set status = 1 /* Validation */
    where trial_id = cobject_id
    and status = 0; /* Initial */
    if NUMBERS_OF_ROWS = 0 then
    end if;
    how can i do this?
    thank u!!!! Do the following :
    update trl_trial set status = 1 /* Validation */
    where trial_id = cobject_id
    and status = 0; /* Initial */
    if(SQL%ROWCOUNT = 0 ) then
    else
    end if;
    you can also declare a variable and do
    myvar := SQL%ROWCOUNT;
    SQL%ROWCOUNT returna the # of rows afected by any sql
    statement, like DELETE, UPDATE

  • How to get the number of rows written to the header of the spool file.

    Hi
    I need to create a header line for the spool file .
    the header line should include fixed length values .
    The header should include the number of records found in the table with a maximum begin date (begin_date is the column of the table)
    To get the header in the spool file , i wrote a select query has :-
    --SPOOL 'C:\Documents and Settings\abc\Desktop\output.TXT'
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school
    group by sysdate;
    SPOOL OFF
    which gets me all the rows in the table , but i only want the rows with the latest school_begin_date .
    how can i achieve that ...
    I know that a subquery should be written in the from clause to get the number of rows found with a maximum school_begin_date.
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school where
    select rownum from dad.school
    where school_begin_date = max(school_begin_date) ;
    the error i get is
    ORA-00934: group function is not allowed here
    I NEED HELP ..IN GETTING THE ROWNUM JUST FOR THE LATEST BEGIN_DATE ?
    PLS HELP ME IN WRITING THE QUERY .
    THANKS IN ADVANCE .

    Try this:
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000')||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) || rpad(' ',76,' ')
      from dad.school
    where school_begin_date = (select max(school_begin_date)
                                  from dad.school);

  • Urgent******how can i get the number of rows enterd by the user in a table

    Hi Frndz..
    As per my requirement i need to do the validations for the multipple rows in a table that was enterd by the user,
                   T
              The prob is how can i get that number of rows that enterd by user,
           WDMessageManager msg = wdComponentAPI.getMessageManager();
         String col1= "";
         String col2= "";
         double col3= 0;
         double col4= 0;
         double amount= 0;
         int nodesize = wdContext.nodeTest().size();
         try
         for(int i=0; i<=2 ; i++)
                   col1 = wdContext.nodeTest().getTestElementAt(i).getCol1();
                 //msg.reportSuccess("col1 size is :"+col1);
                   col2 = wdContext.nodeTest().getTestElementAt(i).getCol2();
                   col3 = wdContext.nodeTest().getTestElementAt(i).getCol3();
                   col4 = wdContext.nodeTest().getTestElementAt(i).getCol4();
                    amount = wdContext.nodeTest().getTestElementAt(i).getAmount();
              if(col1 == "" )
                        msg.reportException("Plz fil the col1 for line:",true);
                   break;
              else
              if(col2 == "" )
                                  msg.reportException("Plz fil the col2 for line:",true);
                             break;
                        else
              if(col3 <= 0)
                   msg.reportException("Plz fil the col3:",true);
                   break;
              else
                   if(col4 <= 0)
                   msg.reportException("Plz fil the col4:",true);
                   break;
              msg.reportSuccess("skvgjhdfgasdfgsjkafguisafisenvtvyeriy");
                                                       wdThis.test();
         catch (Exception e)
                   msg.reportException("strMessage in catch block",true);
         this is the code am going
    Regards
    Rajesh

    Hi,
       You can try this:
    * Let's say the table's datasource is a node called Table  and it has two attributes first & second.
    * You want to check if any of these attributes has been changed by the user or not. If they have been
    * changed then you want to do some validations against them.
      int sizeOfTable = wdContext.nodeTable().size();
      for(int i = 0; i < sizeOfTable; i++){
         IPrivate<view name>.ITableElement ele = wdContext.nodeTable().getTableElementAt(i);
         if(ele.isChangedByClient(ITableElement.<attribute name>)){
            //value has been changed, do some validation. You can get the row index using ele.index().
    Regards,
    Satyajit.

  • Count the number of rows based on the values!!!

    Hi all,
    What I am using:
    I am working with a multidimensional database in Visual Studio 2010 using its Data source view and calculation member and dimension usage.
    What I want to do:
    I have a fact table that has five columns(leg(s),hand(s), Head and body,overall) that shows the category of how severe the injury is. Let say for the records all columns never have an empty value(no injury is stated with 'No injury' ) . These five columns
    are connected with a dimension that has all the available values (Category A-E of injury).The overall has the most severe from the other four columns. I want to create a bar chart with five different measure
    values, one for each column, and count the values in those columns. 
    For example : I have a slicer in the excel and a bar chart and the slicer has all the values of the Category of the injury ( Cat a,Cat B, Cat C, ... Cat E, No injury ) and when i select one of them, lets say
    Cat C,  the bar chart should update and show how many Cat C each measurement column has. 
    Example FACT table:
    ID      LEG      HAND    HEAD   BODY OVERALL
    1        No         A           No        No        A
    2        No        D            C          C         C
    3    E         C            D           A         A
    4         E          E           B            C         B
    So if i selected C the bar chart will count   (Leg = 0, Hand = 1, Head = 1, body = 2 and Overall = 1).
    Any ideas ?
    Thanks for the help and the time :) 

    Hi DBtheoN,
    According to your description, you want to create a chart on excel worksheet to count the rows based on the value, right? If in this case, I am afraid this issue is related to Office forum, I am not the expert of Office, you can post the issue on the corresponding
    forum.
    However, this requirement can be done easily on SQL Server Reporting Services. You can using the expression below to count the rows.
    =COUNT(IIF(Fields!LEG.Value=Parameters!TYPE.Value,1,NOTHING))
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to increase the number of row displayed in the result set.

    Hi All,
    I have a seeded oracle page OA.jsp?page=/oracle/apps/pa/structure/webui/FPStructVersionPG from projects module.
    On the above page, when we click on the financial tab to see the tasks, it shows only 180 tasks out of 298. I dont find any link on the page which would give me the rest of the tasks, overall it shows only 180 tasks.
    I checked the VO query it picks up all the 298 records.
      SELECT   *
        FROM   (SELECT   element_number,
                         element_name,
                         object_type,
                         element_version_id,
                         proj_element_id,
                         project_id,
                         display_sequence,
                       ---  milestone_flag,
                       ---  critical_flag,
                         parent_element_id,
                         relationship_type,
                         relationship_subtype,
                         summary_element_flag,
                      ----   progress_status_code,
                      ---   progress_status_meaning,
                      ---   progress_comments,
                     ---    scheduled_start_date,
                      --   scheduled_finish_date,
                         task_manager_id,
                         task_manager,
                         parent_structure_version_id,
                         wbs_level,
                         wbs_number,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'StructureVersion',
                                 'NoIcon')
                            AS structure_icon,
                       --  DECODE (critical_flag, 'Y', 'Critical', 'NoIcon')  AS critical_icon,
                     --    DECODE (milestone_flag, 'Y', 'Milestone', 'NoIcon') AS milestone_icon,
                         DECODE (relationship_type, 'L', 'Link', 'NoIcon')
                            AS link_icon,
                         DECODE (object_type, 'PA_STRUCTURES', 'Y', 'N')
                            AS disable_select_flag,
                         elem_rec_ver_number,
                         elem_ver_rec_ver_number,
                       --  elem_ver_sch_rec_ver_number,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'NoEditTaskNumber',
                                 'EditTaskNumber')
                            AS display_task_number,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'NoEditTaskName',
                                 'EditTaskName')
                            AS display_task_name,
                         DECODE (summary_element_flag,
                                 'Y', 'NoEditSchStartDate',
                                 'EditSchStartDate')
                            AS display_start_date,
                         DECODE (summary_element_flag,
                                 'Y', 'NoEditSchFinishDate',
                                 'EditSchFinishDate')
                            AS display_finish_date,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'NoEditTaskManager',
                                 'EditTaskManager')
                            AS display_task_manager,
                         DECODE (object_type, 'PA_STRUCTURES', '0', wbs_number)
                            AS outline_number,
                         element_number AS formatted_task_number,
                         element_name AS formatted_task_name,
                       --  progress_comments AS formatted_progress_comments,
                       --  scheduled_start_date AS formatted_start_date,
                      ---   scheduled_finish_date AS formatted_finish_date,
                         task_manager AS formatted_task_manager,
                      ---   status_icon_active_ind,
                       --  percent_complete_id,
                       ---  status_icon_ind,
                         NULL AS task_manager_raw,
                         DECODE (
                            task_manager,
                            NULL,
                            DECODE (summary_element_flag,
                                    'Y', '<B>' || task_manager || '</B>',
                                    task_manager)
                            AS task_manager_raw_no_link,
                         status_code,
                         status_code_meaning,
                         priority_code,
                         priority_description,
                         organization_id,
                         organization_name,
                      --   include_in_proj_prog_rpt,
                         description,
                         OBJECT_RELATIONSHIP_ID,
                         OBJECT_REC_VER_NUMBER,
                      --   pev_schedule_id,
                         parent_element_version_id,
                         STRUCTURE_TYPE_CLASS_CODE,
                         link_task_flag,
                         DISPLAY_PARENT_VERSION_ID,
                         parent_ver_rec_ver_number,
                        -- actual_start_date,
                        -- actual_finish_date,
                       --  estimated_start_date,
                      --   estimated_finish_date,
                      --   completed_percentage,
                      ---   as_of_date,
                       ---  report_version_id,
                         baseline_start_date,
                         baseline_finish_date,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'NoLinkedTaskName',
                                 'LinkedTaskName')
                            AS Linked_Task_name,
                         pm_source_name,
                         pm_source_code,
                         pm_source_reference,
                         DECODE (NVL (pm_source_name, 'Y'),
                                 'Y', NULL,
                                 pm_source_reference)
                            AS display_pm_source_ref,
                         element_name || ' (' || element_number || ')'
                            AS task_name_number,
                       --  est_sch_start_var,
                       ---  est_sch_finish_var,
                        -- act_sch_start_var,
                       --  act_sch_finish_var,
                       ---  sch_bsl_start_var,
                      ---   sch_bsl_finish_var,
                         DECODE (object_type,
                                 'PA_STRUCTURES', 'NoLinkTaskNameNumber',
                                 'LinkTaskNameNumber')
                            AS linked_task_name_number,
                      --   critical_flag_meaning,
                      --   milestone_flag_meaning,
                         work_telephone,
                         service_type_meaning,
                         service_type_code,
                         work_type_name,
                         work_type_id,
                         chargeable_meaning,
                         chargeable_flag,
                         billable_meaning,
                         billable_flag,
                         receive_project_invoice_m,
                         receive_project_invoice_flag,
                         transaction_ctrl_start_date,
                         transaction_ctrl_finish_date,
                       --  prior_percent_complete,
                      --   progress_brief_overview,
                      ---   SCHEDULE_AS_OF_DATE,
                    ----     TRANSACTION_AS_OF_DATE,
                   ---      BASELINE_AS_OF_DATE,
                     ---    ESTIMATE_AS_OF_DATE,
                      --   ACTUAL_AS_OF_DATE,
                         ACTIVE_TASK_MEANING,
                         DAYS_TO_SCH_START,
                         DAYS_TO_SCH_FINISH,
                         FINANCIAL_TASK_FLAG,
                       ---  DAYS_TO_ESTIMATE_START,
                       --  DAYS_TO_ESTIMATE_FINISH,
                       --  DAYS_SINCE_ACT_START,
                        -- DAYS_SINCE_ACT_FINISH,
                        -- FINISHED_TASK_FLAG,
                        -- FINISHED_TASK_MEANING,
                         TASK_CREATION_DATE,
                         LOWEST_TASK_MEANING,
                         TASK_TYPE_ID,
                         TASK_TYPE,
                         TASK_STATUS_CODE,
                         TASK_STATUS_MEANING,
                       --  PHASE_CODE,
                        -- PHASE_CODE_MEANING,
                        -- PLANNED_EFFORT,
                       --  WEIGHTING_PERCENTAGE,
                        -- SCHEDULED_DURATION_DAYS,
                        -- BASELINE_DURATION_DAYS,
                        -- ESTIMATED_DURATION_DAYS,
                        -- ACTUAL_DURATION_DAYS,
                         ADDRESS_ID,
                         ADDRESS1,
                         ADDRESS2,
                         ADDRESS3,
                         ADDRESS4,
                       --  WQ_ITEM_CODE,
                       --  WQ_ITEM_MEANING,
                        -- WQ_UOM_CODE,
                        -- WQ_UOM_MEANING,
                        -- WQ_PLANNED_QUANTITY,
                        -- ACTUAL_WQ_ENTRY_CODE,
                        -- ACTUAL_WQ_ENTRY_MEANING,
                        -- PROG_ENTRY_ENABLE_FLAG,
                        -- PERCENT_COMP_ENABLE_FLAG,
                        -- REMAIN_EFFORT_ENABLE_FLAG,
                        -- TASK_PROGRESS_ENTRY_PAGE_ID,
                        -- PAGE_NAME,
                        -- BASE_PERCENT_COMP_DERIV_CODE,
                        -- BASE_PERCENT_COMP_DERIV_M,
                        -- WQ_ENABLE_FLAG,
                         --PROG_ENTRY_REQ_FLAG,
                            address1
                         || ''
                         || address2
                         || ''
                         || address3
                         || ''
                         || DECODE (address4, ' , , ', '', address4)
                            work_site_full_address,
                         STRUCT_PUBLISHED_FLAG,
                         --ACTUAL_WORK_QUANTITY,
                        -- ESTIMATED_REMAINING_EFFORT,
                        -- VERSIONING_ENABLED_FLAG,
                         ---PHASE_VERSION_ID,
                         project_name,
                         project_number,
                         TASK_UNPUB_VER_STATUS_CODE,
                         DECODE (summary_element_flag, 'Y', 1, 0) AS leaf_task_flag,
                         0 AS PROJ_LEVEL_DISABLE_FLAG,
                         child_element_flag,
                         OPEN_ISSUES,
                         OPEN_CHANGE_DOCUMENTS,
                        -- phase_name,
                        -- days_until_scheduled_finish,
                         DECODE (TASK_UNPUB_VER_STATUS_CODE, 'TO_BE_DELETED', 1, 0)
                            AS to_be_deleted_image,
                         'WorkInfo' AS task_manager_called_page,
                         '-1' AS task_manager_resource_id,
                         OPEN_CHANGE_REQUESTS,
                         OPEN_CHANGE_ORDERS,
                         0 AS structure_type_flag,
                         DECODE (
                            PA_PROJ_ELEMENTS_UTILS.IS_LOWEST_LEVEL_FIN_TASK (
                               project_id,
                               element_version_id,
                               'N'
                            'N',
                            'Y',
                            'N'
                            AS FinChildElementFlag,
                         DECODE (
                            PA_PROJ_ELEMENTS_UTILS.CHECK_IS_FINANCIAL_TASK (
                               proj_element_id
                            'N',
                            1,
                            0
                            txn_dates_flag
                  FROM   pa_fin_structures_tasks_v) QRSLT
    ORDER BY   display_sequencePlease suggest how to get this done, this is oracle seeded module.
    Ashish

    Hi Ashish,
    Please check with vo.getRowCount();how many results are being fetched by vo.else substitute the vo to get vo,setMaxfetchSize().I'm not sure.Please check with this.I will be very glad if you let me know.
    Best Regards
    Krishna Priya Bandyopadhyay

  • Get the Number of rows or set the number of rows dynamically (internal tab)

    Hi,
    question pls see subject ?
    Regards
    sas

    Hi,
    Use the method describe_by_data of the class cl_abap_structdescr. this will give you a refernce of the class type descriptor class and you need to down cast it to a more specifc class of cl_abap_structdescr.
    Once you get the correct reference, you can use the components attribute and you will get a list of all the fields of that table.
    DATA: BEGIN OF line OCCURS 0,
            col1 TYPE i,
            col2(10) TYPE c,
            col3 TYPE i,
          END OF line.
    FIELD-SYMBOLS : <itab_line> TYPE ANY.
    DATA : BEGIN OF t_comp OCCURS 0,
            comp(5) TYPE c,
           END OF t_comp.
    DATA : l_struc TYPE REF TO cl_abap_structdescr.
    DATA : l_typedesc TYPE REF TO cl_abap_typedescr.
    DATA : lt_comp TYPE abap_compdescr_tab,
           w_comp LIKE LINE OF lt_comp.
    line-col1 = 11.line-col2 = 'SAP'.line-col3 = 33.
    APPEND line.
    line-col1 = 44.line-col2 = 'P.I.'.line-col3 = 66.
    APPEND line.
    ASSIGN line TO <itab_line>.  " Refer of the table is passed to the field symbol
    *Call the static method of the structure descriptor describe_by_data
    CALL METHOD cl_abap_structdescr=>describe_by_data
      EXPORTING
        p_data      = <itab_line>
      RECEIVING
        p_descr_ref = l_typedesc.
    *The method returns a reference of  a type descriptor class therefore
    *we need to Cast the type descriptor to a more specific class i.e
    *Structure Descriptor.
    l_struc ?= l_typedesc.
    *Use the Attribute COMPONENTS of the structure Descriptor class to get
    *the field names of the structure
    lt_comp = l_struc->components.
    data l_components.
    describe table lt_comp lines l_compoents.  " count the components
    Write : 'Table has ', l_component, ' fields.'.
    Hope this helps.
    regards,
    Advait

  • How to set the number of rows displayed in a classical report at runtime?

    Hi,
    Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
    I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
    Regards, Tamas

    The link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
    It sounds like you have been trying to enter&mdash;unsuccessfully&mdash;an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application.

  • How do I limit the number of rows retrieved at a time using RefCursor?

    I have a PL/SQL package in use, that returns a REF CURSOR. This is currently being used in a Forms 6i application. Now I want to develop an ASP.NET web application that displays exactly the same information as my Forms 6i module. In fact those two applications will be used concurrently for a while.
    I looked at the sample code provided on otn.oracle.com and decided to use the OracleDataAdapter.Fill()-method to fill a dataset and bind that dataset to a pageable GridView. Now I wonder, whether this method retrieves ALL records of the query at once and how I can limit the number of rows fetched? The Select statement retrieves up to 10000 rows at a time. Most of the time, a user is only interested in the first 20-30 rows. Forms 6i fetches more rows as the user scrolls down, how can I implement the same behavior in ODP.NET?
    - Markus

    Excuse me, but the reply does not quite answer my question. Maybe I did not explain my concerns clear enough:
    I understand the use of the two properties (RowSize and FetchSize) to reduce the amount of round trips needed to transfer the data - not the number of rows fetched in total. This would still lead to a situation where all rows are transferred, when I am using the OracleDataAdapter.Fill()-Method. Is this correct or did I misunderstand the function of this method?
    I quote the otherwise really helpful article you send me:
    Of course, there is a cost if the fetch size is arbitrarily large. More client-side memory and processor cycles will be needed to store and manage a larger amount of data. The goal is to find a high-performing balance between the number of round trips and the amount of data retrieved per trip.
    My RowSize is for sure a bit larger than the one in the given example. The query will probably be used by up to 100 users at a time, so I would like to limit the resource-costs not only on the network by the number of round trips, but also on the web-server which is storing all these records in it's memory per user-request.

  • How to get the number of rows in a report region

    Hi all,
    Is there a way to get the number of rows returned in a report region, without issuing an additional "select count(*) from some_table"?
    I mean something like the substitution string #ROW_NUM# but for the total rows.
    Thanks,
    Pedro.

    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/ui.htm#CHDDGGEG
    For classic report regions, the region footer supports the following substitution strings:#ROWS_FETCHED# shows the number of rows fetched by the Oracle Application Express reporting engine (the page size). You can use these substitution strings to display customized messages to the user. For example:
    Fetched #ROWS_FETCHED# rows in #TIMING# seconds.
    *#TOTAL_ROWS# displays the total number of rows that satisfy a SQL query used for a report.*
    #FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED# display the range of rows displayed. For example:
    Row(s) #FIRST_ROW_FETCHED# through #LAST_ROW_FETCHED# of #ROWS_FETCHED# displayed>
    Ta,
    Trent

  • Count the number of rows in an array

    Hi there,
    I'm quite new with Labview, maybe somebody can help me.
    I have a .vi that controls two pump with certain ratios (to make a composition gradient). I export the data to an ascii file, which write the displacement of the two pumps in 2 colums. However, the number of rows is related to the ms-counter, and thus related to the processor of the computer. Now I need, at the end of the vi, to get the number of rows written to the ascii file, to do some further calculations. Does anybody know how to do this?!
    Thanks

    You could wire the loop-counter to a variable outside the loop, so you can see the number of iterations (don't forget to add 1).
    You also can use the Array Size-Function. Here you get different outputs, according to the dimensions of the array to get the size of.
    Here you can see what you get if you use this function:
    1D-Array: one value
    2D-Array: array, item 0 = number of rows, item 1 = number of columns
    3D-Array: array, item 0 = number of pages, item 1 = number of rows, item 2 = number of columns
    So if (in your case) you wire a 2D-Array you can use the array-size function, select item 0 of the array you get and you get the number of rows.
    You can also have a look at the attachement.
    Hope it helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    ArraySize.vi ‏17 KB

  • Get the number of rows returned by a dataProvider

    hi
    I am using a [Bindable] variable that I am setting and using
    as a DataProvider (coming from a web service) for a DataGrid within
    my Flex 2 application.
    is there a way of knowing the amount of rows that the
    dataProvider is returning???
    as I want to do a calculation to set the height of the
    dataGrid depending on the amount of rows being returned by the
    dataGrid!
    any suggestions...?
    Thanks,
    Jon.

    that only seems to count the default number of rows (height)
    of the datagrid..... i.e. 7.
    I need to know the number of rows being returned from the
    dataProvider - i.e. the number of rows coming through the
    webService from the database etc.....
    Thanks,
    Jon.

  • Count the number of rows resulting from a select statement

    Hi,
    Is there any way of counting the number of rows resulting from a select statement. i.e I have a select distinct statement and I then want to perform an IF statement on the number of rows resulting from the select statement.
    Any help appreciated
    Thanks
    Gary

    Declare
    var1 number;
    Begin
    select count(distinct column_name) into
    var1 from table_name;
    If var1 > x Then
    End IF;
    End;
    Hope I understood the problem correctly
    null

  • Number of rows returned by the resultset is wrong

    Hi All,
    I have pasted the code i used for JDBC. The problem is the number of rows returned by the resultset is 5 times that of the original data. Is something wrong with my code. Can anyone pls point out the mistake I have done if any.
        public ArrayList dataBreakup(String team, int monthNo, int year) {         String sqlDataBreakup = "";         Connection con1 = null;         Statement stmt = null;         ResultSet rs = null;         ArrayList data = new ArrayList();         int noRows = 0;         Calendar cal = Calendar.getInstance();         Calendar cal2 = new GregorianCalendar(cal.get(Calendar.YEAR), monthNo, 1);         int days = cal2.getActualMaximum(cal2.DAY_OF_MONTH);         String start_date = "01-Jan-" + year;         String end_date = days + "-" + monthName[cal2.get(Calendar.MONTH)] + "-" + cal2.get(cal2.YEAR);         System.out.println("START: " + start_date);         System.out.println("END: " + end_date);         databaseConnection dbObject = new databaseConnection();         try {             con1 = dbObject.GetConnection();             stmt = con1.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);             sqlDataBreakup = "Select * from EXPENSE_STORE WHERE " +                     "team='" + team + "'AND category != 'Pending PO''s' AND ACCOUNTING_DATE " +                     "BETWEEN to_date('" + start_date + "') AND to_date('" + end_date + "')";             rs = stmt.executeQuery(sqlDataBreakup);                         ResultSetMetaData rsmd = rs.getMetaData();             int numColumns = rsmd.getColumnCount();             data.add(numColumns);             for (int i = 1; i < numColumns + 1; i++) {                 data.add(rsmd.getColumnName(i));             }                        while (rs.next()) {                                noRows++;                 for (int i = 1; i < numColumns + 1; i++) {                     switch (rsmd.getColumnType(i)) {                         case java.sql.Types.NUMERIC:                             data.add(rs.getFloat(i));                             break;                         case java.sql.Types.DATE:                             data.add(rs.getDate(i));                             break;                         default:                             data.add(rs.getString(i));                             break;                     }                                    }                     }             data.add(1, noRows);             rs.close();         } catch (SQLException SQLe) {             System.out.println("DumpData() : SQL Exception" + SQLe.getMessage());             SQLe.printStackTrace();         } catch (Exception e) {             System.out.println("DumpData() : Other Exception");             e.printStackTrace();         } finally {             dbObject.CloseConnection(con1);         }         return data;     }
    Thanks
    Cheers N...

    Only thing i can say is
    try the following
    replace your function by this one and tell us the console output of the same
    public ArrayList dataBreakup(String team, int monthNo, int year) {
            String sqlDataBreakup = "";
            Connection con = null;          
            ArrayList data = new ArrayList();
            int noRows = 0;
            Calendar cal = Calendar.getInstance();
            Calendar cal2 = new GregorianCalendar(cal.get(Calendar.YEAR), monthNo, 1);
            int days = cal2.getActualMaximum(cal2.DAY_OF_MONTH);
            String start_date = "01-Jan-" + year;
            String end_date = days + "-" + monthName[cal2.get(Calendar.MONTH)] + "-" + cal2.get(cal2.YEAR);
            System.out.println("START: " + start_date);
            System.out.println("END: " + end_date);
            System.out.println("START: " + start_date);
            System.out.println("END: " + end_date);
            databaseConnection dbObject = new databaseConnection();
            try {
                con = dbObject.GetConnection();          
                sqlDataBreakup = "Select * from EXPENSE_STORE WHERE " +
                        "team = '"+team+"' AND category != 'Pending PO''s' AND ACCOUNTING_DATE " +
                        "BETWEEN to_date('"+start_date+"') AND to_date('"+end_date+"')";
                   System.out.println("-----------sql starts---------------");
                   System.out.println(sqlDataBreakup);
                   System.out.println("-----------sql ends---------------");
                PreparedStatement pstmt = con.prepareStatement(sqlDataBreakup);
                   pstmt.setString(1, team);
                pstmt.setString(2, start_date);
                pstmt.setString(3, end_date);
                ResultSet rs = pstmt.executeQuery();
                ResultSetMetaData rsmd = rs.getMetaData();
                int numColumns = rsmd.getColumnCount();
                data.add(numColumns);
                for (int i = 1; i < numColumns + 1; i++) {
                    data.add(rsmd.getColumnName(i));
                while (rs.next()) {
                    noRows++;
                    for (int i = 1; i < numColumns + 1; i++) {
                        switch (rsmd.getColumnType(i)) {
                            case java.sql.Types.NUMERIC:
                                data.add(rs.getFloat(i));
                                break;
                            case java.sql.Types.DATE:
                                data.add(rs.getDate(i));
                                break;
                            default:
                                data.add(rs.getString(i));
                                break;
                //data.add(1, noRows);
                   System.out.println("no of Rows : " +noRows );
            } catch (SQLException SQLe) {
                System.out.println("DumpData() : SQL Exception" + SQLe.getMessage());
                SQLe.printStackTrace();
            } catch (Exception e) {
                System.out.println("DumpData() : Other Exception");
                e.printStackTrace();
            } finally {
                dbObject.CloseConnection(con);
            return data;
        }and try running the sql printed on the screen in your db and then let us know the result.
    in this code i have removed some of your code in order to simplify the problem.

  • Displayin message and fixing the number of rows in a table

    Hi Experts,
    I have a requirement like this
    there is a table, where i need to diplay a message when there are no records and no rows should be visible on that table.
    Also, when the records are populated from the context, i need to fix the number of rows in that table and display the records.
    Please let me know hw this can be achieved.
    Also in the table I have Link to URL, please let me know how to handle this reference, when i set the reference Property, its giving me an error stating that the file doesn't exist when the table gets loaded.
    Thanks in Advance
    Regards,
    Palani

    Hi
    Oh!!  You should to  explain it at first thread itself that you want to display a JPG imange or other WDWebResourceTypetaken form the backend.
    1. So this is not at all a URL
    2. You have to convert binary data to WDWebResource then display it in either Image UI element or other (like PDF , txt etc)
    3
    try
                   //        Read the datasource of the FileUpload
                   IWDResource res = wdContext.currentContextElement().getResource();
                   InputStream in = res.read(false);
                   ByteArrayOutputStream bOut = new ByteArrayOutputStream();
                   int length;
                   byte[] part = new byte[10 * 1024];
                   while ((length = in.read(part)) != -1)
                        bOut.write(part, 0, length);
                   in.close();
                   bOut.close();
                   IPrivateUploadCompView.IImageTableElement ele = wdContext.nodeImageTable().createImageTableElement();
                   ele.setImage(wdContext.currentContextElement().getResource().getUrl(0));
                   ele.setText(res.getResourceName());
                   wdContext.nodeImageTable().addElement(ele);
              catch (Exception e)
                   wdComponentAPI.getMessageManager().reportWarning(e.toString());
    Here I assume that you convert that data to IWDResource type or
    4.
    WDWebResource.getWebResource(wdContext.currentContextElement().getresource(), type);
    // getResource of type binary which u read from BAPI and set it in local context , type is MIMETYPE or hardcode it as "JPG"
    5. Further help
       [Help1|To Displayan Image in Webdynpro Java from Standard Function Module;
    [Help2|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumentstobeusedinWeb+Dynpro]
    [Help3|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumenttobeusedinWeb+DynPro]
    It might code look strange at first , please do some reserch in SDN ,I did my best at this level.
    Best Regards
    Satish Kumar

Maybe you are looking for

  • Bought a MBA and am trying to keep iTunes files on an external hard drive. Having problems.

    Hi, I bought a MBA 13" and want to keep my iTunes files on an external hard drive to save space.However, I keep running into problems. I can't get the iTunes Media folder to stay on the folder in my external hard drive. Whenever I unplug it, regardle

  • Report download to system as txt FILE.

    Hi All, My Requirement is to download the report output as .txt file in the local PC. As of now i am using fm WS_DOWNLOAD to download. But what is the problem is that the formatting and the positioning is diffrent from the report and the txt file. I

  • VSTO Tools for Office 2012 will not install

    I am trying to install VSTO 2012 on a Windows 7 machine and get the following errors.  When I got the access denied error for the file 1343597488.xml.temp I attempted a couple of things.  One was to create a file with these extensions in the folder t

  • How to you "publish" Bonjour Shared printers using Workgroup Manager?

    Dear Friends, Hello. We have just spend considerable time setting up Mac OS X 10.6.4 server to host some printers to our Mac clients (previously we had used a Windows print server but it was too slow and inflexible). We have the printers we need set-

  • Record entry date - using system date as default not working

    Hi, I have a form which allow users to enter the information... I want to have a field to save the date when they've updated the record... in order to accomplish the above, here is what I did: 1) I created an item on the form (put the source as table