0

I am trying to get some analytical information on how many documents are being added to a particular site or library by my company users.

Does anyone know how I can find out this kind of information? There is nothing in the site web/site collection analytic reports that gives me what I need.

  • What type of information do you need? – Christoffer Dec 21 '15 at 12:13
  • I find solution on site.. Click here – Ali Can Canbek Dec 21 '15 at 12:57
1

If doing custom development follow these simple steps

public static int getItemsInLastMonth(ref SPWeb web,string listName)
{
        SPList list = web.TryGetList(listName);
        if(list != null) {
             SPQuery query = new SPQuery();
             query.Query = "<Where>"+
                             "<Eq>"+
                                  "<FieldRef Name='Created' />"+
                                  "<Value Type='DateTime'>+ <Today> +</Value>"+
                             "</Eq>"+    
                          "</Where>";
            query.ViewFields = "<ViewFields>"+
                                   "<FieldRef Name='ID' />"+     
                                "</ViewFields>";
            SPListItemCollection collection = list.GetItems(query);

            if(collection != null){
                return collection.count;
             }
       }
}

This will give you total items created in last month. Similar you can do for document library also, and do it in client side coding.

1

You can generate CAML query on Document Library and fetch last month uploaded Document data. This is the easiest way to get the list of document.

--> Question : Where should you display this data?

--> Is there any requirement of generating a report of last month uploaded document?

For more reference :

http://platinumdogs.me/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/

<ViewFields>
    <FieldRef Name='Created' />     
</ViewFields>    
<Where>
    <Eq>
        <FieldRef Name='Created' />
        <Value Type='DateTime'>"Your Date Or month"</Value>
    </Eq>    
</Where>
1

If it's a library, you can just use a view without resorting to development. Just create a new View and make the filter into the Created equals the date of one month ago.

  • Go to the List you want to view
  • Go to the top where it says "Create View"
  • Enter in a name
  • Create a filter like it says below

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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