Showing results for 
Search instead for 
Did you mean: 

How do i get the curent values or the previous if the curent does not exist

0 Kudos

Hello, i have trie this code and i get only the values of the date selectionned, but i need to show if the currect date does not exist, to show the previews values in crystal repor, how can i use previous () fonction?

for example

if ({myadate.datelqd}={?date}) then{mydate.restrlqd}={mydate.restrlqd}
else if mydate does not exists then show previews value
here is what i have tried

if ({?date}={mydate.datelqd}) then {mydate.restrlqd}={mydate.restrlqd}

but I want that when the requested date is not in the database, that I display the last recording for example
on 10/12/2021 i have qty = 55
on 13/12/2021 i qty = 85
on 14/12/2021 I have qty = 55

when I enter 12/12/2021 for example, let it display the data for 10/12/2021 where the qty = 55

Accepted Solutions (0)

Answers (0)