Query Result with pagination problem

I have a region that has a search field with a "Go" button which runs a report based on a SQL Query(PL/SQL function body returning SQL query). Works great and displays the default of 15 rows with a pagination scheme of "Row Ranges X to Y of Z(with pagination)". The problem is that when I click on the "Next rows ... " link the screen goes blank and I have to click on the "Go" button before it displays the next 15 rows. How do I get around this problem of having to click on the "Go" button?
thanks
John

Hi John,
I am also facing the same problem. Any solution has been found out by you.
If so, please give it in the forum know.
Thanks in advance
kavitha l

Similar Messages

  • Script for Save Options- Save Query Results with document

    Hi,
    Is there any javascript for Save query results with document in save options? If so where can i find that?
    Thanks
    Kalai

    hi guys,
    I found the answer.The following example shows you how to save the results with the query
    section named “SalesQuery”.
    ActiveDocument.Sections["SalesQuery"].SaveResults=true

  • Numbering query results with a line number in SQL*Plus

    Doesn't it stand to reason that in SQL*Plus there would be a way to number each query results sequentially with line numbers starting at 1 to n -- something option like from a SET command? I'm not talking about linesize.

    There's a column rownum the engine adds into the result sets, just add it to the select list. Can use it to limit the result set (with some limitations) i.e.:
    select rownum, ... from ... where rownum <= 100
    Can't use ">=", that condition will never be met but a subset could be used:
    select * from ( select rownum as linenr, tab1.* from ... ) where linenr between 10 and 20

  • Incorrect query results with conformResultsInUnitOfWork

    Hi,
    has anybody experienced this:
    Take two classes User and Group
    Group has a 1:n Mapping to User (attribute users)
    User has a 1:1 Mapping to User (attribute partner).
    Following query returns too many objects
    User user1 = someUserObject;
    ReadAllQuery readAllQuery = new ReadAllQuery(Group.class);
    Expression e = builder.anyOf("users").get("partner").equal(user1);
    readAllQuery.setSelectionCriteria(e);
    readAllQuery.conformResultsInUnitOfWork();
    Vector vector = (Vector) unitOfWork.executeQuery(readAllQuery);
    It returns
    - the correct Group object as determined from the sql query +
    - any other objects of the same class that are fully instantiated (users is instantiated and for each user, partner is instantiated), even if they don't conform to the expression.
    The same query works properly ;
    - without conformResults
    - or if the other objects are not fully instantiated

    Hi,
    we need an workaround badly and the support is moving at exactly the rate I feared it would.
    So I thought, since we only hit this bug with existing objects and we use conformResultsInUnitOfWork because we want to find the newly created objects, is there a way to get
    - the SQL Query results
    + any new objects that conform to the query
    We still might get new objects that don't conform to the query (this is the bug) but I'll worry about that later if it happens.
    My first attempt at a solution looks like this:
    1. turn off conformResults
    2. manually add all new objects that conform to the query
    I had to guess a little for 2, since I don't know what exactly toplink does to select the "conform" objects.
    private static List findConformNewObjects(UnitOfWork unitOfWork, ReadAllQuery query) {
    List result = new ArrayList();
    Class resultClass = query.getReferenceClass();
    Expression selectionCriteria = query.getSelectionCriteria();
    Enumeration enumeration;
    IdentityHashtable newObjectsCloneToOriginal = unitOfWork.getNewObjectsCloneToOriginal();
    if (newObjectsCloneToOriginal != null && newObjectsCloneToOriginal.size() > 0)
    enumeration = newObjectsCloneToOriginal.keys();
    while (enumeration.hasMoreElements())
    Object o = enumeration.nextElement();
    if (resultClass.isInstance(o))
    if (selectionCriteria != null && selectionCriteria.doesConform(o, unitOfWork, null, query.getInMemoryQueryIndirectionPolicy()))
    result.add(o);
    return result;
    Does this look OK to you? Is there a better way to do it?
    Ana

  • Copy BW query results with formatting

    When copying a query's results to another workbook, the formatting (namely coloring) changes.  Is there any way to copy the query results to a new workbook and keep the exact same formatting as in original query?

    One way to do this would be to copy the worksheet with the results to the other workbook, as follows:
    Edit --> Move or copy sheet... --> change "To book:" to the 2nd workbook --> check "Create a copy" option --> OK
    After doing that, you can cut & paste from the copied worksheet to other worksheets in the workbook, if necessary, and the formatting will be maintained.
    Hope this helps...
    Bob

  • Problems in query result with infoset and timedep infoobject

    Hi,
    I have the following situation:
    infoobject ZEMPLOYEE timedep
    Infocube 0C0_CCA_C11 (standard cost center/cost element postings)
    -> infoset with infoobject and infocube linked with outer join
    My query should show all active employees in one month without any posting in the infocube.
    My testdata looks like this:
    pernr date from    date to         cost center
    4711  01.01.1000 31.12.2002
    4711  01.01.2003 31.01.2009   400000
    4711  01.02.2009 31.12.9999
    That means the employee is only active between 01.01.2003 and 31.01.2009.
    I expect the following result in the query with key-date 31.01.2009:
    4711  01.01.2003 31.01.2009   400000
    I expect the following result in the query with key-date 01.02.2009:
    no result
    -> because the employee is not active anymore, I don't want to see him in the query.
    My query delivers the following result:
    4711  01.02.2009 31.12.9999
    The first and the last entry in master data is automatically created by the system.
    I tried to exclude the not active employees by selection over cost center in the filter (like cost center between 1 and 9999999, or exclude cost center #). But unfortunately the filter selection does not work, because obviously the attributes are not filled in the last entry.
    Is there anyone who can tell me how I can exclude the last entry in the master data in the query?
    Any help is much appreciated! Points will be assigned!
    best regards
    Chris

    HI,
    problem is that I can't use employe status in this case, beacuse for any reason the people don't use it.
    I have also tried with exceptions and conditions, but the attributes ar enot filled, so it seems that nothing works.
    Do you have any other suggestions?
    Thanks!
    best tregards
    Chris

  • Incorrect query result with Top N condition and two structures

    Hi,
    I have created a query on a FI-GL infocube with the characteristic 0BUS_AREA in rows and two structures in columns. The first structure has two items / selections (each item is a selection of several GL accounts). The second structure has two items (the first one contains the key figure 0BALANCE for the current period and the second item is a formula that calculates the absolute value of the first item. The first item is hidden). The (simplified) result looks like this (sorry, not very pretty!):
    Business Area Clients Clients fae
    Business Area1 10 15
    Business Area2 20 7
    Business Area 3 15 8
    Overall result 45 30
    I then added one condition using the Top N operator. The condition is defined for all the elements of the structures. When I execute the query, I sometimes obtained an incorrect number of Top N records selected. The problem seems to occur when N is greater than the number of available Business Areas for an element of the structure.
    For example, if N = 8 and data only exists for 5 Business Areas for the structure element Clients, I may end up with 10 Business Areas for the second structure element Clients fae when I only expect 9 (i.e. the top 8 Clients fae + 1 of the Top 8 Clients for which there is no data under Clients fae).
    Has anybody encoutered that kind of problem ?
    Many thanks.
    François.

    Pascal,this is a known behavior with conditions.When you apply condition it just hide the extra rows and it does not impact the result row.So your result row actually shows the value irrespective of the condition you apply.
    Now with the help of local functions like calculate result as summation you can show the correct sum after applying the condition but when you try to use that result in some calculation then it takes the original value thereby discarding the calculated value.
    Same is happening in your case as well.Its taking the original value i.e 350 and not the calculated sum after condition i.e 270.
    Hope this helps.
    Regards,
    AL

  • Query results to Excel problems

    I'm trying to get results from a ColdFusion query called q to go into an Excel file.
    There are 2 things going wrong.
    1. An Excel message comes up that says "The file you are trying to open 'stc.xls', is in a different format than specified by the file extension..."
    2. character values in col1 01,02,03,... are coming over to Excel as numbers 1,2,3,...
    How do I fix those 2 things ?
    This is the way I'm trying to do it.
    <cfsetting enablecfoutputonly="yes">
    <cfcontent type="application/msexcel">
    <cfheader name="Content-Disposition" value="filename=test.xls">
    <cfoutput>
       <table>
          <cfloop index="ii" from="1" to="#q.recordcount#">
             <tr>
                <td>
                  #q.col1[ii]#
                </td>
                <td>
                  #q.col2[ii]#
                </td>
             </tr>
          </cfloop>
       </table>
    </cfoutput>

    Dan Bracuk wrote:
    Using html table tags stopped working when MS introduced Office 2007.  Use cfspreadsheet instead.
    It is not that it stopped working. Excel 2007 introduced extension hardening for increased security. So Excel warns you when the file content does not match the file extension, such as your code where cfheader claims it is an *.xls file but the content is actually html.
    Users can still open the file, they will just get a warning first. The only way to prevent the warning is to a) disable the registry setting which controls the behavior OR b) ensure the content matches the file extension. For example, generating a true Excel file with cfspreadsheet or the POIUtility.  Another option is to generate an Excel xml file. IIRC, Ben Nadels blog also has some good articles on that as well.

  • SQL Query Result with Random Sorting

    Hi Experts,
    My Oracle Version : Oracle9i
    I have three tables which are given below,
    Table Name:     check_team
    team_id      team_code
    100          A
    101          B
    102          C
    103          D
    Table Name:     check_product
    product_id     product_code
    1          XXX
    2          XYZ
    Table Name:     check_team_products
    tprod_id     tprod_team_id     tprod_product_id
    1          100          1
    2          100          2
    3          101          1
    4          101          2
    5          102          1
    6          102          2
    7          103          1
    8          103          2
    Required Output First Time:
    team_id   team_code   product_id   product_code
    100       A           1             XXX
    101       B           2             XYZ
    102       A           1             XXX
    103       B           2             XYZ
    Required Output Second Time:
    team_id   team_code   product_id   product_code
    100       B           2             XYZ
    101       A           1             XXX
    102       B           2             XYZ
    103       A           1             XXXI need the result as Required Output specified above and also the result has to be random too.. Can someone help me in writing a SQL Query to get results as that?
    Added Oracle Version

    So, is it something like this you want?
    SQL> ed
    Wrote file afiedt.buf
      1  with check_team as (select 100 as team_id, 'A' as team_code from dual union all
      2                      select 101, 'B' from dual union all
      3                      select 102, 'C' from dual union all
      4                      select 103, 'D' from dual)
      5      ,check_product as (select 1 as product_id, 'XXX' as product_code from dual union all
      6                         select 2, 'XYZ' from dual)
      7      ,check_team_products as (select 1 as tprod_id, 100 as tprod_team_id, 1 as tprod_product_id from dual union all
      8                               select 2, 100, 2 from dual union all
      9                               select 3, 101, 1 from dual union all
    10                               select 4, 101, 2 from dual union all
    11                               select 5, 102, 1 from dual union all
    12                               select 6, 102, 2 from dual union all
    13                               select 7, 103, 1 from dual union all
    14                               select 8, 103, 2 from dual)
    15  --
    16  -- end of test data
    17  --
    18  select team_id, team_code, product_id, product_code
    19  from (
    20        select t.team_id, t.team_code, p.product_id, p.product_code
    21              ,row_number() over (partition by team_id order by dbms_random.random()) as rn
    22        from check_team t join check_team_products tp on (tp.tprod_team_id = t.team_id)
    23                          join check_product p on (p.product_id = tp.tprod_product_id)
    24       )
    25* where rn = 1
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          2 XYZ
           101 B          1 XXX
           102 C          2 XYZ
           103 D          1 XXX
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          2 XYZ
           101 B          1 XXX
           102 C          2 XYZ
           103 D          1 XXX
    SQL> /
       TEAM_ID T PRODUCT_ID PRO
           100 A          1 XXX
           101 B          2 XYZ
           102 C          1 XXX
           103 D          1 XXX

  • Question about different query results with wildcard

    Hi, I'm working with a third party app on SQL Server 2000, and from what I can gather, programmed in C# & VisualFoxPro.
    When we search with
        Note contains 94949
    we get 571 results, when we search with
        Note contains 94949*
    we get 575 results.
    There should be at least a hundred different entries that start with "94949-1" so I expected the query with the wildcard to return something like 680 results, not an additional four rows.
    Searching with
        Note contains 94949-1*
    got 483 results
        Note contains 94949-10*
    got 0 results
    Could someone explain or point me to more documentation on the difference results we get?
    Thanks

    Hi Arnie, thanks for your response.
    My situation is more basic than what appears in your example. Unfortunately, I am working solely through this application so I do not have access to the SQL to test out what you supplied, so my question is more of a need for an explanation of the search results. I do find lots of references to LIKE, Wildcards and pattern matching, but I don't find a way to explain to the users the best and most complete way to search. They mostly need a "this will always get us the results without missing anything" search technique and then to be able to select from a smaller group. I guess I need a basic course in understanding search results: how to get different ones and what they mean.
    Using 
            Note contains 94949-'%'
    returned one more result than when using an asterisk. I don't understand this difference.
            Note contains 94949-'%1'   or
            Note contains 94949-'1%'
    brings nothing nor does not using quotes. But there are hundreds of records which have the string starting with 94949-1 and a varying number of characters after that.
    ?Does the dash read not as a character in the string but as an expression?
    When I use WITHIN 3 characters, I get too few results (eight). If I use AND, I get text unrelated to the account number I am looking for.
    Again when I tried to narrow the search by adding one digit to the string to be matched, I did not get any results, but 500 results from the more general search is too much to scan by opening individual records.
    Thanks for pondering this with me.

  • Combine two Query Results with Rank

    Dear All,
    I am business analyst working DB for first time:
    I have two queries:
    1)
    select * from (select "CAFNo","ActionDate","ActionDetail", rank() over (partition by "CAFNo" order by "ActionDate") rnk,
    from "ABC"
    where "ActionDetail"
    like 'CRF successfully submitted and routed to Fulfillment Team%')
    where rnk=1
    Results in
    CAFNo","ActionDate1","ActionDetail"
    2)
    select * from (select "CAFNo","ActionDate","ActionDetail", rank() over (partition by "CAFNo" order by "ActionDate") rnk
    from "ABC"
    where "ActionDetail"
    like '%Customer ID%')
    where rnk=1
    Results in
    CAFNo","ActionDate2","ActionDetail"
    I would like to combine results of two as:
    CAF no, Actiondate1, actiondate2,ActionDetail
    I tried full outer join and other options but with no success. Please help
    Please share concept of joining the two results not the actual query.

    Actually, my query is not equivalent to original. I missed ActionDetail can be something like:
    'CRF successfully submitted and routed to Fulfillment Team A by Customer ID X'Then it fits both LIKE conditions. If such case of ActionDetail is possible then:
    with t as (
                select  *
                  from  (
                         select  1 weight,
                                 "CAFNo",
                                 "ActionDate",
                                 "ActionDetail",
                                 rank() over (partition by "CAFNo" order by "ActionDate") rnk
                           from  "ABC"
                           where "ActionDetail" like 'CRF successfully submitted and routed to Fulfillment Team%'
                  where rnk=1
               union all
                select  *
                  from  (
                         select  2 weight,
                                 "CAFNo",
                                 "ActionDate",
                                 "ActionDetail",
                                 rank() over(partition by "CAFNo" order by "ActionDate") rnk
                           from  "ABC"
                           where "ActionDetail" like '%Customer ID%'
                  where rnk=1
    select  "CAFNo",
            max(
                case weight
                  when 1 then "ActionDate"
                end
               ) "ActionDate1",
            max(
                case weight
                  when 2 then "ActionDate"
                end
               ) "ActionDate2",
            max(
                case weight
                  when 1 then "ActionDetail"
                end
               ) "ActionDetail1",
            max(
                case weight
                  when 2 then "ActionDetail"
                end
               ) "ActionDetail2"
      from  t
      group by "CAFNo"
    /SY.

  • WRONG QUERY RESULT WITH REPORTQUERIES AS SUBQUERIES

    hi,
    i create a ReadAllObject - Query with
    a ReportQuery as SubQuery.
    when execute the query the result at the SubQuery
    contains the data from the database.
    the result does not contain the change of these
    data in memory of the aplication.
    method public void conformResultsInUnitOfWork()
    has no effect
    i have a simple example
    public class A{
    private int id;
    private String name;
    private Collection B = new ArrayList();
    public class B{
    private int id;
    private String name;
    private C c ;
    public class C{
    private int id;
    private String name;
    and the query is
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(A.class);
    ReportQuery subQuery = new ReportQuery(A.class, subQueryEb);
    subQuery.addAttribute("id");
    subQuery.setSelectionCriteria(eb.anyOf("B").get("C").get("name").equal("Test")));
    query.querysetSelectionCriteria (eb.get("id").notExists(subQuery));

    Conforming subqueries and report queries are not supported in memory. You should be getting an exception thrown stating this.
    Your code does not show the call to conform, make sure it is on the root query, not the subquery.

  • SQL query result with HTML Data in output

    Hello,
    I have a SQL table , in one column I store HTML data. I need to query the table and get the HTML data in the columns that have 'HREF'. The output shows as grid on the sql management studio, however when I export it to excel, the HTML data does not get copied
    correctly, since there are HTML tags etc.
    How can I export the report correctly from SQL ?

    Hello,
    The HTML data is stored in a column with datatype as nvarchar(max). Sample data in the column is shown below. It is with formatting etc and is rendered as is on the web page. the business wants to generate a quick report so that they can see the pages that
    have links displayed. I can do that by querying the columns that have a 'HREF' in the text.
    Can I get the exact HREF values using just sql query? There can be more than one links on a page.
    Also, If I just want to copy the whole column and paste it on excel, how can I do that? If I copy the data below and paste, it does not get copied in one cell.. it spreads across multiple cells, so the report does not make any sense.
    <br />
    <table border="0" cellpadding="0" cellspacing="0" style="width: 431pt; border-collapse: collapse;" width="574">
    <tbody>
    <tr height="19" style="height: 14.25pt; ">
    <td height="19" style="border: 0px blue; width: 431pt; height: 14.25pt; background-color: transparent;" width="574"><a href="https:"><u><font color="#0066cc" face="Calibri">ax </font></u></a></td>
    </tr>
    </tbody>
    <colgroup>
    <col style="width: 431pt; " width="574" />
    </colgroup>
    </table>

  • Need to hide rows in the Query results with blank values

    Hi All,
    We have a requirement like this for Stock Report, we need to display both movements and balance in that report. We display the movement data directly from the Standard cube with input as Fiscal period/year.  When we do like this, we are not able to get the opening balance as fiscal period was in char restrictions pane.
    We have created a dummy keyfigure restricted to Fiscal period ( so that the global filter is not applied and get the inventory data irrespective of fiscal period input ). We have created 3 variables of processing type customer exit and acheived calculating opening balance, current movement and closing balance.
    If FP input is 009.2010 to 010.2010, it will get whatever Qty moved before 009.2010 ( 001.1990 - 009.2010 in exit ) as opening balance and closing balance ( 001.1990 - 010.2010 )  and the Qty KF restricted with another exit varibale ( 009.2010 to 010.2010 ).
    Hope everyone understood the scenario and issue here is, though I give the input 009.2010 - 010.2010 , I get the rows displayed for different periods ( this is because I am retreiving data for all the fiscal periods but restricting it based on input ). How to restrict/hide these rows.
    Your inputs and suggestions are valued.
    Thanks,
    Chandra.

    Hi,
    Try creating a query level field which would populate as "X" (with the IF condition ) if the record falls in the period which you have given for input variable (009.2010 - 010.2010). Then place a query level filter for this field where only records with value "1" for this field is displayed.
    Hope this helps.
    Happy to help further.
    Regards
    Venky

  • Padding query results with dummy records

    I have a dashboard report that has one group and subsequest detail rows.  The detail rows consist of a string representation of a date and 6 indicators which go with that date.  My user would like to have a consistent number of records (e.g. the last 12 months) show for each group.  If there is no data available for a given period he wants to display blank indicators in the color gray.
    I am interested in any feedback for the best way to do this or if this is even possible.
    Using Crystal Xi sp2.
    Thaks in advance,
    Don

    Crystal is driven by the data it gets from the database.  It is far, far easier (IMHO) to make the database return the data to make the Crystal report straight forward than to try to force Crystal to do things driven by logic.
    Is it impossible to do in another way?  Probably not.  Is it rational to try?  Probably not! 
    BTW, I don't think there's anything in my sample SQL that wouldn't work in Oracle (but it's been a while since I used Oracle, so I could be wrong).
    HTH,
    Carl

Maybe you are looking for

  • Mac Book Pro i7 - Logging off on its own, night time, power down sleep

    Hi Everyone, I have had my Macbook pro for around 4 months now. And I have had this problem from the beginning. At night, often when I leave my machine, with software open and things active. I come back in the morning to find my mac logged off and at

  • External disk doesn't mount

    I have a La Cie external 200 Gb disk which the system profiler recognises, and which Disk Utility recognises as a DEVICE only. It does not show the disk name ie the directory below the device icon. I can't drag the device icon to the repair box on th

  • Buffalo Link Station Live

    Hi, I've got Infinity with a Home Hub 3 and the Huawei box in front of it.  Have a Buffalo Link Station on the gigabit port of the hub and all works fine - can view files from the LS on any device connecting to the hub either wired or wireless and th

  • 2 simultanious homepages with gmail no longer loading properly.

    Until just recently I was able to have 2 gmail pages/tabs open simultaneously as part of my home pages. One was my regular "[email protected]" account while the other was "[email protected]". I had this setup as my homepage and when firefox opened it

  • Multi task in Full Screen Mode on Extended Desktop?

    Hi, I want to know whether or not i can multitask while i have a full screen app running? For example, if i have a film playing full screen on my TV, using VLC Player, can i use Safari on my Macbook Pro? My current work-around is just making the vide