Friday, July 5, 2013

How to show/hide ribbon and quick launch in SharePoint 2010?

Environment: Project Server / SharePoint 2010

Issue:
In one of my clients, we are using BI Center as a part of PWA (Project Server 2010) environment to create few dashboards for our executives. We want to show those dashboards on Executive site using Pager Viewer web part. The issue started when it showed the ribbon and quick launch on the Page viewer web part (See Fig – A). The goal was showing only the dashboard contents using excel, performance Point, SSRS and Visio services.

                                                                 Fig-A

Solution:

Please use the following steps to hide both the ribbon and quick launch bar.

1. Put the following script into a text file using notepad.

Script:
<style type="text/css">
#s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
.s4-ca{margin-left:0px !important; margin-right:0px !important;}
</style>

2. Upload it to any document library (accessible via the All Site Content page).
3. Add a Content Editor Web part on the page where you want to hide the ribbon and quick launch bar
3. Go to Content Editor Properties
4. Point to the correct URL of the file on the Content Editor Web part – Content link text.
5. To hide the Web part from normal view, under Layout Section Tick the Hidden Check box and Click OK.

After following the above steps, you will see the following page without Ribbon and Quick Launch

                                                                      Fig-B

Note:
At this stage, you can’t edit the page in normal fashion as all the Ribbon options have been hidden. In case you want to edit existing web parts or add a new web part, you can put the following script on the URL address to open this page on ‘Edit page’ mode.

javascript:MSOLayout_ToggleLayoutMode()



How to hide only Quick Launch in a SharePoint page?

Please use the same instructions as mentioned above except the script. Please use the following script to accomplish this task and in result, only quick launch will be hidden as shown in Fig- 3 below

Script:

<style>

#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}
</style>

 

                                                               Fig -3

Friday, April 12, 2013

Unable to open a project schedule from MS Project 2010 in Project Server environment – Schedule opening issue!

Environment: Project Professional 2010 SP1/ Project Server 2010
Issue:

One of my lead scheduler brought up an issue in accessing her schedule using MS Project Professional in Project server environment. When she tries to open a specific schedule on server, she gets the following error
She confirmed me that all other schedules have no issue at all but this one. She was not able to close this window as it freezes the MS Project Pro application. She first tried to kill MS Project application in Windows Task Manager but could not do that and eventually she killed Project (Winproj.exe) from process tab.

When I tried to see the exact error, it showed me the following error that does not help much.

Solution:
The first thing I checked if I am able to see project schedule in PWA (web client). I had no issue in opening that schedule in PWA. 
Initially I tried to restore the last saved specific project schedule from server. I was able to restore with 100% without any issue. I tried again to open the schedule from MS Project client; I got the same error mentioned above so this trick did not help much. Scheduler confirmed that she had no issue when she opened this schedule 2 days ago.
After doing a few tricks, I found the following steps worked for me and my scheduler was able to open the schedule this time without any issue.
Steps:
1-      Login to PWA
2-      Go to Project Center and click the affected schedule link
3-      Click ‘Project Details” PDP link and click ‘Edit’ button from Ribbon to edit project level custom fields.
4-      Click ‘Save’ button to save the project’s custom project fields.
5-      Close and check in the project schedule.
And bingo, scheduler was able to open her schedule without any issue. It looks like something happened during the last saving or publishing process that blocked communication between client and server and caused that issue. After saving the schedule from PWA, it removed all the blocks in the communication with server.