It could be me, but once again I have trouble understanding your business logic. That has happened in the past as well, and I then recommended writing it out on a piece of paper, describing each individual step.
From this, you can write some pseudo code that describes what you want the code to do. E.g. something like this:
Code:
1. Get Units
2. For Each Unit
2a Get dates based on Unit
2b Get Measurements based on Unit
2c For each Date and Measurement
2c1 Write out Unit, Date and Measurement
loop
loop
I am just making something up here, but I am sure you get the idea.
With this pseudo code, it's much easier to understand how you should structure your code. This is much mor effective than randomly moving MoveNext statements around, hoping your code suddenly starts working...
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.