Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an SSRS report integrated with SP 2010, the data in the report is loaded from a SP list. The current issue that I am facing is not being able to read minimum and maximum date time field for the given ID using CAML.

Can anyone tell me how can I do this ?

ID        RequestType             Status          Date

1         AAA                     Open            12/11/2012 10:10

1         BBB                     OnHold          12/11/2012 10:20

1         BBB                     Resume          12/11/2012 10:30

1         BBB                     OnHold          12/11/2012 10:40

1         BBB                     Resume          12/11/2012 10:50

I need to read the data in the following order, onHold and Resume.

share|improve this question
can you add CAML code to make your question understandable :) – Muhammad Raja Nov 14 '12 at 8:04

1 Answer

If it is purely CAML you will need 2 queries and order by the date, ascending / descending and select a single result.

<OrderBy>
        <FieldRef Name="Date" Ascending="TRUE|FALSE" />
</OrderBy>

Thereby making your own MIN/MAX functions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.