Tuesday, December 21, 2010

SharePoint Reporting Options

If you need to display chart controls in SharePoint, there are number of options, including, but not limited to:
a) SSRS in Native or Integrated Mode
b) Excel Services
c) Performance Point Services
d) Custom or Third Party Silverlight Controls
e) “Fusion Charts” - based on Adobe Flash
f) JavaScript Control libraries
g) SharePoint 2010 Chart Web Part, which is simple to use, but powerful. I described the same in an older post of mine:
h) Access 2007/2010 Reports connecting to data in SharePoint List

i) Using ASP.Net Chart Controls. Here is a useful blog which describes the same:
http://rahul-vartak.blogspot.com/2010/08/using-aspnet-chart-control-in.html

j) SharePoint: Interactive Charts using Google Visualization API v2.0
Google provides a JavaScript based charting API. However, you need to get data from data source and feed it to Google. Alexander Bautz provides an wrapper JavaScript library, which provides configuration options, reads data from SharePoint Lists and generates the graphs and charts using Google API.
https://www.nothingbutsharepoint.com/sites/eusp/Pages/sharepoint-interactive-charts-using-google-visualization-api-v2-0.aspx
I have made my hands dirty with all the above.
So what is the best option or recommended option to use? IMHO, there is no single best option. Some options require server side configuration changes or deployment. Others can be used by uploading code/JavaScript files to a SharePoint document library or modifications through SharePoint Designer. Access Reports is a thick client option, and has its thick client pros-cons and can be used if you have few users.
The data can be fetched using CAML Queries in either C# or JavaScript, using Data View Web Parts with some level of gymnastics involving XSLT and JavaScript, or SharePoint List connectors.
Each option has its pros/cons and needs to be evaluated on case by case basis.
The list is by no means all exhaustive and all inclusive. I have listed only the most common I have come across. If you have an opinion or alternative option to recommend, feel free to share your thoughts in the comments below.

Monday, December 06, 2010

Opening Visual Studio 2005 Projects in Visual Studio 2010/2008

We recently had to modify legacy source code created in Visual Studio 2005. On opening the project file in VS 2010, it started the Conversion Wizard.


After clicking the usual Next, Next and Finish, it gave the message "Some errors occurred during Conversion. For more information, see the Conversion Report". The report gave 1 Error.

On trying to re-open the project file, it gave the message.

The project file 'D:\Test\MyProj.csproj' cannot be opened. The project type is not supported by this installation.

It was a SharePoint project, and it was looking for Visual Studio Extensions for SharePoint.

We had only Visual Studio 2010 on our machines and trying to install the Visual Studio extensions for VS 2010 will not help as we could not find the right 64 bit VS 2010 version.

I used an old trick learnt in my early programming days. Opening Visual Studio project file directly in notepad and modifying the same. The .csproj file is an XML file and we were interested in the ProjectTypeGuids which stores reference to the project type.

<ProjectTypeGuids>{9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>


The GUID's stand for
{9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A} = SharePoint Solution
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} = Class Library

We removed the reference to SharePoint Solution GUID (and its semicolon separator), saved the file in notepad. And now when we open the project, the error is gone. Hurray!!!