The content query web part is a beautiful web part, and it's a shame it's only available in MOSS. I would love to use it in WSS. Anyway, the web part will search the entire site collection, or specific sites as you specify, and return items for certain content types, or all, and/or meeting a filter criteria.

As you can imagine, a very useful tool to roll up data and lists from sites all into a central page or dashboard. The issue with this web part is customizing it! There are a few predefined layouts but nothing that is really helpful. Basically, the web part lists the title, as a link to the item, all of the return results. No other fields are included. If you're interested in adding more fields, it requires some customization.

Fortunatly, there are a few SharePoint gurus out there who were nice enough to share how to customize this web part. Their links are below. I recommend reading through both blogs, though they may be repetitive, they compliment each other very well. Then come back and check out my notes below for some more help.

http://paulgalvin.spaces.live.com/Blog/cns!1CC1EDB3DAA9B8AA!491.entry

http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx

Further reference from Microsoft

http://msdn.microsoft.com/en-us/library/aa981241(classic).aspx

A Few More Notes

The above references are great, they got me where I am. In my experience:

- I used U2U Caml Builder to get the internal name of the field. Specifically, I was rolling up InfoPath forms, and the internal name was a GUID. By using U2U I pulled the internal name out which was _x0033_11111fc_x002d_d892_x002d_4a7e_x002d_a9bc_x002d_d839ee8ef885.

- I think there might be a name length limitation in the ItemStyle.xsl. In my previous note about the GUID name, I had to use the DataColumnRenames property in the .webpart file to get the column to work. <property name="DataColumnRenames" type="string">_x0033_11111fc_x002d_d892_x002d_4a7e_x002d_a9bc_x002d_d839ee8ef885,OpenDate</property>. I can reference OpenDate in the ItemStyle.xsl file.

-Formatting the above date field is easy enough as well. Add xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" to the header of the stylesheet. Then format the date: <xsl:value-of select="ddwrt:FormatDateTime(string(@OpenDate),1033,'M/d/yyyy h:mm tt')" />.