May 2009 - Posts
A lot of my customers want to view their share point contents in a “BI sexy way” on their site.
The common dream is about having a graph that will show high level information about a list, on real time. This article will show how to create such graph, with data view that uses Visifire Silverlight graph tools.
Our sample will be an "action items" list graph that shows the count of different status:

Step 1: Take resources from Visifire site
Download resources
1. Download visifire resources zip file (first link on page).
2. Upload SL.Visifire.Charts.xap and Visifire2.js to a library on your site, where your users have read permissions.
Design your graph
1. Go to the Silverlight chart designer page in visifire.com.
2. Create a mockup of your requested chart.

3. Click on “View HTML”
4. Copy the code between <!-- To embed in existing html copy the code below --> <!-- Copy till here --> to an new designer page.
Step 2: initial your data view web part
Create the data view
I’m not going to show the web part creation here, the best instructions for doing that are located in CIzi’s blog “My First Data View”.
Please note:
- Insert the title in multiple items view
- In data view properties, under “paging”, mark “display all items”
Do your calculations
The logic: we will create new parameters that will be the result of our wanted calculations. In this sample, we will tell the "data view" to go to over all items and to count each status items.
Under <xsl:template name="dvt_1"> add new parameters with your requested calculations.
The base is: <xsl:variable name="VariableName" select="yourCalculation" />
- Use the Xpath builder to assist in the calculation writing.

- In the calculation, use /dsQueryResponse/Rows/Row in order to go through all items.
- If you are dealing with string values, add normalize-space to the calculation.
For our sample:
<xsl:variable name="CompletedCount" select="count (/dsQueryResponse/Rows/Row [normalize-space(@Status) = 'Completed'])" />
Delete/ replace irrelevant tags
To select a tag, right click a tag name and choose select tag. Then, delete/ replace it.
On dvt_1 template:
- Delete the <xsl:call-template name="dvt_1.body"> tag
- Replace the <tr> tag with :
<tr valign="top"> <td> <!-- Graph Code --> </td> </tr>
Out of dvt_1 template:
- Delete <xsl:template name="dvt_1.body"> tag
- Delete <xsl:template name="dvt_1.rowview"> tag
It should look like that:

Step 3: modify visifire HTML
Link to the right resource
Modify the links to resources so they have the path to their location in your SharePoint library. For example:
src="Visifire2.js” > src="../SiteResources/Visifire2.js"
Visifire2("SL.Visifire.Charts.xap" > Visifire2("../SiteResources/SL.Visifire.Charts.xap"
Add JS variables to connect between XSL and graph
All the variables that we created on step 2 calculations, have to be read by the graph JS. So we will “translate” it:
- Under <script language="javascript" type="text/javascript"> line, add new variable for each calculation variable in the XSL. for example:
var VariableName = <xsl:value-of select="$XSLVariableName" />;
Put your variables into place
Replace the Yvalue with your new variables:
YValue="'15" > YValue="'+YourVariable+'"
The whole code should look like that:

Insert modified code
- Copy the modified HTML under the <!-- Graph Code --> in the data view XSL.
Step 4: E Viola!
- Save and publish if needed
- Your new graph is ready J
After installing SP2 for MOSS on several farms, I can say that in most cases, the operation goes smoothly. But when it gets wrong, it really gets wrong.
Here are some scenarios I have encountered, and the way they were solved (in most cases- with many thanks to Zohar Kimhi).
While installing SP2, you get an error – installer can't find a DB
While installing the SP2, the installation failed time after time because a content DB that couldn’t be found- no matter what we tried to do. Further investigation showed that it was a very old search DB that his related SSP web application and application pool where apparently deleted manually.
The only way to continue with the installation was creating a new "Temp SSP", using the DB name as its search DB.
After adding the temp SSP successfully, it was deleted fully, through central admin.
The installation succeeded without any error after that.
Site collections from specific content DBs are skipped in crawl
One of the weirdest issues ever- having a web application with several DBs where no crawl/ search issues happened in the past. After SP2 installation, only part of the content was crawled - Reset crawled content, full crawl, verify default account, restart services and even restart to all farm servers didn’t help.
The crawl rules shown that the contents should be crawled, many site collections where crawled successfully, but the site collections with the search problem, even didn’t appear in the crawl log.
Further investigation revealed that from 3 content DBs, only one was crawled (in central admin > application management > site collection list you can see which content DB is related to the site collection).
The only way to solve that issue was to remove and reattach the content DBs from the web application:
1. Went to central admin > application management > content databases
2. Chose on the upper right corner the web application where the non crawled DBs are.
3. Copied the DBs name to notepad (important! Most DBs have really long and "unmemorable" names)
4. Chose a non crawled DB > set it to be offline >OK.
5. Chose the DB again, checked "remove" >OK.
6. Repeated steps 3-5 to all the no- crawled DBs.
7. Now added the DBs by using STSADM command:
Stsadm –o addcontentdb –url http://YourWebApplicationURL -databasename Your_DB_Name
8. Started full crawl > crawling restored to all contents.
Search service doesn’t work/ Tips for DR…
Again –a weird issue, without a happy end: in one of the front end servers, after SP2 installation, the search services were up, but trying to search leaded to an error: "The search service is currently offline ".
Verifying admin account, restarting services and even restarting farm servers didn’t help.
In this case, only DR solved the issue:
1. Installed share point on a "Stand by" server.
2. Installed SP2.
3. Added the server to the farm.
4. Configured Kerberos (if needed) : added the server name with set SPN command.
5. Installed 3rd party products.
6. Reviewed and copied deltas between the "old" and "new" servers with the mostly recommended beyond compare tool. "Popular" places with deltas where:
- \\serverName\c$\Program Files\Common Files\Microsoft Shared\web server extensions (with the folders and files below it)
- \\ serverName \c$\Inetpub\wwwroot (with the folders and files below it)
- Web config in the virtual directories (note that the machine key should be kept in the new server web configs)
- \\ serverName \c$\WINDOWS\assembly
7. Checked for deltas in IIS configurations (only modifications through central admin duplicates on adding server to the farm).
8. Checked for regedit modifications deltas.
9. Checked that browsing through the new server have no errors.
10. Removed the services from the old server and added them to the new one.
11. Changed alternate access mapping if needed.
12. Changed DNS to the new server.
13. Kept the old server "partially alive" for some time, in order to have the relevant resources," just in case".
Have fun, Elad.
A lot of users don't know how to write a code, but still want to do neat stuff on the share point site.
It's been told that we can create impressive web parts with various functionalities, using designer. But at first, it looks very scary to do it –a lot of 'unreadable' HTML/XSL code. This article will show that it's easy to deploy fully costumed web part without knowing how to code.
I will provide a sample of a basic "Focus on you" web part:
- 'Teaser' web part in the team's page showing general data in a designed way.
- Clicking on "[More]" will link to the item itself.
Please Note: coding with HTML, XSL and CSS is the most recommended and flexible method. I provided here a "No-coding necessary" method in purpose, trying to show as many tips as I can:

Step 1- Create your list
In this sample, I have created a list that includes these columns:
- Focusing on- created 'person or group' column
- Title- using the out of the box column
- Page content- added from existing site column (multiple line of text is possible, but this is much easier to edit for users)
- Page image- added from existing site column (hyper link / picture is possible, but this is much easier to edit for users)
- Birthday- created 'Date and time' column


![]()
Step 2- Create sample items
Now, create some sample items, in order to test it later.
|
*tip*
After creating the basic page content, add it to "Reusable content" to make it easier to deploy:
1. Edit the content, and copy it.
2. Click on "reusable content" .
3. Choose "open list" and click on "new".
4. Uncheck "Automatic update"- so users will able to add their own contents
5. Paste your content under "reusable HTML" and click OK.
6. Now, when editing new item, users can choose "reusable content" and choose the relevant content to add. |
Step 3 – Create the layout of your web parts
1. Create the layout of your web part, using Word
Note: it is recommended to use HTML and CSS. But I deliberately have drawn a table using Word.
Sample:
|
Focusing on: (Focusing on) |
|
(picture) |
|
[More] |
Step 4- Create the data view web part on your page
1. Right click on the relevant page in designer > check out.
2. Right click on the relevant page > detach from page layout > yes > ok.
3. Double click the page- now you can edit itJ.
4. Click on the requested web part zone > Insert > SharePoint controls > data view

5. Data source library will appear on the right side. Click on your list > show data

6. Choose" title" column > Insert selected field as > multiple item view

We are almost there…..

Step 5- add your layout to the data view
1. Click on the 'Title' column name.
2. Choose TR section and delete it.

3. Copy your table from word.
4. Click on the title on the bottom of the page, and paste.
5. Apply styles:
a. Click on "task panes" toolbar > apply styles.
b. Mark the relevant section, choose a style and apply it.
>
6. Note: when coping word to designer, make sure to delete all </o: p> marks in code.
7. Save.
Step 6- advanced modification of the web part
1. Click on the arrow on the upper right side of the web part
2. Modify the relevant sections.

Step 6- insert the columns into your layout
3. Map your relevant columns:
a. Right click the column in "data source" on right side > copy item Xpath > paste to notepad.
![]()

b. Your column name is @ColumnName in the end of the line.

4. Mark the column and replace the relevant field, by using this table:
> 
| Column Type |
Replace with |
|
Single line of text |
<xsl:value-of select="@ColumnName "/> |
|
Multiple line of text |
<xsl:value-of select="@ColumnName " disable-output-escaping="yes"/> |
|
Choice |
<xsl:value-of select="@ColumnName "/> |
|
Number / currency |
<xsl:value-of select="format-number(@ColumnName, '#,##0.00;-#,##0.00')"/> |
|
Date and time |
<xsl:value-of select="ddwrt:FormatDate(string(@ColumnName), 1033, 5)"/> |
|
Lookup |
<xsl:value-of select="@ColumnName "/> |
|
Yes /No |
<xsl:choose>
<xsl:when test="@ ColumnName ='1' or msxsl:string-compare(string(@ColumnName),'Yes','','i')=0 or msxsl:string-compare(string(@ColumnName),'True','','i')=0">Yes</xsl:when>
<xsl:otherwise>No</xsl:otherwise>
</xsl:choose> |
|
Person group |
<xsl:value-of select="@ColumnName " disable-output-escaping="yes"/> |
|
Hyperlink |
<a href="{substring-before(@ColumnName, ', ')}">
<xsl:value-of select="substring-after(@ColumnName, ', ')"/>
</a> |
|
Picture |
<img border="0" src="{substring-before(@ColumnName, ', ')}" alt="{substring-after(@ColumnName, ', ')}"/> |
|
Page content (publishing HTML) |
<xsl:value-of select="@ColumnName " disable-output-escaping="yes"/> |
|
Page image (publishing image) |
<img border="0px" alt="" align="middle" src="{substring-before(substring-after(@ColumnName,'src="'),'"')}" /> |
| *tip*
You can change the way columns show in the page (like date and time, number, currency):
> > > 
|
| *tip*
You can always make the column a link: <a href="http://requested URL">Put text or <Put the column from the table></a>
For Example: the title will be link to CNN site: <a href="http://cnn.com"> <xsl:value-of select="@Title" /></a>
Sample example: clicking on [more] will link to the item display:
<a href="/sites/sitename/Lists/Focusingonyou/DispForm.aspx?ID={@ID}">
[More]
</a> |
Step 7- admire your self
1. Save.
2. Preview your page in browser.
3. Reattach the page and check in.
Hi,
My name is Elad Barkan and I'm a Share point expert at Omnisys.
I have a lot of experience with Share point - from infrastructure, through design and up to PS development and implementation.
Before cursing servers, I used to work in the fields psychology and tour guiding, knowing nothing about computers. Because of that, when started working in the computers field, always looked for the simple but creative solution for the requirements.
Even after all these years I still find my self "Playing with Plasticine", calling the result with funny buzz words like "IW WCM solution".
The main reason I started this blog is to help other people with my insights, tips and tricks. I will try to make it helpful, simple and friendly.
Enjoy.