Home RSS 2.0 ATOM 1.0  CDF  
 
CodeSegment - Carlos Segura Sanz (blog)
 
Previous Page Page 2 of 2 in the csegRollUp category

Today csegRollUp2 has more than 1000 downloads, exactly 1050 ... and it's the time to think in the v3 features, by the moment I have only one in mind.

* Query, a new property to put a CAML queries it will have macros as [CurrentUser] to replace for the current user, [Now] to get the current date and time and so on.

Now I need your suggestions for the next release. Please comment this post with your suggestions.

Thanks to all for your support and commentaries about csegRollUp

PD: If somebody is interested in doing small a manual, please contact urgently.....

Thursday, October 13, 2005 1:38:11 PM (Hora de verano romance, UTC+02:00)   #    Comments [9]   csegRollUp  | 

A tip for a good friend, csegRollUp pageable xsl  (como lo prometido es deuda :-))

Sorry again but these days I have had and I have much work...

 csegRollUp2-MultiPage.xslt (3,27 KB)

Note: Corrected file 03/10/05

Thursday, September 29, 2005 8:30:36 PM (Hora de verano romance, UTC+02:00)   #    Comments [2]   csegRollUp  | 

Yesterday looking a XML editor to edit complex xml files that I have in a Project that E&Y did in my company, I downloaded a trial version from  Stylus Studio XML IDE and I’m really surprised.  We could make a hard work in minutes. (Edit the data in a grid, sort the grid by levels and sublevels  etc...)

Normally I dont need tools like this for my diary work but I am considering this for my personal use (home edition is only 49$.)

Later in house, I was testing the Stylus Studio WYSIWYG, with an xsl that I was using with the csegRollUp webart, and in the midnight I added a new feature to csegRollUp webpart and also fixed a little problem.

The new feature is that you can use two params in the xslt file to make the webpart pageable.

4:      <xsl:param name="CurrentPage"/>
5: <xsl:param name="RecordCount"/>

Then you can write a simple xsl with Previous and Next Page, that shows like this...

The querystring parameter is always "page" and at the moment you can use only a pageable csegRollUp per page.

I fixup an error when a list field has a null value the xml generated omit the label now the label is generated.

Now included in the zip file there are some xslt samples (see previous posts), and a new one called page-sample.xsl this is  the one of the top image (this sample use the contacts lists)

Download csegRollUp2.zip (11,28 KB)

Thursday, August 18, 2005 10:19:05 PM (Hora de verano romance, UTC+02:00)   #    Comments [1]   csegRollUp  | 

Some people ask me about samples of transformations, XSL to use with the csegRollUp webpart. First of all, I adopted XSL because it is the best way to customize any webpart.

I’m using mainly XMLSpy in work, but those days in my laptop I’m using too a freeware application to edit XSL called “cooktop” written by Victor Pavlov, it is a xsl, xpath and dtd editor, you can use the XML debug output from csegRollUp and test your XSL.

If you want share your csegRollUp XSL files, please send me a mail to include it in the csegRollUp weekly sample contest.

Of course this week I win.

1: <?xml version='1.0' encoding='utf-8'?>
2:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3:   
<xsl:output method="html" />
4:
5:   
<xsl:key name="group-by-site" match="Row" use="_SiteTitle" />
6:
7:   
<xsl:template match="Rows">
8:      
<table class="ms-summarycustombody" width="100%">
9:         
<tbody>
10:            
<xsl:for-each select="Row[count(. | key('group-by-site', _SiteTitle)[1]) = 1]">
11:               
<xsl:sort select="_SiteTitle" />
12:
13:               
<tr id="group0">
14:                  
<td class="ms-gb" colspan="2">
15:                     
<span class="ms-announcementtitle">
16:                        
<a href="javascript:" onclick="javascript:ExpGroupBy(this);return false;">
17:                           
<img src="/_layouts/images/plus.gif" border="0" />
18:                        
</a>
19:
20:                        
<a href="{_SiteUrl}">
21:                           
<xsl:value-of select="_SiteTitle" />
22:                        
</a>
23:                     
</span>
24:                  
</td>
25:               
</tr>
26:
27:               
<xsl:for-each select="key('group-by-site', _SiteTitle)">
28:                  
<tr style="display:none">
29:                     
<td class="ms-vb" width="50%" style="padding-bottom: 3px">
30:                        
<span class="ms-announcementtitle">
31:                           
<a href="{_ItemUrl}">
32:                              
<xsl:value-of select="Título" />
33:                           
</a>
34:                        
</span>
35:                     
</td>
36:
37:                     
<td class="ms-vb" width="50%">
38:                        
<p align="right">
39:                         (
40:                        
<xsl:value-of select="Caduca" />
41:                         )
</p>
42:                     
</td>
43:                  
</tr>
44:
45:                  
<tr style="display:none">
46:                     
<td class="ms-vb" colSpan="2">
47:                        
<xsl:value-of select="Texto" disable-output-escaping="yes" />
48:                     
</td>
49:                  
</tr>
50:               
</xsl:for-each>
51:            
</xsl:for-each>
52:         
</tbody>
53:      
</table>
54:   
</xsl:template>
55:
</xsl:stylesheet>

Result

Tuesday, July 26, 2005 7:51:08 PM (Hora de verano romance, UTC+02:00)   #    Comments [0]   csegRollUp  | 

First, once again many thanks to all you for your kind commentaries about csegRollUp.

Sorry for being so late but I have had a lot of work last days, and nights are so short...

Fixes

For users with problems in sites with ports diferents to 80, I must say that all tests of this new version have been done with a server installed in the port 1000 and all them have run correctly.

For users with problems as "not in the configuration database"  they are using only wss sites, now csegRollUp runs correctly.

Remember that the field and list separator is comma ','

Installation

First is very important uninstall the previous version:

stsadm -o deletewppack -filename csegRollUp.cab  and them install the new one.

New Features

A new functionality has been added. To use it, please, indicate the name of the lists you want to rollup List,List2,List3 (a "coma" after every list) and choose the option "Lists in all subsites".

The webpart will search these lists in all the subsites of a lower level, and show the results.

Remember the csegRollUp XSL contest I wait for your contributions.

csegRollUp2.zip (8,03 KB)

Tuesday, July 26, 2005 7:49:23 PM (Hora de verano romance, UTC+02:00)   #    Comments [12]   csegRollUp  | 

First, thanks to all by the comments about RollUp webpart.

Now, do you need a Calendar view with your RollUp events, tasks or any list???

Are you ready?.

You can use the Sharepoint calendar whith csegRollUp it’s easy and you can view the Month view, weekly view or day view whit your aggregated data.

Just, a sample of XSL to render.

<?xml version='1.0' encoding='utf-8'?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="html"/
>
<xsl:template match="/"
>
       <SCRIPT
>
       var dopt = new DateOptions;
       dopt.chDateSep = "/";
       dopt.chTimeSep = ":";
       dopt.SetTimeFormat(1);
       dopt.SetDateOrder(1);
       dopt.SetDOW(0); 
       dopt.webTZOffsetMin = -60;
       var cal = new Calendar(null, null, dopt);
       var rgIcons = new Array;
    rgIcons[0] = "\u003cIMG border=0 width=16 height=16 title=\u0022\u0022 SRC=\u0022/_layouts/images/blank.gif\u0022\u003e";
    rgIcons[1] = "\u003cIMG alt=\u0022\u0022 border=0 width=16 height=16 SRC=\u0022http://srvsp/_layouts/images/blank.gif\u0022";
    <xsl:for-each select="Rows/Row"
>
             <xsl:variable name='datetime' select='Caduca' /
>
             <xsl:variable name='year'  select='substring( $datetime, 7 , 4 )' /
>
             <xsl:variable name='month' select='substring( $datetime, 4 , 2 )' /
>
             <xsl:variable name='day'   select='substring( $datetime, 1 , 2 )' /
>
             <xsl:variable name='hour'  select='substring( $datetime, 1 , 1 )' /
>
             <xsl:variable name='minute' select='substring( $datetime, 4 , 2 )' /
>
             <xsl:variable name='second' select='substring( $datetime, 7 , 2 )' /
>
             <xsl:variable name='spdate' select="concat($year, '-', $month, '-', $day, 'T0', $hour, ':', $minute, ':', $second, 'Z' )" />

             cal.AddFullEvent("<xsl:value-of select='$spdate' />",
                                         "<xsl:value-of select='$spdate'/>
", 
                                         "", 
                                         "<xsl:value-of select="Texto"/>
",  
                                         "<xsl:value-of select="Título"/>
", 
                                         "<xsl:value-of select="_ItemUrl"/>
", 
                                         rgIcons);
          </xsl:for-each
>
        cal.BuildUI();
       
</SCRIPT
>
    
</xsl:template
>
</xsl:stylesheet>


 
Result Screenshots

 

You can use DateOptions CalendarPeriod to set the default view, modify the xsl with :

dopt.CalendarPeriod = “month” / “week” / “day”

The ows.js CalAddFullEvent format is :

CalAddFullEvent(stDateStart, stDateEnd, stLocation, stDesc, stTitle, stURL, rgIcons)

Tuesday, July 26, 2005 7:41:22 PM (Hora de verano romance, UTC+02:00)   #    Comments [0]   csegRollUp  | 

UPDATED New Version 2

This is my new webpart, in that I have worked in order to solve a common problem. The Rollup for Sharepoint lists.

With this webpart you can rollup any list in any site, you can get data from different lists (Tasks, Announcements, your customs lists)

The Webpart check the security so that if a user does not have access to a site or a list these data will not appear.

Webpart gathers data from the specified lists and join it in a common xml that later will render it using xsl.

Webpart properties

  • Lists

List of comma delimited values that signify the sites and lists
Format: /site/subsite:ListName, /site/subsite/subsite:ListName

  •  Fields

List of comma delimited values with the field names
Format: Title,Text,Comment,User
All the fields must exist in all the lists. You can put different lists but the fields must exist. 

  • XSL

XSL to render the result

  • Debug XML

If checked you can view the collected xml data

 

 

The XML is formatted as

<?xml version="1.0" encoding="utf-8" ?>
<
Rows>
   <
Row>
     <
_ListTitle/>
     <
_ListUrl/>     <!-- Url to default view -->
     <
_SiteTitle/>
     <
_SiteUrl/>     <!-- Url to site -->
     <
_ItemID/>
     <
_ItemUrl/>     <!-- Url to list item view -->
     <
Field/>        <!-- Each one of the specified fields -->
  
</Row>
<
/Rows
>

XML debug output.

Results once applied the xsl 

The XSL used in the sample

<?xml version='1.0' encoding='utf-8'?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<
xsl:output method="html"/>

<
xsl:template match="/">
   <table class="ms-summarycustombody">
     
<tbody>
        
<xsl:for-each select="Rows/Row">
              
<xsl:sort select="_SiteTitle"/>
              
<tr>
                
<td class="ms-vb" width="50%" style="padding-bottom: 3px">
                  
<span class="ms-announcementtitle">
                   
<a href="{_ItemUrl}">
                     
<xsl:value-of select="Título"/>
                   
</a>
                  
</span>
                
</td>
                
<td width="50%">
                  
<p align="right">
                    
<a href="{_SiteUrl}">
                     
<xsl:value-of select="_SiteTitle"/>
                    
</a>
                   
<xsl:value-of select="Caduca"/