ಶೇರ್ಪಾಯಿಂಟ್ ರಲ್ಲಿ ಬಾರ್ ಗ್ರಾಫ್ ರಚಿಸಿ

ಸ್ಥೂಲ ಸಮೀಕ್ಷೆ:

(ನವೀಕರಿಸಲು 12/04/07: ಒಂದು ಕುತೂಹಲಕಾರಿ ವೆಬ್ ಭಾಗದ ಮೂಲಕ ಬಗೆಹರಿಸುತ್ತದೆ ಮತ್ತೊಂದು ಬ್ಲಾಗ್ ಲಿಂಕ್ ಕೊನೆಯಲ್ಲಿ ಮತ್ತೊಂದು ಆಸಕ್ತಿದಾಯಕ ಸಂಪನ್ಮೂಲ ಸೇರಿಸಲಾಗಿದೆ)

This blog entry describes how to create a bar graph in SharePoint. This works in both WSS and MOSS environments as it only depends upon the data view web part.

The overall approach is as follows:

  1. Create a list or document library that contains the data you want to graph.
  2. Place the associated document library / custom list onto a page and convert it to a data view web part (DVWP).
  3. Modify the DVWP’s XSL to generate HTML that shows as a graph.

ವ್ಯಾಪಾರ ಸನ್ನಿವೇಶ / ಸೆಟಪ್:

I have created a custom list with the standard Title column and one additional column, "Status". This models (very simplistically) an "Authorization For Expense" scenario where the title represents the project and the Status a value from the list of:

  • Proposed
  • In Process
  • Stalled

The objective is to produce an interactive horizontal bar graph that shows these status codes.

I have populated the list and it looks like this:

ಚಿತ್ರ

Create Data View Web Part:

Create the DVWP by adding the custom list to a page (site page in my case) and follow the instructions ಇಲ್ಲಿ (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!395.entry).

In addition to simply creating the DVWP, we also need to set the paging property to show all available rows. ನನಗೆ, this looks something like this:

ಚಿತ್ರ

ಈ ಹಂತದಲ್ಲಿ, I always close SPD and the browser. I then re-open the page using the browser. This avoids accidentally mucking up the web part layout on the page.

Modify the XSLT:

It’s now time to modify the XSLT.

I always use visual studio for this. (ನೋಡು ಇಲ್ಲಿ for an important note about intellisense that will help you a lot).

I create an empty project add four new files (replacing the words "Original" and "New" as appropriate):

  • Original.xslt
  • New.xslt
  • Original Params.xml
  • New Params.xml

ಪ್ರಕರಣದಲ್ಲಿ, ಈ ತೋರುತ್ತಿದೆ:

ಚಿತ್ರ

Modify the web part and copy the params and XSL to the "Original" version in Visual Studio.

The objective here is to cause the XSL to transform the results we get back from the DVWP query into HTML that renders as a graph.

ನಿವೃತ್ತಿಗೆ, it helps to first consider what the HTML should look like before we get confused by the insanity that is known as "XSL". (To be clear, the following is simply an example; don’t type it or copy/paste into visual studio. I provide a full blow starting point for that later in the write-up). The following sample graph is rendered as per the HTML immediately following:

Sample Bar Graph

Corresponding HTML:

<HTML>
<ದೇಹ>
<ಕೇಂದ್ರ>
<table width=80%>
<TR><ಟಿಡಿ><ಕೇಂದ್ರ>Horizontal Bar Graph</ಟಿಡಿ></TR>
<TR>
<td align="center">
<table border="1" width=80%>
<TR>
<td width=10%>Open</ಟಿಡಿ>
<ಟಿಡಿ><table cellpadding="0" cellspacing="0" border=0 width=50%><ಅನುವಾದ bgcolor = ಕೆಂಪು><ಟಿಡಿ>&nbsp;</ಟಿಡಿ></TR></ಮೇಜು></ಟಿಡಿ>
</TR>
<TR>
<td width=10%>ಮುಚ್ಚಲಾಗಿದೆ</ಟಿಡಿ>
<ಟಿಡಿ><table cellpadding="0" cellspacing="0" border=0 width=25%><ಅನುವಾದ bgcolor = ಕೆಂಪು><ಟಿಡಿ>&nbsp;</ಟಿಡಿ></TR></ಮೇಜು></ಟಿಡಿ>
</TR>
<TR>
<td width=10%>Stalled</ಟಿಡಿ>
<ಟಿಡಿ><table cellpadding="0" cellspacing="0" border=0 width=25%><ಅನುವಾದ bgcolor = ಕೆಂಪು><ಟಿಡಿ>&nbsp;</ಟಿಡಿ></TR></ಮೇಜು></ಟಿಡಿ>
</TR>
</ಮೇಜು>
</ಟಿಡಿ>
</TR>
</ಮೇಜು>
</ದೇಹ>
</HTML>

I used a dead simple approach to creating my bars by setting the background color of a row to "red".

The take-away here is this: ಕೊನೆಯಲ್ಲಿ, all we are doing is creating HTML with rows and columns.

Template XSLT:

I’ve copied the XSLT that generates a horizontal bar graph. It’s fairly well commented so I won’t add much here except for these notes:

  • I started with the default XSL that SharePoint Designer gave me when I first created the DVWP.
  • I was able to cut this down from SPD’s 657 lines to 166 lines.
  • I didn’t mess around with the parameters XML file (which is separate from the XSL and you’ll know what I mean when you go to modify the DVWP itself; there are two files you can modify). ಹೇಗಾದರೂ, in order to simplify it, I did remove nearly all of them from the XSL. This means that if you want to make use of those parameters, you just need to add their variable definitions back to the XSL. That will be easy since you will have the original XSL variable definitions in your visual studio project.
  • You ought to be able to copy and paste this directly into your visual studio project. ನಂತರ, remove my calls and insert your own calls to "ShowBar".
  • The drill down works by creating an <ಒಂದು href> ಈ ರೀತಿಯ: http://server/List?FilterField1=fieldname&FilterValue1=actualFilterValue. This technique may be of value in other contexts. ಮೊದಲಿಗೆ, I thought I would need to conform to a more complex format: http://server/List/AllItems.aspx?View={guid}&FilterField1=blah&FilterValue1=blah, but in my environment that is not necessary. The List’s URL is passed to us by SharePoint so this is quite easy to generalize.

Here it is:

<XSL:stylesheet ರೂಪಾಂತರ="1.0" exclude-result-prefixes="rs z o s ddwrt dt msxsl" 
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:XSL="HTTP://www.w3.org/1999/XSL/Transform"
xmlns:ಶೇರ್ಪಾಯಿಂಟ್="Microsoft.SharePoint.WebControls" xmlns:__designer="HTTP://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:ASP="HTTP://schemas.microsoft.com/ASPNET/20" xmlns:ddwrt="HTTP://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:o="urn:schemas-microsoft-com:ಕಚೇರಿ" xmlns:ರು="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"
xmlns:ddwrt2="urn:frontpage:internal"
> <XSL:output ವಿಧಾನ="HTML" indent="no" /> <XSL:ಫೆಸಿಲಿಟಿ ಆಕಾರದ NaN="" /> <XSL:PARAM ಹೆಸರು="ListUrlDir"></XSL:PARAM> <!-- I need this to support a drill-down. --> <XSL:ಪ್ರಮಾಣ ಫಲಕ ಹೊಂದಾಣಿಕೆ="/" xmlns:ಶೇರ್ಪಾಯಿಂಟ್="Microsoft.SharePoint.WebControls"
xmlns:__designer=http://schemas.microsoft.com/WebParts/v2/DataView/designer xmlns:ASP="HTTP://schemas.microsoft.com/ASPNET/20"
> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="dvt_StyleName">ಮೇಜು</XSL:ಬದಲಾಯಿಸಬಹುದಾದ> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="Rows" ಆಯ್ಕೆ="/dsQueryResponse/Rows/Row" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="dvt_RowCount" ಆಯ್ಕೆ="count($Rows)" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="IsEmpty" ಆಯ್ಕೆ="$dvt_RowCount = 0" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="dvt_IsEmpty" ಆಯ್ಕೆ="$dvt_RowCount = 0" /> <XSL:ಆಯ್ಕೆ> <XSL:ಯಾವಾಗ ಟೆಸ್ಟ್="$dvt_IsEmpty"> There is no data to graph!<ಬಿಆರ್/> </XSL:ಯಾವಾಗ> <XSL:ಇಲ್ಲವಾದರೆ> <!-- The interesting stuff begins here. We need to define a pair of variables for each row in the graph: total number of items and percent of total. --> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="totalProposed" ಆಯ್ಕೆ="count(/dsQueryResponse/Rows/Row[normalize-space(@Status) = 'Proposed'])" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="percentProposed" ಆಯ್ಕೆ="$totalProposed div $dvt_RowCount" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="totalInProcess" ಆಯ್ಕೆ="count(/dsQueryResponse/Rows/Row[normalize-space(@Status) = 'In Process'])" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="percentInProcess" ಆಯ್ಕೆ="$totalInProcess div $dvt_RowCount" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="totalStalled" ಆಯ್ಕೆ="count(/dsQueryResponse/Rows/Row[normalize-space(@Status) = 'Stalled'])" /> <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="percentStalled" ಆಯ್ಕೆ="$totalStalled div $dvt_RowCount" /> <!-- We define our HTML table here. I'm borrowing from some standard SharePoint styles here to make it consistent. I think it will honor changes to the global css file as well as theme overrides. --> <ಮೇಜು ಅಗಲ="100%" cellspacing="0" cellpadding="2" ಶೈಲಿ="border-right: 1 solid #C0C0C0; border-bottom: 1 solid #C0C0C0; border-left-style: solid; border-left-width: 1; border-top-style: solid; border-top-width: 1;"> <TR> <ಟಿಡಿ ಸಾಲುಗೂಡಿಸು="ಕೇಂದ್ರ"> <ಮೇಜು ಗಡಿ="1" ಅಗಲ="100%"> <!-- For each status that we want to graph, we call the "ShowBar" ಪ್ರಮಾಣ ಫಲಕ. We pass it: 1. A label for the row. This is transformed into a hyperlink. 2. The percent (variable from above). 3. The actual field name of the code from the underlying list. This does not need to match the display label. 4. Field value matched for #3. 5. Total items of this status code (not the grand total of all status codes). It emits a <TR></TR> and the horizontal bar graph line. We call this template for each status code we want to view. --> <XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್ ಹೆಸರು="ShowBar"> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarDisplayLabel" ಆಯ್ಕೆ="'Proposed'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarPercent" ಆಯ್ಕೆ="$percentProposed"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldName" ಆಯ್ಕೆ="'Status'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldValue" ಆಯ್ಕೆ="'Proposed'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="TotalItems" ಆಯ್ಕೆ="$totalProposed"></XSL:ಜೊತೆ PARAM> </XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್> <XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್ ಹೆಸರು="ShowBar"> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarDisplayLabel" ಆಯ್ಕೆ="'Stalled'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarPercent" ಆಯ್ಕೆ="$percentStalled"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldName" ಆಯ್ಕೆ="'Status'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldValue" ಆಯ್ಕೆ="'Stalled'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="TotalItems" ಆಯ್ಕೆ="$totalStalled"></XSL:ಜೊತೆ PARAM> </XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್> <XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್ ಹೆಸರು="ShowBar"> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarDisplayLabel" ಆಯ್ಕೆ="'In Process'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="BarPercent" ಆಯ್ಕೆ="$percentInProcess"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldName" ಆಯ್ಕೆ="'Status'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="QueryFilterFieldValue" ಆಯ್ಕೆ="'In Process'"/> <XSL:ಜೊತೆ PARAM ಹೆಸರು="TotalItems" ಆಯ್ಕೆ="$totalInProcess"></XSL:ಜೊತೆ PARAM> </XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್> </ಮೇಜು> </ಟಿಡಿ> </TR> </ಮೇಜು> </XSL:ಇಲ್ಲವಾದರೆ> </XSL:ಆಯ್ಕೆ> </XSL:ಪ್ರಮಾಣ ಫಲಕ> <!-- This template does the work of displaying individual lines in the bar graph. You'll probably do most of your tweaking here. --> <XSL:ಪ್ರಮಾಣ ಫಲಕ ಹೆಸರು="ShowBar"> <XSL:PARAM ಹೆಸರು="BarDisplayLabel" /> <!-- label to show --> <XSL:PARAM ಹೆಸರು="BarPercent"/> <!-- Percent of total. --> <XSL:PARAM ಹೆಸರು="QueryFilterFieldName"/> <!-- Used to jump to the query & filter --> <XSL:PARAM ಹೆಸರು="QueryFilterFieldValue"/> <!-- Used to jump to the query & filter --> <XSL:PARAM ಹೆಸರು="TotalItems" /> <!-- total count of this barlabel --> <TR> <!-- The bar label itself. --> <ಟಿಡಿ ವರ್ಗ="ms-formbody" ಅಗಲ="30%"> <!-- This next set of statements builds a query string that allows us to drill down to a filtered view of the underlying data. We make use of a few things here: 1. We can pass FilterField1 and FilterValue1 to a list to filter on a column. 2. SharePoint is passing a key parameter to us, ListUrlDir that points to the underlying list against which this DVWP is "running". Isn't XSL fun? --> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"> <![CDATA[<ಒಂದು href ="]]></XSL:ಪಠ್ಯ> <XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="$ListUrlDir"/> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"><![CDATA[?FilterField1=]]></XSL:ಪಠ್ಯ> <XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="$QueryFilterFieldName"/> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"><![CDATA[&FilterValue1=]]></XSL:ಪಠ್ಯ> <XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="$QueryFilterFieldValue"/> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"><![CDATA[">]]></XSL:ಪಠ್ಯ> <XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="$BarDisplayLabel"/> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"><![CDATA[</ಒಂದು>]]></XSL:ಪಠ್ಯ> <!-- The next bit shows some numbers in the format: "(total / % of total)" --> (<XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="$TotalItems"/> / <!-- This creates a nice percent label for us. ವಂದನೆ, Microsoft! --> <XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್ ಹೆಸರು="percentformat"> <XSL:ಜೊತೆ PARAM ಹೆಸರು="percent" ಆಯ್ಕೆ="$BarPercent"/> </XSL:ಕರೆ ಟೆಂಪ್ಲೇಟ್>) </ಟಿಡಿ> <!-- ಅಂತಿಮವಾಗಿ, emit a <ಟಿಡಿ> tag for the bar itself.--> <ಟಿಡಿ> <ಮೇಜು cellpadding="0" cellspacing="0" ಗಡಿ="0" ಅಗಲ="{round($BarPercent*100)+1}%"> <TR bgcolor="red"> <XSL:ಪಠ್ಯ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಔಟ್ಪುಟ್-ತಪ್ಪಿಸಿಕೊಂಡು="ಹೌದು"><![CDATA[&nbsp;]]></XSL:ಪಠ್ಯ> </TR> </ಮೇಜು> </ಟಿಡಿ> </TR> </XSL:ಪ್ರಮಾಣ ಫಲಕ> <!-- This is taken directly from some XSL I found in an MS template. --> <XSL:ಪ್ರಮಾಣ ಫಲಕ ಹೆಸರು="percentformat"> <XSL:PARAM ಹೆಸರು="percent"/> <XSL:ಆಯ್ಕೆ> <XSL:ಯಾವಾಗ ಟೆಸ್ಟ್="ಫಾರ್ಮ್ಯಾಟ್ ಸಂಖ್ಯೆ($percent, '#,##0%;-#,##0%')= 'NaN'">0%</XSL:ಯಾವಾಗ> <XSL:ಇಲ್ಲವಾದರೆ> <XSL:ಮೌಲ್ಯ ಆಫ್ ಆಯ್ಕೆ="ಫಾರ್ಮ್ಯಾಟ್ ಸಂಖ್ಯೆ($percent, '#,##0%;-#,##0%')" /> </XSL:ಇಲ್ಲವಾದರೆ> </XSL:ಆಯ್ಕೆ> </XSL:ಪ್ರಮಾಣ ಫಲಕ> </XSL:stylesheet>

The Results:

The XSL from above generates this graph:

ಚಿತ್ರ

Drill down to the underlying data by clicking on the status code:

ಚಿತ್ರ

Concluding Thoughts:

Can This Be Generalized?

I love this graphing concept, but I hate the fact that I have to go in and do so much hand-coding. I’ve given a little thought to whether it can be generalized and I’m optimistic, but I’m also a little fearful that there may be a brick wall somewhere along the path that won’t offer any work-around. If anyone has some good ideas on this, please make a note in the comments or ನನಗೆ ಇಮೇಲ್.

Vertical Graphs:

This is a horizontal bar graph. It’s certainly possible to create a vertical graph. We just need to change the HTML. I would start the same way: Create an HTML representation of a vertical bar graph and then figure out how to get that via XSL. If anyone is interested in that, I could be persuaded to try it out and work out the kinks. If someone has already done that, please let me know and I’ll gladly link to your blog 🙂

I think that challenge with a vertical graph is that the labels for the graph are more difficult to manage, but certainly not impossible.

Field Name Gotcha’s:

There are at least two things to look out for with your field names.

ಪ್ರಥಮ, a field name with a space has to be escaped in the XSL. This will probably be an issue here:

        <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="totalProposed" 
ಆಯ್ಕೆ="count(/dsQueryResponse/Rows/Row[normalize-space(@Status) = 'Proposed'])" />

If your "Status" column is actually named "Status Code" then you need to reference it as "Status_x0020_Code":

   <XSL:ಬದಲಾಯಿಸಬಹುದಾದ ಹೆಸರು="totalProposed" 
ಆಯ್ಕೆ="count(/dsQueryResponse/Rows/Row[normalize-space(@Status_x0020_Code) = 'Proposed'])" />

ಎರಡನೆಯ, and I’m a little fuzzy on this, but you also need to be on the alert for field name changes. If you name your field "Status Code" and then later on, rename it to "AFE Status", the "internal name" does not change. The internal name will still be "Status Code" and must be referenced as "Status_x0020_Code". The "other resources" links may help diagnose and correct this kind of problem.

About that Color:

I picked "red" because it’s pleasing to me at the moment. It would not be a big deal to show different colors so as to provide more than just a visual description of a number, but to also provide a useful KPI. ಉದಾಹರಣೆಗೆ, if the percentage of "stalled" AFE’s is > 10% then show it red, otherwise show it in black. ಬಳಸುವುದು <XSL:ಆಯ್ಕೆ> to accomplish this.

Other Resources:

Happy transforming!

<ಕೊನೆಯಲ್ಲಿ />

ನನ್ನ ಬ್ಲಾಗ್ ಚಂದಾದಾರರಾಗಿ!

17 ಮೇಲೆ "ಆಲೋಚನೆಗಳುಶೇರ್ಪಾಯಿಂಟ್ ರಲ್ಲಿ ಬಾರ್ ಗ್ರಾಫ್ ರಚಿಸಿ

  1. Chris B

    This page almost completed the task I was looking for.

    I have a group that wants to use the SharePoint Survey list to create a weekly poll. The catch? They do not want to see code… Or change the system every time they send the poll (planned for a weekly update).

    I was able to connect this to the Survey list and create the graph on the first answer column. What I can’t predict though are the values and labels that they will need moving forward. To make matters worse they may have more or less answers available each week.

    I will look elsewhere just in case, but has anyone found a way to create rows and labels based off of the number of available options and dynamically setting these rather than hard coding the expected values?

  2. Greg Laushine

    ಧನ್ಯವಾದಗಳು ಪಾಲ್. Very helpful. Thanks to your work, I was able to add a graph bar column to an existing DVWP (ಉದಾ.. for tasks) very easily with just a few lines of your code.
    In SharePoint Designer, I inserted a data view with the Title and % complete columns from a task list. I put the cursor in one of the cells and right click. I select insert a column to the right. In code view, I found the <ಟಿಡಿ> and replaced the <XSL:text element inside the cell with your code:
    <table cellpadding="0" cellspacing="0" ಗಡಿ ="0"
    width="{round(@PercentComplete*100)+1}%">
    <tr style="background-color:red">
    <XSL:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></XSL:ಪಠ್ಯ>
    </TR>
    </ಮೇಜು>

    Note I changed the row color code from bgcolor="red" to style="background-color:red"
    ಕೂಡ, was able to select one of the columns in my list (@PercentComplete) in place of "$BarPercent"
    ಗ್ರೆಗ್

  3. Wolfgang
    ಪಾಲ್, thanks for this! I created an exact copy of what you did and it works almost perfect. There was one tiny issue in row the 2nd paragraph of your code:
    <XSL:template match="/" xmlns:SharePoint="Microsoft.SharePoint.WebControls"
    xmlns:__designer=http://schemas.microsoft.com/WebParts/v2/DataView/designer xmlns:asp="http://schemas.microsoft.com/ASPNET/20"&gt;
    After I corrected that it works like charm! I will now adapt this to my own list and status but I am sure it won’t be to hard. (I will post the result)
    ಧನ್ಯವಾದಗಳು ಮತ್ತೆ
    ~Wolle
  4. ಹೆಸರಿಲ್ಲ
    question –
    What if in my graph, i wanted a variable to not just count one status but count multiple ones?
    ಆದ್ದರಿಂದ, for example what if I had —
    <XSL:variable name="RequestsInitialized"
    select="count(/dsQueryResponse/Rows/Row[normalize-space(@Status)=’WIP’])" />
    –The thing is, I want it to count instances of ‘WIP’, but i also want this variable to count something else like ‘Pending Review’.. how would i do this?
    ವಂದನೆ!
  5. Andrew Carrington
    ಹೈ, I am trying to modify this slightly so that it displays a graph of tasks in a task list against user information. It uses a column called @AssignedTo which is a user presence column. I can get it to display teh rendered HTML but cant get it to calculate and display values.
    ಯಾವುದೇ ವಿಚಾರಗಳನ್ನು?
    ವಂದನೆ
    Andy
  6. Patrik Luca wrote:
    ಹೈ ಪಾಲ್,
    ಮಹಾನ್ ಪೋಸ್ಟ್!
    A question:
    I would like to filter on two fields at the same time: how can this be achieved?
    ಉದಾಹರಣೆಗೆ, one of your variables is called totalStalled and it filters on @Status.
    I would like to filter at the same time to reduce my number of returned records on another field.
    I already found how to make an ‘OR’, but I donnot manage to find the ‘AND’
    An ‘OR’ can be achieved like this:
    <XSL:variable name="totalStalled" select="count(/dsQueryResponse/Rows/Row[normalize-space(@Status) = ‘Stalled’] | /dsQueryResponse/Rows/Row[normalize-space(@ExtraFilterField) = ‘value’])" />
  7. Frank

    I have a ‘Using Dashboards in SharePoint’ question. We are a military hospital using MOSS standard for our Intranet and would like to build a dashboard for our Command Group to see ‘real time’ if possible. One of the main points is viewing the real-time current workload within the facility and literally watch it change up and down (may have to clickrefresh”/F5).

    Thank you in advance,

ಒಂದು ಉತ್ತರಿಸಿ ಬಿಡಿ

ನಿಮ್ಮ ಈಮೇಲ್ ವಿಳಾಸ ರ ಆಗುವುದಿಲ್ಲ. ಅಗತ್ಯವಿರುವ ಜಾಗ ಗುರುತಿಸಲಾಗಿದೆ *