Auto display the last data in array
How can I auto display the new data in array without the scroll bar?
If i understand you, you want show last data of array.
You have use property node: IndexVals. You write there indexes of array frome there you want show the data.
Similar Messages
-
Need to display/update last date/time of an accessed record
Hi All,
I'm using ADF BC and I have a use case where I need to display the last date/time when a user access a record in a view. I have a user table that I access thru a view object where I can store the date/time of the fetched record. A viewLink from that view object gives me the detail information in that record.
I generated a ViewRowImpl class and added this to the method that get the time and date (DtHeureDernAcces is a private variable in defined in the class):
/**Gets the attribute value for the calculated attribute DtHreDernAcces
public Date getDtHreDernAcces()
if (DtHeureDernAcc==null)
DtHeureDernAcc=(Date) getAttributeInternal(DTHREDERNACCES);
setDtHreDernAcces(new Date(new java.sql.Timestamp(System.currentTimeMillis())));
getApplicationModule().getTransaction().commit();
return DtHeureDernAcc;
This works fine until the user refresh the page, in this case the ViewObjImpl is recreated and DtHeureDernAcc is then null. So the date/time is updated after each refresh.
How can I get around this problem ?The complication here is that &P7_DATE_SHIPPED. and &P7_DATE_ORDERED. are session-state variables - they don't actually get updated until the page submit completes, which is happening AFTER the dynamic action.
JavaScript might provide an alternative method that will pick up the current values of those fields. You might try something like:
HTML Header
<script language="JavaScript" type="text/javascript">
function check_hours(pThis){
var v_shipdt = $v("P7_DATE_SHIPPED");
var v_ordrdt = $v("P7_DATE_ORDERED");
if(v_shipdt > v_ordrdt){
alert("Shipping Date is before Order Date!");
return true;
</script>Put this in the HTML Form Elements Attributes of your page item:
onchange="check_hours(this)"This is just pseudocode, but it may help get you started. Dates in JavaScript are a little tricky to deal with. -
How to display the last value of a field in a group in the group header
I need to display the last quiz score from a group of quiz scores as part of the header of a group of units (the quiz score values are in the detail record). I can not use the group footer, which would be the natural place to find the last value. It must be in the group header because there will be a subsequent group within the unit group. In other words, the grouping is as follows:
Unit Group Header (Display last quiz score in unit)
SubUnit Group Header (Display other detail summaries)
Detail Record (including quiz score)
SubUnit Group Footer
Unit Group Footer
While there is a minimum/maximum summary function, there is not a first/last function.
Fuskie
Who is constantly amazed at the ability of users to request report features that are not easily implented through Crystal Reports...Hi Fuskie,
One suggestion to display the last quiz score in the Group Header, other than what had already been suggested, will be to use a linked subreport in the Group Header. It is not an efficient way to display the information, but it could do the trick.
Another suggestion will be to insert a subreport in the report header, then store the last quiz score in an array for each group, then share it with the main report and display the values in the appropriate group. In this way it will only connect twice to the data source, one for the main report and once for the subreport, instead of multiple connection for each group.
Finally, the most efficient way will be to have this value calculated on the database side using a command object or a stored procedure.
Patrick -
How to get the last data point from a TDM file in LabVIEW?
Hello,
I am using LabVIEW to analyze some rather large TDM files, and I need a way to get only the last data point. So far, the only way I have been able to accomplish this is by reading the entire file. Is there a property in the TDM file or a function in LabVIEW that will allow me to get the index of the last item in a channel?
Thanks!
ChristinaDo you want to avoid reading whole file and want to be able to reach or get the index of last value of channel? is there any specific reason? I am not sure you could do it without loading the whole file. But the easiest way would be just to use array functions "array size" would give you the index of last element.
-Nilesh
Kudos are (always) welcome for the good post. :-) -
Query to find the difference between the last date and the second to the last date
Hi all,
Hope all is well.
I am working on the following problem because I am trying to improve my MS SQL skills. But I am stuck at the moment and I wonder if you could provide some assistance please. Here is the issue:
Table 1: Dividends
divId
ExDate
RecordDate
PayDate
Amount
Yield
symId
1
2013-02-19
2013-02-21
2013-03-14
0.23
0.00000
3930
2
2012-11-13
2012-11-15
2012-12-13
0.23
0.00849
3930
3
2012-08-14
2012-08-16
2012-09-13
0.20
0.00664
3930
4
2012-05-15
2012-05-17
2012-06-14
0.20
0.00662
3930
5
2012-02-14
2012-02-16
2012-03-08
0.20
0.00661
3930
6
2011-11-15
2011-11-17
2011-12-08
0.20
0.00748
3930
7
2011-08-16
2011-08-18
2011-09-08
0.16
0.00631
3930
8
2011-05-17
2011-05-19
2011-06-09
0.16
0.00653
3930
9
2011-02-15
2011-02-17
2011-03-10
0.16
0.00594
3930
10
2010-11-16
2010-11-18
2010-12-09
0.16
0.00620
3930
11
2010-08-17
2010-08-19
2010-09-09
0.13
0.00526
3930
12
2010-05-18
2010-05-20
2010-06-10
0.13
0.00455
3930
13
2010-02-16
2010-02-18
2010-03-11
0.13
0.00459
3930
Table 2: Tickers
symId
Symbol
Name
Sector
Industry
1
A
Agilent Technologies Inc.
Technology
Scientific & Technical Instruments
2
AA
Alcoa, Inc.
Basic Materials
Aluminum
3
AACC
Asset Acceptance Capital Corp.
Financial
Credit Services
4
AADR
WCM/BNY Mellon Focused Growth ADR ETF
Financial
Exchange Traded Fund
5
AAIT
iShares MSCI AC Asia Information Tech
Financial
Exchange Traded Fund
6
AAME
Atlantic American Corp.
Financial
Life Insurance
7
AAN
Aaron's, Inc.
Services
Rental & Leasing Services
8
AAON
AAON Inc.
Industrial Goods
General Building Materials
9
AAP
Advance Auto Parts Inc.
Services
Auto Parts Stores
10
AAPL
Apple Inc.
Technology
Personal Computers
11
AAT
American Assets Trust, Inc.
Financial
REIT - Office
12
AAU
Almaden Minerals Ltd.
Basic Materials
Industrial Metals & Minerals
I am trying to check the last date (i.e. max date) and also check the penultimate date (i.e. the second to the last date). And then find the difference between the two (i.e. last date minus penultimate
date).
I would like to do that for each of the companies listed in Table 2: Tickers. I am able to do it for just one company (MSFT) using the queries below:
SELECT
[First] = MIN(ExDate),
[Last] = MAX(ExDate),
[Diff] = DATEDIFF(DAY, MIN(ExDate), MAX(ExDate))
FROM (
SELECT TOP 2 Dividends.ExDate
FROM Dividends, Tickers
WHERE Dividends.symId=Tickers.symId
AND Tickers.Symbol='MSFT'
ORDER BY ExDate DESC
) AS X
Outputs the following result:
First
Last
Diff
2012-11-13
2013-02-19
98
But what I would like instead is to be able to output something like this:
Symbol
First
Last
Diff
MSFT
2012-11-13
2013-02-19
98
AAN
2012-11-13
2012-12-14
1
X
2012-11-13
2012-12-14
1
Can anyone please let me know what do I need to add on my query in order to achieve the desired output?
Any help would be greatly appreciated.
Thanks in advance.Could you try this?
create table Ticker (SymbolId int identity primary key, Symbol varchar(4))
insert into Ticker (Symbol) values ('MSFT'), ('ORCL'), ('GOOG')
create table Dividend (DividendId int identity, SymbolId int constraint FK_Dividend foreign key references Ticker(SymbolId), ExDate datetime, Amount decimal(18,4))
insert into Dividend (SymbolId, ExDate, Amount) values
(1, '2012-10-1', 10),
(1, '2012-10-3', 1),
(1, '2012-10-7', 7),
(1, '2012-10-12', 2),
(1, '2012-10-23', 8),
(1, '2012-10-30', 5),
(2, '2012-10-1', 10),
(2, '2012-10-6', 1),
(2, '2012-10-29', 7),
(3, '2012-10-1', 22),
(3, '2012-10-3', 21),
(3, '2012-10-7', 3),
(3, '2012-10-12', 9)
WITH cte
AS (SELECT t.Symbol,
d.ExDate,
d.Amount,
ROW_NUMBER()
OVER (
partition BY Symbol
ORDER BY ExDate DESC) AS rownum
FROM Ticker AS t
INNER JOIN Dividend AS d
ON t.SymbolId = d.SymbolId),
ctedate
AS (SELECT Symbol,
[1] AS maxdate,
[2] AS penultimatedate
FROM cte
PIVOT( MIN(ExDate)
FOR RowNum IN ([1],
[2]) ) AS pvtquery),
cteamount
AS (SELECT Symbol,
[1] AS maxdateamount,
[2] AS penultimatedateamount
FROM cte
PIVOT( MIN(Amount)
FOR RowNum IN ([1],
[2]) ) AS pvtquery)
SELECT d.Symbol,
MIN(MaxDate) AS maxdate,
MIN(penultimatedate) AS penultimatedate,
DATEDIFF(d, MIN(penultimatedate), MIN(MaxDate)) AS numberofdays,
MIN(MaxDateAmount) AS maxdateamount,
MIN(penultimatedateAmount) AS penultimatedateamount,
MIN(MaxDateAmount) - MIN(penultimatedateAmount) AS delta
FROM ctedate AS d
INNER JOIN cteamount AS a
ON d.Symbol = a.symbol
GROUP BY d.Symbol
ORDER BY d.Symbol
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers.
Thanks!
Aalam | Blog (http://aalamrangi.wordpress.com) -
I have an iPad 5.1.1. The calendar sync has started to not work correctly. I have it checked "All events," but it only displays the last two months for my individual entries. My repeating entires do go back further, though. How do I fix?
HI Jason269. Thanks for your reply, however I wrote that I already have "All events" checked. If All Events is checked and it doesn't diaplay all events, how do I fix? It seems this is a common issue, as I have read many others on here state the same problem.
I believe my problem occurred when I synced my iMac calendar to my iPad calendar using yahoo. Yesterday, I unsynced them on my iMac controls. When I checked my iPad calendar, all of my old entries reappeared - but only for five seconds and disappeared again. So, the data is saved and still there but cannot be displayed, even when I have All events checked. In fact, it only shows my individual entries for the last two months, but does show all my recurring entries. If I switched to last six months, I will see everything for the last six months. If I switch back to all events, it is only for the last two months.
As I mentioned, others on here have expressed exactly the same issue, including the two month example and having used yahoo.
For legal purposes, I need to be able to use the information from my indidual calendar entries in an upcoming court case. So I really need to fix this ASAP! -
Min,Max for a time Range and Sum of Records for the last date/time
Hi All,
I have a table with the following structure/data:
create table Events (
[EventID]
int NOT NULL,
[Title]
nvarchar(200) NOT NULL,
[SourceName] nvarchar(20) NOT NULL,
[Type]
int NOT NULL,
[eDate]
datetime
insert into Events values(100, 'Event 1', 'S01', 3,'2014-01-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S07', 3,'2014-01-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S08', 3,'2014-01-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S09', 3,'2014-01-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S010', 3,'2014-01-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S03', 3,'2014-01-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S04', 3,'2014-01-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S05', 3,'2014-01-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S06', 3,'2014-01-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S01', 3,'2014-02-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S02', 3,'2014-02-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S03', 3,'2014-02-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S04', 3,'2014-02-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S05', 3,'2014-02-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S06', 3,'2014-02-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S01', 3,'2014-03-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S02', 3,'2014-03-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S03', 3,'2014-03-01 00:00:00.000')
insert into Events values(100, 'Event 1', 'S04', 3,'2014-03-01 00:00:00.000')
insert into Events values(101, 'Event 2', 'S05', 3,'2014-03-01 00:00:00.000')
insert into Events values(102, 'Event 3', 'S06', 3,'2014-03-01 00:00:00.000')
And I wrote the following query:
select EventID as [Event ID],
Title,
count(distinct(SourceName)) as [Instances],
Type,
min(eDate) as [First Detected],
max(eDate) as [Last Detected],
datediff(d,min(eDate),max(eDate)) as [Delta (days)]
from Events
where type = 3
group by EventID, Title, Type
having max(eDate) <> min(eDate)
and max(eDate) =(select top 1 eDate from Events order by eDate desc)
and I get the following results (see the instance number)
Event ID Title Instances Type First Detected Last Detected
Delta (days)
=============================================================================================================================
100 Event 1 5 3 2014-01-01 00:00:00.000 2014-03-01 00:00:00.000
59
101 Event 2
3 3 2014-01-01 00:00:00.000 2014-03-01 00:00:00.000 59
102 Event 3
2 3 2014-01-01 00:00:00.000 2014-03-01 00:00:00.000 59
This is normal for this query however what I need to do is a little different.
In other words, while I need to show when we recorded a specific event first and last time,
I need to display the results for the last date/time when it was recorded.
For example what I need to provide should look like this:
Event ID Title Instances Type First Detected
Last Detected Delta (days)
=============================================================================================================================
100 Event 1 2 3
2014-01-01 00:00:00.000 2014-03-01 00:00:00.000 59
101 Event 2 2 3
2014-01-01 00:00:00.000 2014-03-01 00:00:00.000 59
102 Event 3
2 3 2014-01-01 00:00:00.000 2014-03-01 00:00:00.000
59
Could you please help me to fix this query?
TIA,
John;With cte As
(Select EventID as [Event ID],
Title,
SourceName,
Type,
min(eDate) Over(Partition By EventID, Title, Type) as [First Detected],
max(eDate) Over(Partition By EventID, Title, Type) as [Last Detected],
eDate,
datediff(d,min(eDate) Over(Partition By EventID, Title, Type),max(eDate) Over(Partition By EventID, Title, Type)) as [Delta (days)],
max(eDate) Over() As MaxEDate
from Events
where type = 3)
Select [Event ID],
Title,
COUNT(Distinct SourceName) As Instances,
Type,
[First Detected],
[Last Detected],
[Delta (days)]
From cte
Where eDate = MaxEDate And [First Detected] <> [Last Detected]
Group By [Event ID],
Title,
Type,
[First Detected],
[Last Detected],
[Delta (days)];
Tom
P.S. Thanks for providing the DDL and data. That is always very helpful. -
Keep only the last date in a tablix whith formula using previous
Hi,
I am using this formula in a tablix
=iif(Previous(Fields!Extract_Date.Value)="", "", (
(Fields!Percent_IPCoverage.Value-Previous(Fields!Percent_IPCoverage.Value))*1
+(Fields!Percent_DVerCoverage.Value-Previous(Fields!Percent_DVerCoverage.Value))*2
+(Fields!Percent_Formalized.Value-Previous(Fields!Percent_Formalized.Value))*2
+(Fields!Percent_Traced.Value-Previous(Fields!Percent_Traced.Value))*3
+(Fields!Percent_StakeholderValidation.Value-Previous(Fields!Percent_StakeholderValidation.Value))*3
+(Fields!Percent_Compliant.Value-Previous(Fields!Percent_Compliant.Value))*3
/(1+2+2+3+3+3)
I would only display the last Extract Date in my tablix and corresponding value.
How is it possible ?
Thanks in advance.Hi fiacre6631,
According to your description, you want to display the last Extract Date in your report. Right?
In Reporting Services, we have last() function to display the last value in a specified scope. In this scenario, please refer to the expression below:
=last(Fields!Extract_Date.Value,"DataSet")
Reference:
Last Function (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
Thanks!!
It works :) -
Report req -To get the last date
Hi all,
I have one report requirement,I have to develope the report to display last movement date.
I am able to get the all movement dates regarding the particular material.But I need to display only last date .Is any option in query designer to get last date only in report .Instead of displaying all dates like MAX of the date in our abap code.
Thank's
BKHello Srini / Tarak
Thank you I will try your options .But I dont have any direct keyfigure like : last movement date.
I have to do all cal on my date characteristic only.In this regard please suggest...
Thanks
Bk -
my iphone has a problen on the phone icon. When I press the phone icon, it will auto dial the last number, how can I fix this?
Try This...
Close All Open Apps... Perform a Reset... Try again...
Reset ( No Data will be Lost )
Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
http://support.apple.com/kb/ht1430 -
Identify the last data package in start routine
Hi Everyone
We have a start routine in transformations. We require to do some special processing in the start routine only when the last data package is executing. How can we determine in the start routine that current package is last one or not ? Any pointers in this direction are appreciated.Hi,
You can get packet Id from datapackid in start routine and end routine. But I'm not so sure how to identify the last packet ID, alternatively you can store this packet id in some where else and read the same value in End routine if your logic(processing) permits to do this in End routine instead of Start routine.
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
hope it helps...
regards.
Raju -
TO Display the row data as column in ALV
Hi experts ,
Need to display the row data in ALV as column.
The column of an ALV has the fieldnames of a table , this needs to be displayed as row data , that is as single row.
How can this can be achieved?Hi,
Actually it is not possible to disaply in multiple lines.
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D49517%26messageID%3D506378%23506378
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D41133%26messageID%3D403371%23403371
This problem was discussed many times in this forum, u can search for more results. -
How to display the header data on different position in alv report
hi all,
how to display the header data on different position in alv report.
for example ,
customer name
xxxx xxxx
vendor name street
xxxx xxxx xxxxx
pls help me .hi
as per my understanding you need to trnasfer header internal table data to pdf..
please check the following links for internal table to pdf..
Convertion of Internal table data to PDF
This link is related to ur issue
Re: how to insert the calling of the FM: OTF to PDF
Thanks -
Calendar app icon is displaying the wrong date
For some reason on my iPhone's homescreen the icon for the Calendar app has today started displaying the wrong date.
It should show today's date, Monday 6th but instead it reads Sunday 5th.
What confuses me is that the phone does know the date is Monday 6th as the lock screen shows it correctly and also when I actually load the Calendar app it starts on the right date. Also, when I load the multi task bar the Calendar app icon there is correct. See the attached photo, which shows the Calendar app on the home screen (faded, middle left) displaying yesterdays date Sunday 5th, while the app icon in the multi task bar is correct, Monday 6th.
Syncing the calendar with my iMac does not correct the error. Equally, turning the phone off and on again has not sorted it.
Does anyone have any idea what might be causing the fault? And more importantly how to correct it?
Thanks.Thanks for the suggestion DaVBMan, sadly it didn't work. The only thing that did work was to wait until midnight and it corrected itself. In the mind of the phone it lived a whole day twice and then skipped one completely in order to get back on track. Very odd and also I have since discovered it has happened to a few of my friends too.
It's not happened again so I have no idea what so ever what caused it. Fingers crossed it never recurs. -
Is there any way to tell the last date my ipod was plugged into my computer?
OKay, this may be a techie question, but I'm pretty savvy so if this info is contained in a file somewhere, you can feel free to explain how to find it, I can look for it.
i Misplaced my iPod nano at some point in time, and knowing the last date I synced it to iTunes or even plugged it in would be HUGELY helpful in helping me to maybe locate it. IS there any way to see this information (the date specifically) anywhere on my computer dated in any file?
I Did look at devices and the iPod wasn't listed there, (only my more recent iPad and iPhone as backups) so I'm assuming maybe this wasnt an option in earlier versions of iTunes at least when I last had that sucker plugged in.
IIt's Moreso just killing me that I can't find it, and I KNOW it's one of a few places.
ANy help is great!
thanks!
RObGo here for instructions.
iFixit: The free repair manual
If your iPod got wet, put the whole iPod in a bag/container of rice and see it and leave it for days.
How to fix a wet iPod or iPhone | eHow.com
Maybe you are looking for
-
Down-payments reducing commitments?
Hi, for projects/ orders we are reflecting the commitmens and are making down-payments. Now it seems that our down-payments are not reflected in the commitments (so are not reducing them). Is there a way to change this behaviour? I've looked up in th
-
Dynamic Parameter Prompting for Database Connection Password
Post Author: rsharp CA Forum: Publishing Hi I've been finding recently that reports using dynamic parameters and published into Crystal Server prompt for the database connection password when the dynamic parameter is accessed. Thing is, this only st
-
UTL_SMTP: can't connect to remote mail server (error: 421)
I'm trying to execute this command as SYS: exec MYSCHEMA.send_mail_via_utl_smtp('[email protected]', '[email protected]', 'my subject', 'my message','mail.mydomain.com'); and I get this error: Error starting at line 8 in command: exec MYS
-
Does anyone know how to save multiple files in a book as RTF, other than saving each one individually? I have tried saving as a pdf and converting it but the formatting is never correct. I am using FM 9 on Windows 7. Thanks in anticipation. Stu
-
Hi experts, I please clarify my doubts, how the working environment of the company those implementing SAP and Providing support for the client?? like....what is the difference between Coglet Palmolive and TCS?? how their work is different? thanks..