Display latest Record First
Hi,
Could someone tell me where in forms builder you can configure the form so the latest record is displayed first in the application.
As an example i query someones name in the application and i'd like to view the latest record saved to that person (there is a join between people and my new table). At the moment my custom form returns the first record entered against them.
Thanks
Steve
You will have to identify this record in some way, e.g. by an increasing primary key number, or a date_created column. Then you have to order by this column in descending order in your form.
Similar Messages
-
Displaying latest top 5 records...
Hi
I want to display top 5 sales records at BEx level to the newly loaded data.
Info objects are plan, date, sales currency etc..
Data can be loading and BEx report execution can be done on daily basis.
The report should display top 5 sales records of latest data load when the report is executed.
SanthoshHi
Refer Below Blog in SCN Posted By AL. Here He Explained in Detail how to Handle this Kind of scenarios.
How to show First and Latest Record at BEx Level
Regards,
Seshu.P -
Query not displaying all records when execute it first tme
Hello,
i have an issue with the WEBI report.when i run the report first time it's displaying only few records, but when i run the same report second time it's displaying the more records and it's correct.
Could any one tell me why it's not displaying all records when i execute first time.
Thanks in advance for your help.
Regards,
PrathapWhich BOBJ version do you use?
Which kind of data source are you retrieving data from?
Regards,
Stratos -
I have report in BEx where we want to find the first time a customer ordered Quantity of more than 500 in a data range (For Ex: From April 10 to April 30). In a particluar date range the customer may order more than once (Qty > 500). The catch is we want display only one first time he ordered qty > 500.
Customer Date Qty > 500.
ABC 4/21/2005 2,035 CA
4/22/2005 12,290 CA
4/23/2005 4,826 CA
4/26/2005 6,397 CA
4/27/2005 1,538 CA
4/28/2005 4,849 CA
XYZ 4/25/2005 2,000 CA
4/26/2005 12,000 CA
4/27/2005 4,500 CA
4/28/2005 6,300 CA
In the output report we want to display the first record for each customer as:
Customer Date Qty > 500.
ABC 4/21/2005 2,035 CA
XYZ 4/25/2005 2,000 CA
Your help is really appreciated. Thanks.jayant,
i think, you could use your date as a condition to filter by in your report... try looking that the properties of your KF and, under Calculations, set the 'Calculate Result as...' to the first value only.
hope this helps - don't forget to give out points. =)
ryan.
ps. i've tried this, and it sort of works - just need a bit more of tweaking around. =)
Message was edited by: Ryan Kristoffer Tan -
i am trying to display one record from my database on my jsp page per time using next and previous buttons to navigate. I have tried to implement this by putting the resultset in a vector and then tried to tried to dispaly data with no success.Please somebody help ,i been at this for two days with no success.Could someone give a concreate example to guide me
Please post all code, i dont know how to put my resultset in a vector or arraylist.
I need a First Previous next and Last link in asp it is called recordset paging or recordset navigation.
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/connEvents.jsp" %>
<%
int index = 0; //or wherever you wish to start
if((String s = request.getParameter("index")) != null)
index = Integer.parseInt(s);
%>
<%
Driver DriverrsEvents = (Driver)Class.forName(connEvents_DRIVER).newInstance();
Connection ConnrsEvents = DriverManager.getConnection(connEvents_STRING,connEvents_USERNAME,connEvents_PASSWORD);
//PreparedStatement StatementrsEvents = ConnrsEvents.prepareStatement("SELECT * FROM hog_evenementen", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
//StatementrsEvents.setFetchSize(10);
//ResultSet rsEvents = StatementrsEvents.executeQuery();
PreparedStatement StatementrsEvents = ConnrsEvents.prepareStatement("SELECT * FROM hog_evenementen");
ResultSet rsEvents = StatementrsEvents.executeQuery();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HD - Evenementen-beheer</title>
<style type="text/css">
<!--
body {
background-color: #333333;
-->
</style></head>
<script>
function post(actValue)
document.MyForm.action.value = actValue ;
document.MyForm.submit() ;
</script>
<body>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0" class="">
<tr>
<td><table width="100%" class="" border="0" cellpadding="6" cellspacing="0">
<tr>
<td width="175" align="center" valign="bottom" bgcolor="#FF6600" class="">Evenementen-beheer</td>
<td bgcolor="#333333" class=""><span class=""><span class="formField">
</span></span></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr bgcolor="#61ABD0" class="verdana10zwart">
<td width="4"> </td>
<td width="512" height="29"> <span class="">Evenementenoverzicht</span></td>
</tr>
<tr bgcolor="#61ABD0" class="">
<td> </td>
<td><table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
<tr class="">
<td width="252" class="smallText">record 1 van 1 etc moet hier komen <br></td>
<td width="231" align="left" class="smallText"><table width="50%" border="0" align="center">
<tr>
<td width="23%" align="center"> Firs </td>
<td width="23%" align="center"> <a href="index.jsp?index=<%= (index-10)%>">Previous</a></td>
<td width="23%" align="center"><a href="index.jsp?index=<%= (index+10)%>">Next</a></td>
<td width="23%" align="center">Last</td>
</tr>
</table>
<br>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td>Thema</td>
<td>Datum</td>
</tr>
<%
int rowCount = 0;
while(rsEvents.next() && rowCount < 10) {
rowCount++;
%>
<tr>
<td><a href="event_crud.jsp?ID=<%= rsEvents.getObject(ID")%">"><%= rsEvents.getObject("thema")%></a></td>
<td width="231"><%= rsEvents.getObject("datum")%></td>
</tr>
<% } %>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><form action="event_frm_process.jsp" METHOD="POST" name="MyForm" id="MyForm">
<table width="100%" border="0" cellpadding="6" cellspacing="0" class="verdana10zwart">
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td colspan="2"><span class="kop1"><br>
Evenement toevoegen </span><span class="formField"><br>
</span><br>
<span class="formField"> </span></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td width="107" class="downBorder">Thema:</td>
<td width="383" class="downBorder"><input name="thema" type="text" id="thema"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder">Omschrijving:</td>
<td class="downBorder"><textarea name="omschrijving" cols="40" rows="10" id="omschrijving"></textarea>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder">Datum:</td>
<td class="downBorder"><input name="datum" type="text" id="datum"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder">Tijd:</td>
<td class="downBorder"><input name="tijd" type="text" id="tijd"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder">Lokatie:</td>
<td class="downBorder"><input name="lokatie" type="text" id="lokatie"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder">Plaatje:</td>
<td class="downBorder"><input name="plaatje" type="text" id="plaatje"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td class="downBorder"> </td>
<td class="downBorder"><input name="insert" type="button" id="insert" onClick="post('insert');return false;" value="Evenement toevoegen"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="9"> </td>
<td>
<input name="action" type="hidden" class="" id="action" value="">
<% while(rsEvents.next()){ %>
<input name="ID" type="hidden" class="" id="ID" value="<%=rsEvents.getString("ID")%>">
<%
%>
</td>
<td> </td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
<%
rsEvents.close();
StatementrsEvents.close();
ConnrsEvents.close();
%></a> -
Latest record to get from MSEG Table
Hi frnds,
I am getting multiple records against material no. i want single record and latest one.
SELECT DISTINCT MBLNR MATNR LIFNR
FROM MSEG
INTO TABLE IT_MSEG
WHERE MATNR IN S_MATNR
ORDER BY MATNR MBLNR DESCENDING.
S_MATNR = multiple matnr
eg: matnr mblnr lifnr
test 1 abc
test 2 abc
test2 4 xyz
test3 3 abc
test3 5 vvvv
I want in my ITAB.
eg: matnr mblnr lifnr
test 1 abc
test2 4 xyz
test3 5 vvvv
Here I am sorting with mblnr to pick latest record.
How i will get.
Regards.Hi,
just do one thing if after sorting you are getting first record of latest record in each material then use
delete adjacent duplicates from itab comparing matnr.
Regards
Vijay dwivedi -
Display multiple records as sub-sections in the same report.
I am using Crystal Reports (VS-2005).
In a report, I have various sub-sections in the Details section. Each section represents a category and is connected with SQL command which uses LEFT OUTER JOIN.
The first section is the main section and the subsequent sections are the child sections.
Sometimes, a sub-section (other than the first main sub-section) picks multiple records of that category. In this case the report extends to multiple pages. Each report displays one record of this sub-section.
I want to show the the same sub-section multiple times in the same report as opposed to multiple reports that are now automatically generated by Crystal Reports.
How to handle this issue?This is a .NET programming forum related to Crystal Reports. Your question is best suited for our report design forum below. Also, when you post your question it will be helpful if you use report design terminology. We have elements like Report Header, Page Header, Groups, and Details sections. Just mentioning "sections" doesn't give us a good idea about what you are attempting to do.
Check out the grouping options and see if it helps. You might need to create a formula to help you with your grouping though.
If you like, I can move this to the design forum.
[SAP Crystal Reports Design|SAP Crystal Reports; -
Triger for display next record in oracle forms
hai all,
i want to do
when new form opened i have to add new reord that is empty new form also my new rownum will be displayed.
now i getting first record.
like:
GROUP_ROWNUM: 1
GROUP_ID: 120130
GROUP_NAME aaaaaaaaa
need like:
GROUP_ROWNUM: 7
GROUP_ID:
GROUP_NAME
that can be done by
trigger for display next record in oracle forms?
or through property seting?
thanks in adv,
rcs
--------YES, this block is base on the DB table
through defualt navigational button i can go to next,last,new record
but i want create seperate form for new entry, in that i want to display
old rownum
formula to get rownum automatically (i am not at all typing it is system generated)
even though i created column group_rownum for rownum
(i can't be typing)
LAST_RECORD;
NEXT_RECORD; also not getting the next rownum
i hope now understand me
any posible way?
thank you for your good input
i.e.
SQL> DESC GROUP_MSTR1;
Name Null? Type
GROUP_ID NOT NULL NUMBER(10)
GROUP_NAME NOT NULL VARCHAR2(30)
SQL> select * from GROUP_MSTR1;
GROUP_ID GROUP_NAME
123 AAAAAA
124 BBBBBBBB
125 CCCCCCCCC
126 DDDDDDDD
1 eeeeeeee
2 FFFFFFFFF
3 ggggggg
7 rows selected.
SQL> select rownum, GROUP_ID, GROUP_NAME from GROUP_MSTR1;
ROWNUM GROUP_ID GROUP_NAME
1 123 AAAAAA
2 124 BBBBBBBB
3 125 CCCCCCCCC
4 126 DDDDDDDD
5 1 eeeeeeee
6 2 FFFFFFFFF
7 3 ggggggg
7 rows selected.
------------- -
To display 5 records out of 10 in String array
HI ALL,
Can anybody tell how to display first 5 records initially & rest 5 next time.
this is wht i done
String [] names = { "a", "b", "c", "d","e","f","g","h","i","j" };
for(i=0;i<names.length;i++) // if i write for(i=o;i<5;i++) it display 5 records
System.out.println(names); // here display all records
i want initially to display first five records
is there other way.
actually i want this code in JSp when click on next button next 5 records will be displayedok in you action performed method were you button is clicked
you would need a global int as a pointer and local int say count
//global int pointer initially set to 0
int count =0;
while(count<5 && pointer<names.length())
System.out.println(names[pointer]);
count++;
pointer++;
}that should work.
No to sure what Jsp is though. -
I want to display many records in the same jsp page
Hi,
i want to display many records with in the same jsp page providing the next,previous,first last .
give me clear idea how to do that one
note :only using servlets,jsp,jdbc and javascriptI believe that this is the fourth time this question has been asked by the same person
http://forum.java.sun.com/thread.jspa?threadID=720977&messageID=4159465#4159465
http://forum.java.sun.com/thread.jspa?threadID=720945&messageID=4159338#4159338
http://forum.java.sun.com/thread.jspa?threadID=720919&tstart=0 -
Formula to get the latest record
Hi,
I looking to have only the last record logged displayed on my report, can any one help me with the formula ?
Sorry,
Actually to be more precise I'm looking to the latest record for each equipment (where there are many records for the equipment during the day).
Many thanks,
Andreia
Edited by: andreia silva on Dec 22, 2009 3:12 PM
Edited by: andreia silva on Dec 22, 2009 3:15 PMHi,
You could use a SQL Expression field. The following example uses the Northwind database (SQL Server) as an example.
Type the following query in the SQL Expression editor
(SELECT MAX("Orders"."OrderDate")
FROM Orders
WHERE CustomerID = Customers.CustomerID)
Then create a record selection formula:
{Orders.OrderDate} = {%datum}
{%datum} is the sql expression
When you run the report, you will see only the last order for each customer -
Select the one record with the latest record
I have the following table called tblSales:
SKU TransDate Color
=== ====== ====
123 1/1/2015 Red
123 1/2/2015 Red
123 1/5/2015 Red
123 1/1/2015 White
123 1/2/2015 White
123 1/3/2015 White
123 1/1/2015 Blue
123 1/2/2015 Blue
123 1/5/2015 Blue
I need to create a query along the lines "SELECT the latest record FROM tblSales WHERE Color = 'White''
In this example, the record dated 1/3/2015 would be the result. I know that MAX(TransDate) is used here, but not sure how.
Thanks.
KenKarl,
I had already tried that. It returns all 3 records having SKU = 123 and Color = White.
Worst case scenario is I can always search for White 123s using a query with TransDate DESC and then get the first record. I was just hoping for something a bit more elegant.
Thanks for your help though.
Ken -
ADF displaying a records details.
Hi, i am having a problem... think there is probably and easy answer that i havent tried. I have two pages, the first page posts a specific contactID to my second page using process_scope. My second page simply displays the details of this record. To create the second page i dragged an ADF form from my data control pallet according to the appropriate view object. Whenever i run this page it always displays the first record it comes to in the DB. How do i get it to display the record as according to the contactID i have put into process_scope? i have tried a number of diffrent ways without success and starting to get very frustrated. any help much appreciated!
p.s i know how to do this using executewithparams. i want the records details to be displayed automatically however, as the user doesnt want to have to press a button every time to see the details
RoddyHi,
depends on the business service you use
a) ADF Business Components
No need to pass any ID from one page to the other because row currency status is kept between two pages if they both use the same VO
b) Web Service / EJB
You need to provide a finder method that takes an ID as the input. Then on thr ADF pagedef file for the second page, you create a method binding for this method and use EL to reference the ID you put in process scope. Finally you create a invokeAction in the Executables section and point it to the method binding
Frank -
Returning latest records based on specific conditions
Hi Everyone, Thanks for everyone response for my queries. All responses are highly appreciated. I need one help in developing Sql query. I am
using Oracle 11.2.
I have table Test as below having columns as, ID;Name;Position;Level;Date_Added;Flag_Name;
Suppose I have below data in table:
ID Name Position Level Date_Added Flag_Name
1 Jack Manager 10 10/29/2013 11:00:00 PM Match
2 Tom Supervisor 20 10/31/2013 9:00:00 AM NoMatch
1 Jack Manager 15 11/1/2013 10:00:00 AM Error
1 Jack Manager 20 10/1/2013 9:00:00 AM NoMatch
3 John Salesman 5 10/4/2013 2:00:00 PM Error
1 Jack Manager 17 9/28/2013 2:00:00 AM NoMatch
2 Tom Supervisor 12 11/2/2013 10:00:00 AM NoMatch
4 Remy Accountant 12 11/4/2013 1:00:00 PM Error
4 Remy Accountant 19 11/3/2013 2:00:00 AM Error
2 Tom Supervisor 10 10/29/2013 7:00:00 PM Error
I need to return latest data in query based on combination of (ID;Name;Position) and date range with below conditions:
1) Need to return latest records for Flag_Name other than Match.
2) If latest record for combination of (ID;Name;Position) will come with Flag_Name as Error in that specified date range, then we need to look for this combination has Flag_Name as NoMatch anywhere before in table.
3) If Flag_Name as NoMatch is found for this, then we need to return it. In this case also, if we found multiple records with Flag_Name as NoMatch for combination of (ID;Name;Position), then we need to return latest one.
4) Else we find no record for combination of (ID;Name;Position) with Flag_Name as NoMatch in table, then we can return the latest record with Flag_Name as Error.
While select ID;Name;Position should be unique combination, as we always return latest data for it.
As per above table, if I need to return data for date range between 29-Oct-2013 and 5-Nov-2013, expected result will be like below:
ID Name Position Level Date_Added Flag_Name
1 Jack Manager 20 10/1/2013 9:00:00 AM NoMatch
2 Tom Supervisor 12 11/2/2013 10:00:00 AM NoMatch
3 John Salesman 5 10/4/2013 2:00:00 PM Error
4 Remy Accountant 12 11/4/2013 1:00:00 PM Error
Please let me know if anyone has any doubt about the logic. Is it possible if we can do it in select statement rather than pl/sql code?
All comments/suggestions will be highly appreciated.
Thanks in advance.
Regards
DevFirst i didn't read topic exactly )))
here is second way. I get with stmt from Karthick (thanks)
with t
as
select 1 id, 'Jack' name, 'Manager' position, 10 lvl, to_date('10/29/2013 11:00:00 PM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Match' flag_name
from dual union all
select 2 id, 'Tom' name, 'Supervisor' position, 20 lvl, to_date('10/31/2013 09:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'NoMatch' flag_name
from dual union all
select 1 id, 'Jack' name, 'Manager' position, 15 lvl, to_date('11/1/2013 10:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Error' flag_name
from dual union all
select 1 id, 'Jack' name, 'Manager' position, 20 lvl, to_date('10/1/2013 09:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'NoMatch' flag_name
from dual union all
select 3 id, 'John' name, 'Salesman' position, 5 lvl, to_date('10/4/2013 02:00:00 PM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Error' flag_name
from dual union all
select 1 id, 'Jack' name, 'Manager' position, 17 lvl, to_date('9/28/2013 02:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'NoMatch' flag_name
from dual union all
select 2 id, 'Tom' name, 'Supervisor' position, 12 lvl, to_date('11/2/2013 10:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'NoMatch' flag_name
from dual union all
select 4 id, 'Remy' name, 'Accountant' position, 12 lvl, to_date('11/4/2013 01:00:00 PM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Error' flag_name
from dual union all
select 4 id, 'Remy' name, 'Accountant' position, 19 lvl, to_date('11/3/2013 02:00:00 AM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Error' flag_name
from dual union all
select 2 id, 'Tom' name, 'Supervisor' position, 10 lvl, to_date('10/29/2013 07:00:00 PM', 'mm/dd/yyyy hh:mi:ss am') date_added, 'Error' flag_name
from dual
select ID,
Name,
Position,
max(lvl) keep (dense_rank first order by с desc, Date_Added desc) lvl,
max(Date_Added) keep (dense_rank first order by с desc, Date_Added desc) Date_Added,
min(Flag_Name) keep (dense_rank first order by с desc, Date_Added desc) Flag_Name
from(
select ID,
Name,
Position,
lvl,
Date_Added,
Flag_Name,
decode(flag_name, 'Error', -1, 1) с
from T
where flag_name != 'Match'
group by ID,Name,Position
ID
NAME
POSITION
LVL
DATE_ADDED
FLAG_NAME
1
Jack
Manager
20
01.10.2013 09:00:00
NoMatch
2
Tom
Supervisor
12
02.11.2013 10:00:00
NoMatch
3
John
Salesman
5
04.10.2013 14:00:00
Error
4
Remy
Accountant
12
04.11.2013 13:00:00
Error
Ramin Hashimzade
Message was edited by: RaminHashimzadeh -
How to get only the latest record in a folder
Hi all,
We have an OA SIT that is not a "standard" SIT in that it does not have the traditional Begin and End date. It only has an Effective date. Is there some way I can filter this table to only give me the latest record in the series? I know how to do this in SQL, but don't see how it would be possible in the EUL.
We're trying to avoid creating database views, but at this point, I'm thinking it may be the easiest way to address this. Any other suggestions?
Thanks in advance,
JewellJewell.
Of course I'm not going to mention that I have no idea what a 'standard' SIT is compared to your basic 'non-standard' SIT ... and I have to watch my spelling of such ... but however ...
As you're most likely aware, in SQL you would get all the 'standard' SIT records first by going through the table. Then you'd go back through them all and find the most recent one.
Because of this 2 table pass, I agree that just putting the SQL code in a custom folder (as you're not using views) would make the most sense.
Russ
Maybe you are looking for
-
Trying to use the classes in casStubs.jar and get crawl metrics
I was going through the class files available in casStubs.jar and was trying to come up with a script in AppConfig.xml to connect to the CAS server and obtain the crawl status and metrics. I was trying this option because the class com.endeca.eac.too
-
Problems with Upper Case Letters on Keyboard
Suddenly my keyboard will not print a capital i. in fact, if i use the caps key, it won't even put the letter i in either upper or lower case. When i put the caps lock on, can get a capitol 'I', but once the cap lock is off it is back to the lower c
-
Why won't iMovie open my project?
This is extremely aggravating, iMovie suddenly wont open 2 of my projects. I was working on them for hours and finally got them how i wanted them to be, and when i go to open it later, it won't open! All that happens when I click on it is that it let
-
I need to replace my G4 (description below) with a newer G5 for graphics work with Photoshop CS (can't afford the newer version). Will the G5 1.8 with enough RAM be good enough to last at least 1-2 years? I've had my G4 for 7 years with lots of upgra
-
How do i copy my apps that i have downloaded to another computer?
I have downloaded a number of apps to a pc and synced a number of ipads (16) to this machine. I have now bought a charge and syncing cabinet and wish to copy my apps from the pc to a macbook air to sync and add apps more efficiently to up to 32 ipads