Archive

Posts Tagged ‘MOSS 2007’

Exporting Admin Approved #InfoPath Forms. #SP2007 to #SP2010

Just a quick blog to remind myself for some research I am doing.

We need to export existing Administrator Approved InfoPath forms and I came across this article:

In short, use STSADM to export a CAB and reimport using PowerShell.

As it is an older article soooo… just in case I lose it.  The details are below:

Admin approved form from MOSS 2007 get deployed as features within the 12 features hive under folders named with GUIDs. These need special handling to be moved to SharePoint 2010. The following steps need to be performed.

a) Export the Admin approved IP templates using stsadm command.

using stsadm -o exportipfsadminobjects command export the IP forms to a CAB file.

b) Import this into the SharePoint 2010 environment using the Windows PowerShell 2.0 Import-SPInfoPathAdministrationFiles cmdlet.

c) Check if the files are imported correctly by browsing to the Central Admin –> Manage Infopath Form Templates.

 

Other useful resources I found in my research on this topic:

Details further usage and includes updating of data connection files associated with InfoPath forms.

The Update-SPInfoPathUserFileUrl Command will allow you to updates your data connections in InfoPath form templates (.xsn files) and universal data connections (.udcx files) where references in the current farm should be updated when content is migrated to a different farm URL.

Upgrade resource links SP2007 to SP2010 from Microsoft

PowerShell CMDLets for importing into SharePoint 2010

Import-SPInfoPathAdministrationFiles

Imports Microsoft InfoPath 2010 form templates and .udcx files that are located on the SharePoint Central Administration Web site.

Update-SPInfoPathAdminFileUrl

Updates InfoPath form templates (.xsn files) and universal data connections (.udcx files), including all .xsn files and .udcx files that were deployed by an administrator.

Update-SPInfoPathUrl

Runs a Microsoft InfoPath 2010 .xsn/.udc fix-up on Microsoft SharePoint Foundation 2010.

Update-SPInfoPathFormTemplate

Upgrades all Microsoft InfoPath form templates on the farm.

Till the next time…

SharePoint 2007 6641 Errors : Logon Type 4

February 21, 2012 Leave a comment

Recently I was asked to look at SharePoint 2007 install that was throwing 6641 “Logon failure: the user has not been granted the requested logon type at this computer” errors every few minutes and filling up the Application log.

 

image

We went through he normal steps of checking the service and SSP accounts, we did find that the Office Search Service had hung, but this wasn’t the problem, we checked various blogs on the web that seemed to point towards Kerberos being the problem, but this particular farm was only using NTLM. Thinking about the error “the user has not been granted the logon type at this computer”, got me thinking about logon types and failures, so a look in the Security  log turned up these errors that were coinciding with the 6641’s in the Application log.

image

Logon type 4 is a Batch logon, the farm account was calling this but the User Name called was for a secondary SSP that we didn’t think was used. The best way to fix this would be to give the secondary SSP account the ‘Logon as a batch Job’ right via local security policy, so preserving the principle of least rights for a service account, unfortunately we couldn’t do this so a temporary measure we added the secondary SSP account to the local admins group and the 6641 errors immediately stopped.

An unfortunate side effect of the above that that we started getting the IIS WAMREG DCOM activation errors in the System event log while not a problem in itself we fixed those as well, steps outlined here for Windows 2003 / WSS 3.0 (as this system was), just make sure ALL your accounts are in the WSS_WPG group.

Once those steps were taken all 3 event logs were error free.

Categories: MOSS Tags:

Documenting a SharePoint Farm

February 20, 2012 Leave a comment

Anyone involved with the building / running / supporting of a SharePoint system will know how important documenting the original build configuration is.

If you build farms using the excellent AutoSPIntaller, then most of your work is already done as you have to plan things like your service accounts and database names for the inputs.xml file.

But what if you are called into look at a system that you know nothing about ?. in this case the equally excellent SPSFarmReport will come to your help.

The download zip file has versions for both WSS 3.0 / MOSS (32 & 64 bit) and SharePoint Foundation / SP2010 / Project Server 2010.

Once downloaded onto one of your servers with the binaries installed, simply run the appropriate executable under Farm account credentials, once ran you can delete the executable if needed.

The report output file is a nicely formatted HTML document that covers just about every single aspect of your farm configuration, this can be used to create your documentation guide, and as a timed snapshot of your configuration for future comparison.

Content Query Web Part–Debug XSLT Template #in #SP2010 #SharePoint

Something I always forget and scramble around to find:

<xsl:template name="Debug" match="Row[@Style=’Debug’]" mode="itemstyle">
        <xsl:for-each select="@*">
            Property Name: <xsl:value-of select="name()"/>
            Value: <xsl:value-of select="." /> <br/>
        </xsl:for-each>
    </xsl:template>

 

Original blog post is here:

http://kharlesp.blogspot.com/2008/07/getting-all-values-to-debug-xsl-in.html

I will be posting more stuff on the blog soon.  Things are a bit manic at the moment Smile

Minimising JavaScript files for production #in #SharePoint #SP2010 #ProjectServer #PS2010

As per my previous post, in my current project we are starting to migrate the whole solution to live.

The project I am working on is a global solution with locations in UK, USA, India, China + others.  As a result of this, like many global projects, we suffer from the available connections.

This is potentially very minor in helping, but as part of the production process we are minimising the JavaScript files.

To do this, I have used the Yahoo compressor which is a java applet where you can pass in the file and output the minimised version.

Download Link: http://yuilibrary.com/downloads/#yuicompressor

How To Documentation: http://developer.yahoo.com/yui/compressor/#using

Example Command Line: java -jar yuicompressor-2.4.6.jar –nomunge –preserve-semi –disable-optimizations <input file> -o <output file>

Useful JavaScript Function – Default parameters within your JavaScript functions #in #SharePoint #SP2010 #PS2010 #ProjectServer

So it has been a while since I have posted anything on the blog.

As I am sure many of you can relate, there comes a time in all projects when you have to concentrate solely on them to ensure that all factors play out as expected.  One of those times would be go live time.

The project I have been working on for the last year is about to go into trial with its first division, so it has been heads down to ensure that all bug fixes and business intelligence data is correct.

As of today, we are officially at a code freeze and we are clearing down the databases to rid them of test data ready for migration to the Production environment and the final integration testing process.

As a result, we can commence blogging again, of which I have a few topics stored up.

First up is…

Default parameters in a JavaScript function

Project Scenario: I created a generic function to contact the User Profile service and set some default global variables when the page loads for the current logged in user.

This had to be extended to cope with me passing a different AD User Name (SAMAccountName) and return the details in a JavaScript object.

So the basic mechanism was there already.

  • I was passing the current user as a variable
  • User Profile Service was already being queried
  • Set the global variables for the current user

I wanted to extend this to take any user, but not upset the other functions that relied on the global variables I was setting in the function.

So essentially I added a setGlobal flag parameter and provided a default to the function so that existing code could work (surrounded by the newly created flag of course) and then implemented what I needed to.

This allowed my existing code to continue to function without issue, but also allowed me to reuse my User Profile functionalities for another purpose.

Examples:

The original idea came from the following blog post:

In my code, I implemented the first method.  In future however I shall certainly use the second approach.

Unique alphanumeric list ID’s via SPD Workflow and Calculated Columns #SharePoint #SP2010 #in

March 9, 2011 16 comments

A common thing I do for most clients is to create a unique alphanumeric ID that is consistent in length with pre-filled zeros.

Risk list alphanumeric ID example:

  • RSK0001

However, as has been documented many times (link); you cannot use the ID column of a list in a calculated column.  To get over this issue I use a simple SharePoint Designer workflow to copy the ID value to another column (Unique Reference) and then base my calculation on the Unique Reference column.

Step One: Create a common site column for use across the Site Collection

  • Column Name: Unique Reference
  • Column Type: Single Line Of Text

Step Two: Create a calculated column for the alphanumeric ID

  • Column Name: Risk ID
  • Column Type: Calculated Column
  • Formula: =”RSK” & TEXT([Unique Reference], “0000”)

NB: The TEXT function will prefill the ID with zeros

    Step Three: Add the Unique Reference and Risk ID column to your List or Content Type

Step Four: Create the SharePoint Designer Workflow

  • Create a list or content type (SP2010 only) workflow
  • Workflow should fire on Creation only (disable Manual and Edit)
  • Use the following steps:

image

  • Publish the workflow (list workflow)

OR

  • Assign the workflow to the content type (if you have created a redistributable workflow in SPD 2010) and assign the content type to the list (content type workflow)

Step Five: Hide the Unique Reference column in the list / content type

  • This will stop the Unique Reference column from showing to the end user.

NB: You must hide the Unique Reference column after you have created and published the workflow otherwise it will not appear in SharePoint Designer

You list items will now have a unique alpha numeric ID

NB: Please remember that automatic workflows will not fire if you are logged in as the farm account (link)

Calculated Column Formula: Probability and impact analysis for risks #SharePoint #SP2010 #ProjectServer #PS2010 #EPM #MSProject #in

March 9, 2011 2 comments

Many project managers like to do risk analysis in terms of probability and impact, ultimately creating a heat map when data is rolled up at the project or programme level.

Further information about the methodology can be found here: http://www.expertprogrammanagement.com/2010/06/project-risk-management/

To aid in the creation of these roll up dashboards, we need to evaluate each risk as it is entered (and updated) and assess the probability of the risk occurring against the impact it has against the project (normally in terms of Cost, Resource or Time).

The following chart details this analysis:

probabilityVsImpact

NB: Numeric values have been assigned for the formulas listed below

To implement this in SharePoint (either standalone or as an extension to the standard Risks list in Project Server) we need to translate what the Project Manager / Team Members would like to state in words regarding probability & impact into a numeric value for sorting and analysis.

The following Choice columns are added to the Risk form.

User Interface Columns:

Column Type Values
Probability of Risk Choice Very Low, Low, Medium, High, Very High
Impact of Risk Choice Very Low, Low, Medium, High, Very High

Once we have the UI version of Probability and Impact, we need to use some hidden / calculated columns to convert these values in to numbers.

Once we have these values we then multiply them together:

Probability x Impact = Expected Outcome Value

Hidden Columns:

Column Type Values
Risk Probability Value Calculated Column =IF([Probability of Risk]=”Very Low”,0.1,IF([Probability of Risk]=”Low”,0.3,IF([Probability of Risk]=”Medium”,0.5,IF([Probability of Risk]=”High”,0.7,IF([Probability of Risk]=”Very High”,0.9,0)))))
Risk Impact Value Calculated Column =IF([Impact of Risk]=”Very Low”,0.05,IF([Impact of Risk]=”Low”,0.1,IF([Impact of Risk]=”Medium”,0.2,IF([Impact of Risk]=”High”,0.4,IF([Impact of Risk]=”Very High”,0.8,0)))))
Expected Value Result Calculated Column =[Risk Probability Value]*[Risk Impact Value]

Now that we have our Expected Outcome as a number, we can convert this back to a value the end user will understand, report and dashboard from.

RAG Outcome:

Column Type Values
RAG Calculated Column =IF([Expected Value Result]<0.05,”Green”,IF([Expected Value Result]>0.14,”Red”,”Amber”))

For each risk in the list we will now have a RAG value.

Further customisations I end up doing in clients include adding a RAG indicator column showing a graphical representation of the risk using jQuery.

RAG Indicator:

Column Type Values
RAG Indicator Calculated Column =”<div class=’convertToHTML’><img src=’/pwa/customisation/images/RAG” & [RAG] & “Sml.gif’ alt=”‘ & [RAG] & ‘” title=”‘ & [RAG] & ‘”></div>”

The above formula expects three images:

  • RAGGreenSml.gif
  • RAGAmberSml.gif
  • RAGRedSml.gif

Images in the formula are stored in a document library called:

  • Customisation

with a folder inside called:

  • images

Run the following jQuery function on the page with the list view on to convert the RAG Indicator calculated column string into rendered html:

1 function listViewCalcColChangeToHTML() { 2 $('table[class=ms-listviewtable]').find('td:contains("convertToHTML")').each(function() { 3 $(this).html($(this).text()); 4 }); 5 }

Calculated Column Formula: Date Format #SP2010 #SharePoint #in

March 9, 2011 1 comment

Just a reminder for me really… At a client at the moment who wants to put the date in list web parts in the following format: dd-MMM-yyyy.

I found the following article suggesting using the TEXT function in a Calculated Column

http://www.sharepointusecases.com/index.php/2009/01/customizing-datetime-format-on-a-list-view-web-part/

Formula Example:

1 =TEXT(Created,"dd-mmm-yyyy")

Output:

09-Mar-2011

Useful findings whilst learning Reporting Services with #SP2010 #SharePoint #PS2010 #ProjectServer

So the first phase of the project I have been on for the last year is starting to move into the closing phases.  The information architecture is in place, most of the custom development is complete and mapped to the project lifecycle / business processes of my client.

The project takes data from multiple places including:

  • SAP (Resource, cost rate, metadata and product contract information)
  • Project Server 2010 (Timesheets, Plans, Project / Task / Assignment data)
  • SharePoint 2010 (Risks, Issues, Actions, Documents etc.)
  • Custom database (Snapshot data)

I’ve learnt a lot about SharePoint 2010 and Project Server 2010 since I started this project (pre public beta).  So now that we have all this data, the time has come to bring it all together with Business Intelligence dashboards and UI design.

Once of the main tools we are using for this is Reporting Services in SharePoint Integration mode and although I have lead projects involving SSRS in the past, actually getting my hands dirty and creating reports myself is something of a novelty.

However, time and resource pressures have meant that I have had to setup the SSRS infrastructure, development environments and test reports to ensure that the data can be utilised in the required way.  As part of this setup I am also training my client on the business intelligence studio interface and deployment of reports in to SharePoint environment.

So getting to the point of this post, below is a list of useful links, findings and discoveries I have made during this setup process this week to serve as a reminder to me and will hopefully help others too.

 

Reporting Services Web Part – Firefox Compatibility (Windows, Linux – 3.6.13)

  • Turn off Asynchronous data (Edit Web Part Settings > View Section)

NB: If this setting is left to its default, the loading screen does not go away until you hit the refresh button on the Web Part toolbar.

 

SharePoint Integration Mode – Linking to pages within SharePoint

It would appear that the Reporting Services web part in SP2010 disables links where the target URL is within SharePoint itself (“/pages/default.aspx” for example).

This blog post suggested a useful workaround:

However the suggested approach was good if you had a definitive URL such as default.aspx, but if you wanted to add a query string parameter based on the data returned, adding as action directly to the image did not allow me to select the appropriate date.

To get round this, I added a calculated field to the data set using the same process suggested in the post:

="javascript:void(window.location.href='/pages/projectdashboard.aspx?projectid='" + dataset.fields[<field name>] +")"

NB: Since working this out, I have extended it to use a standard JavaScript function that is running from the Master Page to make links in the reports more generic.

Then for the action on the image I was able to select “Go to URL” and select my calculated field.

This doesn’t work in the designer preview (or any exports of the report), however it works a treat when you are using the report as part of a dashboard with drill down features.

 

Interactive Column Sorting

Another useful blog post:

Although the instructions are for SSRS 2005, it is still relevant today.

  • Right click on the column header field
  • Select Properties
  • Interactive Sort Tab
  • Select the appropriate sort field
  • Click OK

 

Alternating Row Colours

Always a popular choice for tabular based reports.

Highlight the data row and under the properties pane for the background color, use the following expression:

=IIf(RowNumber(Nothing) Mod 2 = 0, "#F7F7F7", "#FFFFFF")

 

 

MSDN Documentation Links

NB: Although a lot of the above links are for SSRS 2008, there is an option at the top of the page to make the content relevant for SSRS 2008 R2 also.