Friday, September 20, 2013

Usage Report in Sharepoint 2007

SharePoint 2007 has built in usage reports that can easily be enabled to allow site administrators and site collection administrators to monitor statistics about the use of their sites. These reports are NOT turned on by default when install MOSS 2007.

Sharepoint has usage reporting feature , this will be handy for the basic usage reporting.This feature is there in sharepoint but we need to enable them to start reporting.One of the drwaback of this reporting it supports only 30 days.

This report could be filtered by the following criteria.
  • Page
  • Browser
  • Referrer URL
  • User
  • Operating System
If you are sharepoint admin you will be intrested in following information from Usage Report
  • Total hits and recent bandwidth usage across all sites.
  • Maximum storage space allowed.
  • Total amount of storage used by the site collection.
  • Percent of storage space used by Web Discussions.
  • Number of users for all sites in the hierarchy.
Three Quick Steps to Configure Site Usage Reporting
  1. Enable Usage Logging in Central Administration
    A. On the Central Administration home page, click                Operations.
    B. On the Operations page, in the Logging and Reporting section, click Usage analysis processing.
    C. On the Usage Analysis Processing page, in the Logging Settings section, select Enable logging.
    D. Type a log file location and number of log files to create.
    E. In the Processing Settings section, select Enable usage analysis processing, and then select a time to run usage processing.
  2. Enable Usage Reporting on SSP Admin Page
    A. On the SSP home page, in the Portal Usage Reporting section, click Usage reporting.
    B. On the Configure Advanced Usage Analysis Processing page, in the Processing Settings section, click Enable advanced usage analysis processing.
    C. In the Search Query Logging section, select Enable search query logging.
  3. Activate the Reporting Feature for the Site Collection
    A. On the Site Actions menu, click Site Settings.
    B. On the Site Settings page, in the Site Collection Administration section, click Site collection features.
    C. On the Site Collection Features page, click the Activate button for the Reporting feature.
  4. IMPORTANT: You must also enable Office Sharepoint Server Standard Site and Collection Features if you have not already done this. The sharepoint server that I inherited did not have this turned on, so reporting did not work.
  5. Activate the Office SharePoint Server Standard Site Collection Features
    A. On the Site Actions menu, click Site Settings.
    B. On the Site Settings page, in the Site Collection Administration section, click Site collection features.
    C. On the Site Collection Features page, click the Activate button for the Office Sharepoint Server Standard Site Collection features.
  6. Activate the Office SharePoint Server Standard Site Features ( This needs to be done on each site)
    A. On the Site Actions menu, click Site Settings, click Modify All Site Settings.
    B. On the Site Settings page, in the Site Administration section, click Site features.
    C. On the Site Collection Features page, click the Activate button for the Office Sharepoint Server Standard Site Collection features.
After site usage reporting is enabled the site administrators and site collection administrators will be able to view reports detailing:
  • Requests and queries in the last day and the last 30 days
  • Average number of requests per day over the last 30 days
  • Requests per day over the last 30 days
  • Top page requests over the last 30 days
  • Top users over the last 30 days
  • Top referring hosts over the last 30 days
  • Top referring pages over the last 30 days
  • Top destination pages over the last 30 days
  • Top search queries for the last 30 days
  • Search results top destination pages
  • Number of search queries per day over the previous 30 days
  • Number of search queries per month over the previous 12 months
  • Top search queries over the previous 30 days
  • Search Queries per search scope over the previous 30 days
Site collection administrators will be able to view reports detailing:
  • Total amount of storage used by the site collection
  • Percent of storage space used by Web Discussions
  • Maximum storage space allowed
  • Number of users for all sites in the hierarchy
  • Total hits and recent bandwidth usage across all sites

Let see how we will enable this feature

1. Go To Central Administrative Site of Sharepoint Farm

2. Go To Operations Tab
3. In Operations Page Go To Logging And Reporting Section
4. Click On Usage Analysis Processing Link

5. In Usage Analyisis Page Enable Loging and set the Log Path

6. Enable Usage Analysis Processing and Set the time
7. Click OK and Save the settings

Now you are enabled analysis in you Farm, So the next step is to enable it in Shared Service level.

1. Go To Shared Service Home Page

2. Go To Office SharePoint Usage Reporting section, click Usage reporting
3. In Configure Advanced Usage Analysis Processing page, in the Processing Settings section, click Enable advanced usage analysis processing.

4. Search Query Logging section, select Enable search query logging


Now you could enable it in the Site Collection.
1. Go to the Root Site (Home page of your site)
2.Click on the settings ->Modify All settings


3. In Settings Page go to SiteCollection Administrative Section and click Site Collectin Features

4. In Feature Listing page Activate Reporting Feature


Let see How we can view this reports

1. Site administrators - Site Settings -> Site Administration section -> Site usage reports
2. SSP administration site - Site Settings -> Site Administration section -> Usage summary

Thursday, July 18, 2013

SharePoint Designer Workflow Actions using elevated permissions

Workflow Issues in Permission.

After the completion of workflow, form is not getting copied to destination forms library. If the user who initiated the workflow is having access to the destination forms library, form is getting moved over but for other users workflow is showing error in Sps2010.

Some of us might have encountered a situation where we need to copy or move a document (usually InfoPath form) once it is uploaded/submitted by the user to a different library where the user doesn’t have permission. With SharePoint 2007, we used an open source extension to achieve this functionality. With the extension, we were able to copy/move the document from one library to another using the System account privileges. Using the system account privilege in a workflow action of course has its own security issues.
Now, SharePoint 2010 workflow (SharePoint Designer 2010) is out of this hassle. SharePoint Designer 2010 workflow has a new feature called “Impersonation Step”. This is nothing but a workflow step by any actions included in this step will be executed using the Workflow author’s privilege instead of the user who is submitting the document. The Impersonation Step is present in the Insert section of SharePoint Designer ribbon.
Tip:
SharePoint Designer always use the logged in user’s (workflow author) credentials for running the impersonation step. If you are unable to log in to the local computer using the account you want to use for impersonation step, you can run SharePoint designer as a different user using the following method.
  1. Navigate to the folder C:\Program Files (x86)\Microsoft Office\Office14\
  2. Right click the file SPDESIGN.EXE and select ‘Run as different user’ context menu item (you can also create a shortcut to this file on Desktop and right click the shortcut).
  3. Enter the network credentials (or different user account) you prefer to run SPD as.

Friday, June 28, 2013

SharePoint 2013 – How to Embed a Word document in your Site Page

Office 2013 and SharePoint 2013 makes a powerful combination. As you might know by now that the new SharePoint 2013 has something called News Feed. A Feed to share like Yammer. You can share thoughts, links, and even doucments which you can see as embeded in the feed itself.
So how do create this embed effect on one of the custom pages? Lets look at the steps
1. Open the Office 2013 create a new word doc.

2. Click on File -> Share.

3. Once you click on share you will be presented with a screen that has a Embed Code. Adjust the height and width of the frame and then Copy the Embed code.

4. Once done save and close the word document. Next we will add this to a SharePoint page to complete our task.
5. Navigate to your SharePoint 2013 site and click on a little settings arrow and then “New Page”.

Add a page Name and then click Create.

Once create you should have something like below

6. Next to embed the code click on “Format Text” tab and the “Edit Source”

7. Paste the code that you copied earlier in the source box and click Ok.

8. click on “Save and Publish” to see the final out-put.

Finally you can also view and copy the embed code, print to PDF or download document and right from your document with document options.

Display sharepoint version in word documents for Content types

I had a requirement where I needed some metadata fields like Version in the word document of a specific content type. Following this article from Microsoft i was able to add the properties(or columns) and also my Version property(following steps below) in my document template but the questions was how would i do that for a content type? Since the content type is created at the Site level and when the template is applied to it, it is not associated with any of the libraries.
Well not straight forward but a workaround solved my issue. I modified the template ( keeping No to using content types for the library) and added all my custom properties into it. Also, added the version using the below steps -
Go to the document library where you plan to store your version-controlled documents.
Click on Settings > Document Library Settings
Click on “Versioning settings” and make sure that you’re either having it “create major versions” or “create major and minor (draft) versions”.
Click OK.
Click on “Information management policy settings”
Select “Define a policy…” and click OK.
Check the “Enable Labels” box, but don’t check either of the other two boxes in that section.
Type {_UIVersionString} into the “Label format” box.
Click on the “Refresh” button to see a preview of your version label. It will say something like {_UIVersionString}
Click OK.
After this copied the template from the explorer view to my local desktop. Next, created a new content type and in
Content type properties -> Advanced Settings ( in SharePoint 2010) -> “Upload a new document template”. Browse the template saved earlier and click ok.
Next, in document library click add your new content type and you will have all the columns and document properties like version in your content type.

SharePoint 2013 document libraries – Drag Drop, Download, Preview, Print, Share and more..

Document libraries in in SharePoint 2013 are just awesome. A new look, Drag Drop feature, ability to preview,download and even print is available.
I will discuss all these cool features in this post -
1. Drag and Drop - Microsoft has done an incredible job by adding this feature to its highly popular document libraries. On any document library you can simple Drag and Drop the document and it will be upload with a quick progress bar. Here is how this feature works
Simply select a document from local and drag it towards the document library. The window will change to “Drag here”


Once you’re done dragging you would see the upload progress bar as in the below screen -








Once done acknowledgement is displayed


Next Lets Look at the Preview Feature, Print and download features.
2. Preview Feature - In your document library click on the “…” next to your document. This will open up a preview window with a bunch of options beneath it.


3. Print and Download - Click on the little stack icon in preview pane to go to the options “download a copy”, Print to pdf and to get the file’s embed code. You can use this embed code to embed documents on any SharePoint page or in News feeds.

Word to PDF Conversion in SharePoint 2013 (via Print to PDF)

As you might know that in SharePoint 2013 PDF’s are supported Out-of-box and Yes without installing any PDF Filters.Besides being able to Search and Open PDF’s another functionality that I like the most is the Out-of-box Word to PDF Conversion. but this definitely needs elaboration.

Lets look at how you can do this.
In the document library if you click on “…” (a.k.a the call up menu) and you would see the document preview or what they a Hover Panel. In the Hover panel click on little stack icon in preview pane to go to the options “Download a copy”, “Print to pdf” and “Embed Information” (to get the file’s embed code). All three options a very useful for end users.

With “Download a copy” end users can download a copy of this document to their local. With “Embed Information” they can get the embed code for this document and then paste it in a Script editor to embed this documents in a SharePoint page. ”Print to pdf” however solves two purposes Converting your Word doc to PDF and letting you Print the PDF that right from the document library.
So here is what happens when I click on “Print to PDF”.
First the Office Web Apps initiates and the Word Web App starts the conversion

Within few minutes you would see a link with your PDF ready to Open.

When you Click on the link, it downloads the PDF to a Word View beta address (something like https://word-view.beta.officeapps.live.com..) and presents you with an Option to Print it.

Here you can either Print the PDF or Cancel this popup to open your PDF. For me it was downloaded to my local’s Downloads folder.

How to add a Video to SharePoint 2013 site

This is a tutorial about how to add a video in SharePoint 2013 site Page. There are various ways of adding a video in SharePoint 2013. You can either use a Script editor webpart or the old Content editor to add the video code or upload videos to asserts library that gives you SharePoint hosted Video page. In this post we will cover the following -
1. Create an Asserts library.
2. Upload Videos to Asserts library
3. Add\Embed Video to SharePoint 2013 site page
4. Add a YouTube Video in SharePoint 2013

Create an Asserts library

1. Navigate to Site Contents and click on “add an app”.

2. Click on Asserts Library and give it a name. We call it Video Library.

Once created Click on the new library -

Upload Videos to Asserts library

3. Next click on “new Item” to Upload Video in this library.

4. Upload a Video – We download a sample Microsoft Video and uploaded it into this library.

5. Once the video is uploaded you will be in Video item’s edit properties page. Notice the option “Change thumbnail”. This is to upload a Video thumbnail either from Video or from your Computer.

6. Change Thumbnail – Once you click on change thumbnail you have the following options -

Lets look at how to capture a screenshot from the video – Play the video and click on the “Capture Thumbnail” on the top of the video.

Other Video Properties -

Once save the Video will be uploaded to Site Asserts library.

Click on Thumbnail video and you should see the Video page.



How to Add\Embed a Video on SharePoint Page

We Uploaded Video in Site Asserts library earlier and now we will add it to a new SharePoint page.
Navigate to the site library where you added the video and click on video thumbnail.In the view Video page click on the code icon to get the Video embed code.See the below screens -

This is the Embed code page that you get. Copy the below embed code.

Next we will add this code in “Script Editor” webpart to display this video on the page.
1. Create a SharePoint Page and Edit it.
2. Click on Insert tab to Insert “Script Editor” Webpart.

3. Next click on Embed Code in Insert Ribbon tab and add the copied Video code to it.


This is how it looks like -

How to use IFrames in SharePoint 2013 and How to add a Youtube video in Sharepoint 2013

Support for IFrames has been added in SharePoint 2013 as a part of Web Content Management(WCM) Enhancements as specified in the post SharePoint 2013 Web Content Management Enhancements.With IFrames Admins can now Embed dynamic content from other sites, such as videos or map directions on any SharePoint site into an HTML field like the one of Content editor webpat or in a blog post Body field.To add a Youtube Video add the “Youtube.com” Domain in “HTML Field Security” first.
Any external domains that will be Inserted in an Iframe should be added as Approved domains in “HTML Field Security” first.”HTML Field Security” is a new feature that you would find in Site Settings (of a Site collection) under “Site Collection Administration” section.
By default, Certain trusted external domains are already Approved for use in iframes.Site collection administrators can customize the field security settings by changing the default trusted external domains.

Lets look at the Steps-
1. Navigate to Site Settings (top-level Site collection) -> HTML Field Security.

2. Make sure the domain that you need to use in Iframe is added as permitted domain.In our case we will add a Youtube Video in an Iframe So we need to make sure that “Youtube.com” is added in the list.

3. Navigate to your Youtube video and click on Share and then Embed.

Copy the highlighted text.
4. Add a Content editor webpart on a page and then click on “Edit Source” in “Format Text” tab in Ribbon.

Add the following in the Source.
< iframe width=”420″ height=”315″ src=”http://www.youtube.com/embed/hyRLzUVw4Vw” frameborder=”0″ allowfullscreen></iframe>
and click ok.

Result -

Sharepoint 2013 Web Content Management Enhancements

SharePoint is a tool to manage and Share Content across the company. New and Improved ways to manage Content is always welcome by Content authors. Here is the list of some cool Content Management Enhancements that have been done in the new SharePoint 2013.

Improved Cut and Paste from Word –

A lot of Content Authors prefer to Copy and Paste Content from applications like MS Word into one of the Text Fields say blog post description field or Content Editor WebParts.This was not entirely supported earlier as the formatting of the content would not remain the same. In SharePoint 2013 however Microsoft has improved this aspect and the Content authors get somewhat similar formatting that they have in their Word documents.
IFrame Support - Another big Enhancement is the Inline support for Iframes. Now you can use Iframes in any text field Content Editor,Script Editor or even in a blog post Description Field. Iframes are often used to display third party content and it is widely used in earlier versions of SharePoint as well. I SharePoint 2013 however there is governance piece to it as well. Any external domains that will be Inserted in Iframe should be added as approved domains in “HTML Field Security”.By default, certain trusted external domains are already approved for use in iframes.Site collection administrators can customize the field security settings by changing the default trusted external domains. See the example of using Iframe with How to add a Youtube video in SharePoint 2013
Embed Documents\Images\Videos on Page - Now you can embed documents, Videos and Images on the SharePoint page itself with the Embed code available for each of them. Embedding a Word document on a SharePoint page is a wonderful reading experience for SharePoint end users or visitors. check out the detailed example on how to do this at SharePoint 2013 – How to Embed a Word document in your Site Page and check the example about Add\Embed Video to SharePoint 2013 site page
Content Search Web part (CSWP) – In SharePoint 2013 Microsoft has Introduced Content Search Web Part that queries against the search Index to display results based on a search query. Content Search Web Part displays search results in a way that you can easily format.It returns Content that is as fresh as the latest crawl of your content, so if you crawl often, the content that the CSWP returns is more up-to-date than if you crawl infrequently. This WebPart is of great benefit to Content Authors. Here is the list of things you can do with this webpart.
* Content Roll-up (Can roll-up content from all over the farm)
* Analytics (Web Analytics has been Replaced with this WebPart)
* Display Templates (Template to modify Search results)
* Can Search Current Navigation Category as part of the query
Image renditions - Image renditions let you display different sized versions of an image on different pages. When you create an image rendition, you specify the width and height for all images that use that image rendition. For example, if the site has a news article page layout that contains an image field, you can create an image rendition named Article_image to display the full-sized image in the article page.
Cross-site Publishing Cross-site Publishing is giving you the ability to display content in one or more publishing site collections. You can also designate any library or list as a catalog, enabling content to be reused on publishing site collections. One of the biggest benefits are that when you change the content in an authoring site collection, those changes are displayed on all site collections that are reusing this content.
Related Items – A new Column type “Related Items” has been Introduced in SharePoint 2013. This is a very useful column from Business prospective. After you Create an Item you can simply add a reference to another Item or a document in any List\Library as a related entity to this Item using Related Items column.Read the entire example at SharePoint 2013 – Related Items Site Column

SharePoint 2013 – Display “Related Items” in Site Columns

A new Column type “Related Items” has been Introduced in SharePoint 2013. This is a very useful column from Business prospective. After you Create an Item you can simply add a reference to another Item or a document in any List\Library as a related entity to this Item using Related Items column.
If you navigate to list settings for your “Tasks” list you would notice a new Column “Related Items”. This is a new Site Column that is a Part of Task Content type by default.
Why would I use this Column?
This is a very useful column from Business prospective. When you create an Item you can simply add a reference (as Lookup) to another Item in same or different list or library as related entity.
Where is this column?
This Site Column is a part of Hidden group (“_Hidden”) by default and is not be listed in Site Columns. This however is a part of Task Content type by default. So all we need to do is to navigate to “Related Items” Site Column screen
and change the group from _Hidden to Whatever Custom group you want via the Tasks Content Type.
Lets look at the Steps -
Navigate to Site settings -> Site Content Types

Under List Content Types look for “Tasks”

Click on “Tasks” and you would see the following Columns with “Related Items” at the bottom.
Click on Related Items column and you would see something like below

Click on “Edit Site Column”

This is what you see here. Notice the _Hidden Group.

Click on Existing Group and then Change the Group this column belongs to. Click OK once done.


Next Navigate to Site Settings and select “Site columns”

In Site Columns select your group with Show Groups filter.


Now you can use this Site column in any list or Library.

How do you add “Related Items” Column in a list?
You can add this column in any list or library from the Site Columns using “Add from Existing Site columns” in a list. Again you need to first have this column display in “Site Columns” under one of the existing groups. “Related Items” is in _Hidden group in Site Columns by default. Follow the steps SharePoint 2013 – Display “Related Items”Column in Site Columns before you begin.
So once you see the Column in Site columns lets Navigate to the List where you need add the “Related Items” column.
Steps -
1. Navigate to the list and click on “List Settings” (under List tab).
2. In List Settings page click on “Add from Existing Site columns” under Columns.

3. Next Select the group where you are showing the Related Items column in Site Columns and then add it to the “Columns to add” box on right and click ok.

4. Now you have a “Related Items” column added to the list.

5. Next navigate to the list and click Create a new Item. You wont see this column in NewForm.aspx page.
Once you create a new Item click the call-up menu (…) and the View Item.

6. In View Page you would see “ADD RELATED ITEM”

7. Once you click on Add Related Item you would see a popup with list and libraries select the Item or document you need to as as related entity.

And here is the resulting Item.