Hi all,
I have a report which i'm struggling to show the correct date.
The data in my details section looks like this - a date field, a type and then a yes/no answer.
date A yes (start)
date B yes
date B yes
date B no (end)
date A yes (start)
date B yes
date B no (end)
date A yes (start)
date B no (end)
I have a date parameter setup and using this and the data above, i need to be able to show the correct start and end date.
Start dates are determined by a type of A and answer of Yes.
End Dates will be a type of B and answer of No. (If this combination does not appear the end date should be blank)
What I have so far...
Start dates appear to be correctly worked out using variables to show the latest start date prior to the parameter date.
End date - this is the problem !! At the moment the end date I have showing is the last record as it meets the criteria (B No). The record i need to show is the first time the criteria is met AFTER the start date which has been worked out above.
So how do I stop the variable populating once it has found a value ?? This is where I was thinking a loop might need to be used but I have no experience of using them and therefore any help would be greatly appreciated.
Many thanks
Chris