Thursday, 4 November 2010

SharePoint: Customizing the Quick Launch menu

Customizing the Quick Launch menu to display several levels of data in a dynamic way and use this customized menu for quick access to all Views within a List without consuming space on the Quick Launch.
First, let’s add a List and make sure it shows on the Quick Launch. Let’s call this list “Navigation Test List”, and then add 4 Views to the list.
Next, let’s write some OM code that, when run, adds a link to each of the List’s Views under the List Link on the Quick Launch. Add the following code to a new C# Console Application in Visual Studio .NET or 2005 (and don’t forget to add a reference to Microsoft.Sharepoint.dll).
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Navigation;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SPSite site = new SPSite("http://server");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["Navigation Test List"];
SPNavigationNode rootListLink = web.Navigation.GetNodeByUrl(list.DefaultViewUrl);
SPNavigationNode node = null;
foreach (SPView view in list.Views)
{
node = new SPNavigationNode(view.Title, view.Url, false);
rootListLink.Children.AddAsFirst(node);
}
}
}
}

At this point, we have links to all of the Views under the List, but they cannot be displayed since the menu control ignores the links after the second level. So, let’s modify the menu control to display what we want. Perform the following to accomplish this task:

1. Navigate to the master page gallery: From the home page click on Site Actions, then Site Settings, and then on Master Pages, under the Galleries column
2. Click on the drop down menu for the master page you want to modify, and then click on Edit in Microsoft Office SharePoint Designer
3. Locate the Quick Launch Menu control, and modify the StaticDisplayLevels and MaximumDynamicDisplayLevels attributes:
id="QuickLaunchMenu"
DataSourceId="QuickLaunchSiteMap"
runat="server"
Orientation="Vertical"
StaticDisplayLevels="2"
ItemWrap="true"
MaximumDynamicDisplayLevels="1"
StaticSubMenuIndent="0"
SkipLinkText="">

4. Save your changes and reload the page from the browser. Hover over the Links on the Quick Launch. The end result should look like this:

5. Optional: Modify other properties in the menu control to match the look and feel of your site. The above steps can also be applied to the Top Link Bar.

ASP .net: css tips

Simply use the "!important" tag and the background color will be forced behind the arrow.

.ms-topNavFlyOutsHover
{
background-color:#FFCC00 !important;
color:#000000;
}

SharePoint: Actice Menu dropdown flyout

MOSS 2007 sites can display drop down menus in the tabbed navigation across the top. Unfortunately there is not an easy check box to activate this functionality, instead things just have to be set up the right way. If you want your MOSS site to show drop down menus, make sure the following is true or walk through the following steps:
From the root of the parent site (Home) choose to create a new site (Site 1). Once that site is created, you will be in that new site. From here choose to create a new page.
Once that is created, choose to create another new site (Sub Site 1). Then create a new page in Sub Site 1.
Your site structure should resemble this, see structure.
For each site in the Navigation settings, both Show Subsites and Show Pages should be checked.
Select Site Actions - Site Settings - Modify Navigation.
Check Show subsites and Show pages in the first row. See sample.
The end result would be a tab in the horizontal bar for Site 1, with a vertical drop showing Sub Site 1. See sample.
The navigation shows sub sites under the parent and published pages at the parent. Pages for one site are stored flat in a single library. If you want the navigation to show 2nd level sub site pages or 3rd level sub sites under the 2nd level, you need to make a very minor tweak to the master page that the site is using.
Using SharePoint Designer (SPD), open the master page being used by the site. Warning! Making edits to this file will customize the file, a.k.a. unghost it. Don't worry you can always undo this action.
In SPD, navigate to _catalogs/masterpage/*.master
How do you know which master the site is using? In the site, go to Site Actions - Site Settings - Modify All Settings, then choose Master page under the Look and Feel column. Check which master page is selected in each drop down.
In the master page file, search for SharePoint:AspMenu.
You will more than likely have more than one instance of a menu control. Look at the IDs to find the right navigation control for what you want to edit. They are intelligently named, you will be able to sort out which one you need. For default.master, look for ID="TopNavigationMenu".
In the properties for the tag, find MaximumDynamicDisplayLevels="1". Change the number from 1 to 2.
Save the file and publish the master page (do this from SPD, Manage Content and Structure, or the Master Page Gallery).
Refresh your browser. Now when you mouse over Site 1 - Sub Site 1, you should see another level of navigation pop up. See sample.
Cool, ehh? Please don't abuse this dynamic display level. As tempting as it is to provide instant access to something 5 levels deep in your site, drop down menus notoriously aggravate end users. I highly recommend using no more than 2 levels (what we set in this walk through).

SharePoint: Logging files

If the solution that redeploy report by SQL Server Business Intelligence Studio doesn’t work. May I have your system environment information?
1. Operating System Version
2. SQL Server Version
3. WSS 3.0 or SharePoint 2007 or Others

Generally, you may try steps below:
1. Check Reporting Service Status from Reporting Service Configuration
You may check Status of Reporting Service and confirm if it is integrated mode.

2. Check Settings of Report Server in SharePoint Central Administration
You may check if it has correct Report Server Web Service URL and Authentication Mode.

3. Check Authentication Provider for your Report Center Web Application from SharePoint Central Administration

4. Detail log of report server
You may find these logs from “C:\Program Files\Microsoft SQL Server\MSSQL.x\Reporting Services\LogFiles\”.

5. In OS Event Viewer, could you find out some Error information from Application log?

6. Detail SharePoint log
You may find these logs from “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS\”.

SharePoint: Good examples

http://www.getsharepoint.com/ourwork/pages/ourwork.aspx

http://getsharepoint.com/SI/default.aspx

SharePoint: Increase upload max file size

Changing the maximum file upload size in SharePoint
The default file upload size in SharePoint is 50 MB. Sometimes, you may have users that need to upload documents that are larger. This is quite easy to change. Simply go to Central Administration -> Web Application General Settings. Select the Web Application you want to change, and you will see a textbox to specify the maximum upload size. Before I remembered to look here, I tried changing it the old ASP.NET way, by changing the following line in the web.config.

Interestingly, the file size specified here is also 50 MB, but changing it here does not allow you to upload a larger file into a document library. I also figured I might have to change it to match whatever I had set in SharePoint but you don't. You can leave it the same and upload a 100 MB file into SharePoint just fine (provided you changed the setting). So from what I can tell SharePoint does not use this setting at all and it would only apply if you had written a custom upload form using ASP.NET.