Here is what the report renders.
Name(maxtime) DateTimeOfCheck PreviousRowDatetime.
C4 - Brett (30)
04/13/2009 13:36:36
04/13/2009 13:42:41 04/13/2009 13:36:36
04/13/2009 15:05:51 04/13/2009 13:42:41
CELL D-Brett (15)
04/13/2009 13:36:43 04/13/2009 15:05:51
04/13/2009 13:42:29 04/13/2009 13:36:43
04/13/2009 15:05:43 04/13/2009 13:42:29
04/13/2009 15:05:57 04/13/2009 15:05:43
CELL E-Ken (30)
04/13/2009 15:05:57
The grouping is on the cell name. The first row of dates is the date that cell was checked. the 2nd row of dates is the date from the previous row. C4 was checked 3 times so it has 3 dates. the 2nd column then shows the previous date. The 2nd column of dates is blank in the first row because there is no previous date. Cell E at the bottom has never been checked so it does not have a date in the first column. But you can see it is grabbing the previous date from the Cell D group. I was hoping I could use the scope parameter to limit the scope to each group of names. My ultimate goal is to subtract the date time from the previous date time and verify that it is within the time frame of the MaxTime field for that location.
Main Topics
Browse All Topics





by: brandonvmoorePosted on 2009-04-13 at 15:59:01ID: 24133590
I'm not an expert on SQL reporting services, but let me see if I can lead you in the right direction. First, I would say that the documentation is 'probably' not wrong. Secondly, as you saw you can't access the previous item in the table when you are grouping.
You could consider either using a subquery that isn't grouped where you can add the field you need. Or you could just create a temporary table that adds the field you need.
However, what you are asking for doesn't sound like it makes sense. When you group something you are getting one row for the entire GROUP, so it wouldn't make sense to take data for the entire group and modify it by a single, previous record. If your calculations are recursive (I'm using this term liberally as I don't have a better word at the moment. But what I mean is that each calculation on a row is using the calculation from the last row), then you probably need an aggregate function.
Tell me the bigger picture of what you're trying to accomplish and I'll see if I can help further.