Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula to get previous day's last reading data

Status
Not open for further replies.

21128

Programmer
Aug 27, 2009
36
US
I have a output like this

Selected Date 8/20/2009

shift MW MWD MV MVD
11 769 390
12 780 11 385 5
13 785 5 395 10
-----------------------------------
16 15

how can i create a formula so that for next selected date 8/21/2009 it will give the last reading of MW i.e. of shift 13, 785 as a new value?
 
I dont understand... Will you be grouping the output by date selected?



_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
code looks like this

SELECT max(rev_no), max(tour), max(DT), max(SHIFT_NO), max(DECODE(STA,1,RD,NULL)) "MW PR",
max(DECODE(STA,2,RD,NULL)) "MW",
max(DECODE(STA,3,RD,NULL)) "MW D",
max(DECODE(STA,10,RD,NULL)) "P2300-4 PR",
max(DECODE(STA,11,RD,NULL)) "P2300-4",
max(DECODE(STA,12,RD,NULL)) "P2300-4 D"
FROM history WHERE tour=18 AND rev_no=1 AND DT={?SelectDate} GROUP BY SHIFT_NO ORDER BY SHIFT_NO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top