May 23, 2012

Error: The language-neutral solution package was not found.

While using Visual Studio, you may get the following error
“The language-neutral solution package was not found.”
Solution:
There are three ways you can fix this problem:
1. This may be caused due to the CACHING issue in the Visual Studio and hence restarting the Visual Studio will help you in fixing the issue.
2. Sometimes the solution you are trying to update will not get updated properly. Hence delete the following folders (By navigating to In Visual Studio   -> Right click on project in Solution Explorer window -> Select Open folder in Windows Explorer)  bin, obj and package.
After deleting these folders, rebuild and deploy the solution which will work out.
3. Or finally, you can retract the solution from the Central Admin (in case of SharePoint related issues) and then uninstall the solution dll from the assembly folder. Then try to deploy the solution.
Please free to comment and share this post, if this helps you!

May 16, 2012

Chart Controls in ASP.Net

I was looking at creating chart controls for implementing in the .Net web applications. I didn’t like to use the 3rd party tools or any freeware tools. Well, while browsing found a cool feature provided by MICROSOFT for the same.
In this article, we will have a look at the CHART CONTROLS in .Net applications.
Pre-requisites
Ø  Visual Studio 2008 SP1, Link to download
Ø  .NET Framework 3.5 SP1, Link to download
Ø   Microsoft Chart Controls, Link to download
Ø  Visual Studio 2008 Add-on for the Chart Controls, Link to download
Ø  Documentations by Microsoft, Link to download
Ø  Web and Windows Application Samples, Link to download
Types of Charts
Ø  Area Charts
Ø  Bar column Charts
Ø  Circular Charts
Ø  Combination Charts
Ø  Data Distribution Charts
Ø  Error Bar
Ø  Financial Charts
Ø  Line Charts
Ø  Pie Doughnut Charts
Ø  Point Charts
Ø  Price Range Financial Charts
Ø  Pyramid Funnel Charts
Ø  Range Charts
Examples
The examples provided by Microsoft are very clear and easy. Hence you can download and try the samples. Also, the control is easy to use, just drag and drop the control and start using it.
Namespace
The namespace which we use here is System.Web.UI.DataVisualization.Charting.
More about Chart Controls
Ø  This control is not available for Visual Studio 2005.
Ø  It is available as a native component in Microsoft Visual Studio 2008 SP1.  First you have to install the Chart Controls provided by Microsoft and then the add-ons for using the control.
Ø  But in Visual Studio 2010, it is present as inbuilt component. We can just use it!
More Useful Reference Links
Installing and using Chart Controls in Visual Studio 2010, here.
Using Chart Controls in Visual Studio 2005, here.
Happy Sharing!

Windows System Shows Blank Screen after logging in

Scenario:
I have faced many situations like after logging into the Windows Operating system machine (Especially Windows 7 and Windows Server which I have faced); it takes more hours showing a BLANK SCREEN without showing the desktop. It wasted my time more. So I was searching for a solution which would help in fixing the issue.
Solution:
1. Press CTRL + ALT + DEL
2. Select Start Task Manager from the list
3. In the Task Manager Select -> File -> New Task (New Task (Run...)) – I have Win 7 as shown below:
4. Type “Explorer” in the text box and click OK.
5. Now, you will see the explorer opening suddenly and also your desktop is ready to use.
Hope this helps some one’s time. Happy Sharing!

May 14, 2012

Change the Color of a Column in a List in SharePoint

In this article, we will know how to change the color of a column based upon the values in the column. It is something like “Color Indicator” in SharePoint.
Scenario:
We have a custom list used for Project Tracking. In the list, we have column named STATUS for tracking the project.
Whenever an item in the list is updated with the status in the column, then the background color of the status column should automatically change depending upon the status. Hence it gives a better UI for tracking the status.
Solution:

1. Create a custom list named “Project Tracking System” with the columns such as “Title”, “Description” and Status with the data type as shown below:

Columns with the data types to be created:

2. Now, we will insert 4-5 items in the list created. 
In the above list, we can see that the status column is updated, but it would be good when we have background color of the each status separately. It is gives easy tracking to the users.
3. We can achieve this through JAVA SCRIPT
4. Add a Content Editor Web part below the list as shown below:
5. Now in the content editor web part, add the below java script code (Open the tool pane->Source Editor->Place the Java Script->Click Ok) and save the page.
Add the below code in the script JavaScript tag
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var colorCode = document.getElementsByTagName("td")// finding all the TD tags
var i=0; 
for (i=0;i
{
if (colorCode[i].className=="ms-vb2")  
{ 
if (colorCode[i].innerHTML=="Not Started")//finding the word to which the color has to be set
{ 
colorCode[i].style.backgroundColor='lightblue'; // setting the color depending upon the value
colorCode[i].style.color='Black'; // setting the color of the words inside the content                                     
} 
if (colorCode[i].innerHTML=="Started")  
{ 
colorCode[i].style.backgroundColor='Brown';
colorCode[i].style.color='Black';
} 
if (colorCode[i].innerHTML=="In Progress")  
{ 
colorCode[i].style.backgroundColor='Orange';
colorCode[i].style.color='Black'; 
} 
if (colorCode[i].innerHTML=="Completed")  
{ 
colorCode[i].style.backgroundColor='green';
colorCode[i].style.color='Black'; 
} 
if (colorCode[i].innerHTML=="Deffered")  
{ 
colorCode[i].style.backgroundColor='Red'; 
colorCode[i].style.color='Black'; 
} 
} 
}

6. Now, you can see the status column background is changed depending upon the status inserted for each item as shown below:
It gives good interface to the users and also we can categorize the status easily.
Please free to comment and share the post, if it helps you!

May 10, 2012

Remote Blob Storage (RBS) in SharePoint 2010

In this article, we will know about a new feature in SharePoint 2010 which allows the remote storage in SharePoint.
What is Remote BLOB Storage?
     Ø  BLOB – Binary Large Object
Ø  Remote BLOB Storage (RBS) is a library API set that is incorporated as an add-on feature pack for Microsoft SQL Server.
Ø  It can be run on servers with Microsoft SQL Server 2008 R2, SQL Server 2008 or SQL Server 2008 R2 Express. To run RBS on a remote server, you must be running SQL Server 2008 R2 Enterprise edition.
Ø  RBS is not supported for Microsoft SQL Server 2005.
Ø  In Microsoft SharePoint Server 2010, RBS can be used for content databases only.
Why RBS?
It provides the following benefits:
Ø  BLOB data can be stored on less expensive storage devices that are configured to handle simple storage.
Ø  The administration of the BLOB storage is controlled by a system that is designed specifically to work with BLOB data.
Ø  Database server resources are freed for database operations.
When to Go for RBS?
Ø  Large Database of Mostly Binary Data
Ø  Digital Asset Management Databases
Ø  When Storage Tiers Need to be Implemented
Ø  When Storage Needs to be Optimized
You can expect to benefit from RBS in the following cases:
Ø  The content databases are larger than 500 gigabytes (GB).
Ø  The BLOB data files are larger than 256 kilobytes (KB).
Ø  The BLOB data files are at least 80 KB and the database server is a performance bottleneck. Then, RBS reduces the both the I/O and processing load on the database server.
RBS Advantages over EBS (External Blob Storage)
Hope this explains about the basics of RBS in SharePoint 2010.
I came across a good article explaining about Configuring Remote Blob Storage for SharePoint 2010. Here is the link.
Happy Sharing!

May 9, 2012

CAML Query to Get Data from SharePoint List

To know about the Basics of the CAML query read this article.
To know about using CAML query builder to create CAML queries, read this article.
In this article, we will learn how to use CAML query in Microsoft Visual Studio
Scenario:
I have a custom list named “Product List” with the columns named Title, Price, Quantity and Is Available.
I want to retrieve the products with price greater than 1000 and lesser than 10000. Then I have to order the results depending upon the quantity in descending order.
Using the CAML query builder, I have created a CAML query for the above scenario and the query is as follows:
<Query><Where><And><Gt><FieldRef Name="Price" /><Value Type="Number">1000</Value></Gt><Leq><FieldRef Name="Price" /><Value Type="Number">10000</Value></Leq></And></Where><OrderBy><FieldRef Name="Price" Ascending="False" /></OrderBy></Query>

Implementing CAML Query in Microsoft Visual Studio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace UsingCAMLQuery
{
    class Program
    {
        static void Main(string[] args)
        {
            const string camlQuery = @"100010000";
            try
            {
                using (SPSite objSite = new SPSite("sitename"))
                {
                    using (SPWeb objWeb = objSite.OpenWeb())
                    {
                        // Building a query
                        SPQuery query=new SPQuery();
                        query.Query=camlQuery;
                     
                        // Retrieving the data from the List
                        SPList objList=objWeb.Lists["Product List"];
                        SPListItemCollection items= objList.GetItems(query);

                        // Prinitng the header
                        Console.WriteLine("{0,-25} {1,-20} {2,-15} {3}", "Title", "Price", "Qunatity", "Is Available");

                        foreach (SPListItem objListItem in items)
                        {
                            Console.WriteLine("{0,-25} {1,-20} {2,-25} {3}", objListItem["Title"], objListItem["Price"], 
                                                                             objListItem["Quantity"], objListItem["Is Available"]);
                        }

                    }
                    Console.ReadLine(); 
                }
 
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error Occured:", ex.Message);
            }
            Console.ReadLine();
        }
    }
}
The full solution can be downloaded from the following link
Please free to comment and share this post if it helps you!

The list cannot be displayed in datasheet view for one or more of the following reasons in SharePoint

I was easily changing my list view by edit in data sheet view and in standard view. 
After sometime, when I tried to edit a SharePoint list in DATASHEET view, I got the following error which doesn't allow me to view the list in the datasheet view and shown up a error as shown below:
Solution:
Clearly, the problem is due to some DLL's in the MS office is creating this problem.
Hence, either of the following solutions will help you to fix this error:
Microsoft Office diagnostics
Run the Microsoft office diagnostics tool by navigating to the following location:
Start -> All Programs -> Microsoft Office -> Microsoft Office Tools -> Microsoft Office Diagnostics
This will repair the office setup installed in the machine. you may see the following screens running once started
Once completed, you will see the following screen:
                            
Installing Office2007 SharePoint Components
I read a wonderful article for this and the link is
Either of the above solutions will help you in fixing this issue.
Hope this saves some one’s time. Happy Sharing!