Archive Page 3

21
Sep

Dashboard Designer Charts and Office 2007

If you use Dashboard Designer for PerformancePoint 2007, be careful about the chart components. Even though it has the Office 2007 Ribbon UI and acts like a 2007 suite member, it uses the Chart components from Office 2003.

When I installed Office 2007, I was unable to get to Data Retrieval Services when creating a data source for a report. This would let me use a SharePoint list as a data source. I thought I needed to reinstall the Office 2003 Chart Components, but that didn’t help.

I installed Excel 2003 side by side with Office 2007 and everything works again. Apparently the Chart Components are read only if you do not have a 2003 product installed.

17
Sep

SOAP Exception in Dashboard Designer 2007

Encountered an issue this morning after some patches were installed on the main PerformancePoint server over the weekend. Opening Dashboard Designer and refreshing encountered this error:

A general SOAP exception has occurred. Contact an administrator.

Well, that’s annoying. Some googling indicated that there might be an issue with the ASP.NET version that the PerfPoint web sites were running under. Opened IIS, saw that there was no ASP.NET version, period. I saw that one of the suggestions was to hit the Central Site and try reinstalling Dashboard Designer. That did nothing for me, but the other link was for the preview site. I checked to see if it was working, and it was. At least, it worked until I tried to browse to one of the test dashboards. Then I got a generic “some problem occurred”. So I browsed to it from the server and got this error:

System.InvalidOperationException: Unable to generate a temporary class (result=1).

Ugh. So I googled that and got to KB908158 telling me to grant Read and List Folder Contents on %windir%\Temp to the user account for the errant website. The identity for the app pool is jfcom\moss.sspapppool so it was a simple thing to grant those perms. Once that was completed I tried dashboard designer again and voila – it worked like a charm.

03
Sep

Google Chrome

Trying out Google Chrome… looks good so far.  My bank website loaded up nice and fast, but it looks like my audio stream is still loading…

27
Aug

Hug a Developer Today

21
Aug

MSDN Virtual Labs

Ok, I came across this a while ago, and promptly forgot about it.  MSDN Virtual Labs (and its companion TechNet Virtual Labs) are awesome resources to get hands-on experience with technologies from Microsoft.  They have a whole slew of stuff on developing inside of WSS, and it’s just a great resource.

23
Jul

Blogging with Word 2007

I’m using Word 2007 to create this post. I was actually starting to create a new document and I figured I would try creating a new blog post to see how it works.

I was first presented with this dialog to register my blog:

 

I selected WordPress from the list and saw this dialog:

 

I put in my blog (http://nathandewitt.net/blog/xmlrpc.php) and entered my account information. I clicked OK and presto changeo I was done.

Next I entered my title:

 

Then I clicked on the Insert Category. It reconnected to my blog to download my Categories, and then I selected Meta from the dropdown list.

I’m going to play around with some of the Word 2007 features to see how it handles them:

An Equation:

Word Art:

 

Some Code:

 


				private
				SPListItemCollection nominated(SPList calendarList)

        {


				SPQuery query = new
				SPQuery();

            query.ViewAttributes = "Scope=\"Recursive\"";

            query.Query = "<Where>" +


				"<Eq>" +


				"<FieldRef Name=\"" + nominateField + "\" />" +


				"<Value Type=\"bit\">1</Value>" +


				"</Eq>" +


				"</Where>";


				return calendarList.GetItems(query);

        }

 

Finally, I typed everything up and clicked Publish. It seems pretty straight-forward.

Pros:

  • Simple to get up and running
  • Handles styles decently
  • Images get uploaded and stored without hassle
  • It’s nice to work in the familiar environment of Word
  • Making changes just involves publishing again

Cons:

  • Equations don’t get converted to PNG or anything, they just vanish
  • Difficult to predict formatting, had to put each picture’s text wrapping properties to Top & Bottom
  • Word Art images have white background
  • The code gets messed up – coloring is fine but each line is a separate paragraph

Conclusion:

This was easy to get going, but I’m not pleased with the embedding of other items (pictures, equations, code). This is a great solution for just writing a typical blog entry without a lot of pictures or style changes. Maybe I’ll use this more for blogging longer essays. I think I’ll stick with handcoding the HTML for now.

14
May

Convert ASP.NET page to Custom Application Page in SharePoint

There are many ways to run custom code in SharePoint 2007.  Arguably one of the simplest is to create a Custom Application Page, sticking all the source code into a script tag at the top of the page.  You don’t have to muck around with compiling dlls or modifying the web.config file.

  1. Create a new aspx file.  Put this at the top:
    <%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" %>
    <%@ Page language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
    

    Watch out! SharePoint Designer likes to remove the ~/ from your MasterPageFile declaration. I have no idea why it does this. I sat there entering it, hitting save, and watching it disappear like 4 times before I opened up Notepad and put it in. Weird.

  2. Add any namespaces needed.
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Web" %>
    <%@ Import Namespace="System.Web.UI" %>
    
  3. Add a script tag (don’t forget to runat server!).
    <script runat="server"></script>
    
  4. Copy the code from your code-behind and stick it into the shiny new script tag you just created.  Don’t include those pesky namespace or class declarations, just the functions you want.
  5. Application Master has some ContentPlaceHolders; we care about three of them.
    • PlaceHolderMain will hold your tag soup from the ASPX file.
    • PlaceHolderPageTitle will hold the title that shows in the title bar of the browser.
    • PlaceHolderPageTitleInTitleArea holds the page title that goes in the SharePoint chrome (the yellow bar of a typical application page).
    <asp:Content ID="Main" contentplaceholderid="PlaceHolderMain" runat="server">
    	<!-- all your aspx content goes here -->
    </asp:Content>
    
    <asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle">
    	Title in browser title area
    </asp:Content>
    
    <asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea">
    	Title in SharePoint chrome
    </asp:Content>
    
  6. Create a folder in the LAYOUTS virtual directory.  Should be in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\ directory.  Don’t ever skip this step! Always separate your grubby code from the pristine beauty of the default code with folders!
  7. Copy your newly created .ASPX into the folder created in step 6.
  8. Now you can get to your snazzy new Custom Application page in any site by adding /_layouts/PageName.aspx to whatever site you want.
  9. There is no step nine.

Have fun!

12
May

Testing Syntax Highlighter

I’m using syntaxhighlighter plugin to manage my source code listings. Just activated it, and now I’m testing it out.

Here’s some SQL:

SELECT i.first_nm, i.last_nm, iui.username, s.descr
FROM tbl_individual i
JOIN tbl_ind_userid iui ON i.pn_id = iui.pn_id
JOIN tblkp_ind_status s ON i.status_cd = s.status_cd

Here’s some XML:

<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_minimaltrust.config" />
</securityPolicy>
<httpHandlers>
<remove verb="GET,HEAD,POST" path="*" />
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*/rss.xml" type="CKS.EBE.RssHandler, CKS.EBE, Version=0.1.0.0, Culture=neutral, PublicKeyToken=3e8b700c069fb747" />
</httpHandlers>
</system.web>

And here’s some C#:

private string GetRandomPasswordUsingGUID(Int32 length)
{
string result = System.Guid.NewGuid().ToString();
result.Replace(“-”, String.Empty);
if ((length < 1) || (result.Length < length)) { throw new Exception(“Length must be between 1 and ” + result.Length.ToString()); } return result.Substring(0, length); }

11
May

Save as .doc

Ok, this post is for a friend of mine.  By default, Office 2007 saves files in a new format, .docx.  If you have clients that have not upgraded yet, there might be some confusion when they open your files.  Ideally, you would have them get the Office Compatability Pack, but that’s not always feasible.  You can save each file as a .doc file, but that can be onerous to remember every time.

Word Save Option DialogHere’s how you set Office 2007 to save documents every time so that Office 2003 users can use your docs with no headaches.

  1. Open Word 2007
  2. Click the Office circle icon in the upper left corner
  3. Click Word Options button
  4. Click Save in the list on the left
  5. In the “Save files in this format:” drop down list, select “Word 97-2003 Document (*.doc)”
  6. Click OK

If you send other files (Excel, PowerPoint) then you might want to do the same thing for them.  But otherwise, that’s it.  You’re done.

09
May

Intro

Hi.  My name is Nathan DeWitt, and I’m a software developer.  I’m just getting started with this site, and I think I’m going to keep it the default WordPress look for a while until I figure out the direction (design-wise) I want to go with.

I plan on using this space to write about some professional topics, which for me involve ASP.NET, MOSS/WSS, MS SQL Server and some of the other Microsoft development stack.  There will also be some other stuff mixed in as I explore new areas.  Pretty much stuff I come across that seems interesting should find its way here.  If nothing else, this will be a place to remind myself what section of that web.config should be edited, or how to extend a system partition in WinXP.

I look forward to receiving any comments or emails.