Sunday, January 29, 2012

How to use SharePoint 2010 Chart web part with Excel Services

In this post, I will show how to use SharePoint 2010 chart web part with excel services to display various charts. Firstly we need to configure excel services on the SharePoint server.
To use excel services with chart web part, we need URL of the excel document and range of spreadsheet. Once we have these things, edit the page and insert chart web part to it. Click on Data & Appearance and then Connect Chart to Data.
Choose Excel services then screen with display and fill the excel workbook path and range of spreadsheet.
Excel web service URL should be already filled.
Excel workbook path: SiteURL/Shared%20Documents/Sales.xlsx
Range: Sheet1!$A$1:$B$6
Then click next.
Keep the default setting for remaining pages and then click finish.
Final output will be

Saturday, January 28, 2012

SharePoint 2010 install on Windows 7 throws error on Secure store services click in Central Administration

Error:
Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\SecurityToken\client.config line 41)

Solution to this error is to download a patch from https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=23806  (Windows6.1-KB976462-v2-x64.msu).
Install the downloaded patch on the SharePoint server and restart the server.

How to Configure Excel Services in SharePoint 2010

In this post, I will show how to configure excel Services in SharePoint 2010.
Following are the steps to configure excel services
  1. Click Application Management
  2. Click Manage Service Applications
  3. Click Secure Store Services Applications
  4. Click on new and fill the necessary details as shown below
        a.    Target Application ID: SP2010ExcelServices
        b.    Display Name: SP2010ExcelServices
        c.    Contact Email:
        d.    Target Application Type: Group
        e.    Target Application URL: None and then click next.


5.    Keep the default settings and click next

6.    Fill the below details
a.    Target Application Administrators: Domain\Administrator
b.    Members: Domain\Domain Users and click ok.


7.    Once the target application ID is created, Checked the checkbox next to SP2010ExcelServices and click on generate new key in the ribbon.
8.     Enter the Pass Phrase
9.     Once again checked the checkbox next to SP2010ExcelServices and click on set credentials in the ribbon.



10. Once again click Application Management, Manage Service Applications and then Excel Services Applications.
11. Click Global Settings, Scroll to the bottom of the page and in the Application ID field under external data, enter SP2010ExcelServices then click OK.


How to Configure Secure Store Services in SharePoint 2010

In this post, I will show how to configure Secure Store Services in SharePoint 2010. In SharePoint 2010, Secure Store Service replaces the single sign on feature of MOSS 2007. It helps in storing credentials. It is commonly used for access to Excel Service Applications, Visio Service Applications and business connectivity services.
For more details on secure store services refer the following link http://technet.microsoft.com/en-us/library/ee806889.aspx
Refer the below steps for Secure Store services configuration     
1.    Navigate to Central Administration, Click Manage service applications under the Application Management.

2.    Click on Secure store service
3.    After clicking on secure store service you will see error as shown in below screen shot but don’t be panic this is because you are accessing secure store service first time.
4.    Just click on Generate New key then passphrase screen will be display. This passphrase is used for encrypting information stored in the secure store service. Do not forget this passphrase as there is no way of recovering the passphrase.
5.    Now the Secure store service is ready to use and you can add the target applications that you want to store credentials.

Thursday, January 26, 2012

How to use SharePoint 2010 Chart Web part to display SharePoint list data in various chart type such as pie, bar, area etc

In this post, I will show how to use SharePoint 2010 chart web part to display SharePoint list data in various chart type such as pie, bar, area etc.
Step 1: Create a SharePoint list with two columns say “Country Name” and “Company revenue” with some data as shown below
Step 2: Chart web part is part of SharePoint Server 2010 enterprise edition. Therefore we must activate “SharePoint Server Enterprise site collection feature” and “SharePoint Server enterprise site features”.
After activation of these features make the Chart web part available in the business data type in add a web part gallery.
Step 3: Navigate to site page where you want to add web part and add a webpart from webpart gallery.
After addition of Chart web part, we will see two links “Data & Appearance” and “Advanced Properties” as shown below
After clicking on “Data & Appearance” link will launch a wizard to select a data source. Following data source can be used
In our case we will select “ Connect to a list” and click “Next” and then the source list. Finally we will reach to final page of wizard where we will specify x and y axes. Click “Finish”.


We can view result in various chart type as below below

Tuesday, January 24, 2012

How to use SPSecurity.Runwithelevatedprivileges Method in Sharepoint 2010

In this post, I will explain in which scenario we need to use SPSecurity.Runwithelevatedprivileges method in sharepoint customisation.
There are many times when we need our code to perform certain functions that current logged In user does not have permission to perform. The SPSecurity class contains Runwithelevatedprivileges method that allow to run code under full control prilvileges.
SPSecurity.RunWithElevatedPrivileges(delegate()
{
 // Code
 });
 This delegate method run with elevated rights under the Application Pool identity which has site collection administrator privileges on all site collections.

Sunday, January 8, 2012

Create new web application button is disabled in sharepoint 2010 install on windows 7

1. Navigate to control panel.
2. Click on System and security

3. Click on “Change user account control settings” under Action Center

4. Set the scroll bar to never notify and click ok.

5. Then restart the system and open the central administrator with run as administrator