Category Archives: SharePoint

Jason Thomas Reviews OfficeWriter’s SSRS Integration

The following is a review of OfficeWriter written by Jason Thomas, a BI consultant specializing in SSRS.  Read the full review here.

“As a BI consultant specializing in SSRS, I have had lots of frustrations and hard times because of Excel. Every now and then, I have some or other business user coming up to me and asking for some feature which is there in Excel but not in SSRS. If you have been following my blog, you would already know that I am more of a work-around man, trying to find some alternative for features which are not supported out of the box. But when it comes to Excel related features, most of my attempts end in disappointment. So naturally, my ears perked up when I was asked to review a plugin which claimed to build SSRS reports using Excel and Word.

So I downloaded OfficeWriter v8 and spent close to a week playing around with it. Even though I encountered some minor quirks (v8.0 doesn’t run on the 64 bit version of Office 2010 yet – luckily I had a home pc with a 32 bit version of Office; got some minor issues when editing and deploying an existing SSRS report with shared data sources – got around it by setting the data sources once again from the report manager), overall I have been very pleased and of course, excited at the different prospects that this plugin opens up.”

[Click here to read the full review]

Creating a Simple Connection Consumer in SharePoint

There are a million articles about using seven different interfaces and fourteen .wsp deployments to make an entirely custom connection provider and consumer. However, I couldn’t find one about how to create a simple connection consumer that filters based on a SharePoint list. I also couldn’t find anything about changing the brand-new double-headed arrow icon that SharePoint replaced the radio button with. Turns out they can go in the same simple solution:

  • Setting up the Consumer – This consumer will take a single row of information from a SharePoint list. It’s implemented in “MyWebPart.cs” and not in a user control.
//Create the data row that the list information will fill
DataRowView _row = null;
//Declare your consumer. Note that "Row" can be anything - it's just the term that
// SP will use when you enable the connection
[ConnectionConsumer("Row")]
//Set up the actual connection
public void SetConnect(IWebPartRow provider)
{
    //"RecieveRow" is the method you'll create to interpret the data
     RowCallback callback = new RowCallback(ReceiveRow);
    //This is where the data comes in 
     provider.GetRowData(callback);
}

This code sets up the DataRow. Note that the “provider” parameter is passed by the SharePoint connection.

  • Capturing your data – This is where you can actually use the filter – manipulate, save, and query to your heart’s content. Below is a sample RecieveRow method:
public void ReceiveRow(object row)
{
     //Set your local _row equal to the row passed by SharePoint
     _row = (DataRowView)row;
   
     //Make sure it isn't null 
     if (_row != null)
     {
    //The next three lines of code are a great way to open a site without having to dispose of anything!
    SPWeb contextWeb = SPControl.GetContextWeb(Context);
    using (SPSite site = new SPSite(contextWeb.Url))
    {
        using (SPWeb web = site.OpenWeb())
        {
         //Convert the DataRowView into a DataRow, so you can actually use it
             DataRow dr = _row.Row;
            
             //I need to allow unsafe updates to execute my query
             web.AllowUnsafeUpdates = true;
             //Query against the row data
             SPQuery query = new SPQuery();
             query.Query = string.Format(
                 @"<Where>
                     <Eq>
                         <FieldRef Name='MyColumn' />
                         <Value Type='Lookup'>{0}</Value>
                     </Eq>
                 </Where>", dr["mycolumnvalue"].ToString() );
                    
             SPList list = web.Lists["MyList"];
             SPListItemCollection items = list.GetItems(query);
            /*********
             *In here you do all you want with that filtered item list.
             *Convert it to a data table, pass the list to a usercontrol.
             *After all, it's your filter!
             ********/
           
            //Disable unsafe updates when you're done
             web.AllowUnsafeUpdates = false;
        }
     }
     }
}

That’s all there is to it. You can fill a data structure in the RecieveRow method and pass it on to a user control the same way you would pass any other value.

  • Customization –  Here’s a little bonus – how to update the radio buttons with the filter wsp.
    • In the hive, the double-headed arrow radio buttons are the following two files:
      • RBSEL.gif
      • RBUNSEL.gif
    • If you want to replace them create a folder in your solution package with the following path:  MyWebPartProject > TEMPLATE > IMAGES
    • Rename your “on” radio button “RBSEL” and save it as a gif
    • Rename your “off” radio button “RBUNSEL” and save it as a gif
    • Place both of them in the IMAGES folder.
    • When you deploy, it will overwrite the default arrows.

This change OVERWRITES the default SharePoint images. Only do this if you want to update all of the radio buttons on the farm. Otherwise you will have to restore the double-headed arrow icons, and it won’t be fun.

 

[Image via the San Francisco Weekly]

How to Export a SharePoint List to Word Using Word Export Plus

We asked EMC’s Paul Forsthoff (b|t) to give us his honest opinion of OfficeWriter’s Word Export Plus solution. IOHO, he did a masterful job. The full review is available on his Everything SharePoint blog.

I recently had the opportunity to check out SoftArtisans OfficeWriter product. The OfficeWriter product exposes an API that allows information from custom ASP.NET applications to be consumed and used to dynamically and programmatically build Microsoft Word documents and Microsoft Excel spreadsheets.

The OfficeWriter API is a .NET library that allows you to read, manipulate and generate Microsoft Word and Microsoft Excel documents from your own applications. The OfficeWriter product can integrate with Sharepoint 2010 allowing you to export Sharepoint list data into Microsoft Word and Excel documents.

SoftArtisans provides easy to understand sample code, videos and pre-built Sharepoint solutions that make getting started with the product very trivial.

For this tutorial I’ll demonstrate deploying, configuring and testing Word Export Plus in a Sharepoint 2010 environment. Word Export Plus is a SharePoint solution that demonstrates the usage of the OfficeWriter API in SharePoint 2010. This solution adds a new context menu (custom action) button to list items, allowing you to export the list data to a pre-formatted Word template that can be designed yourself in Word, or automatically generated by Word Export Plus. [Read more…]

Dealing with Flash Modules in SharePoint

flash sharepoint 2010There are a number of problems adding flash to SharePoint 2010. A few issues and resolutions follow:

ErrorPROBLEM: Flash files won’t open from a document library

  • What’s actually happening here is that SharePoint adds special headers to disallow applications and scripts from being run in the browser.
  • This is a security measure to keep users from uploading dangerous content.
  • The user gets prompted to download the file instead.

Tick SOLUTION:

ErrorPROBLEM: I can’t access swf files from the 14 hive! Continue reading Dealing with Flash Modules in SharePoint

Boston SharePoint Salon: Go Big or Go Home

Big as in data, home as in “out of business.” Because there’s only going to be more data, and people are finally realizing that not only can it be sliced and diced and visualized in formats comprehensible to the business analyst—it needs to be. The questions are: how should it be stored and queried and where should the visible representations of these queries be displayed?

Hadoop, Apache’s open source, distributed computing and storage framework based on Google’s MapReduce model is one answer to the first question. Or you could buy a supercomputer, but, those are kind of expensive! And less fun to say!  As for the second question, of course the answer depends on the type of data. As this is a SharePoint-focused Salon, though, I’m going to nominate SharePoint as one potential answer. Why? Well, Microsoft’s new Big Data Solution will put enterprise Hadoop solutions on Azure and Windows Server, including the now available SQL Server Connector, which lets you transfer data between Hadoop and SQL Server.  So, if you plan on upgrading to SQL Server 2012, you’ll be able to access data stored in Hadoop from SharePoint, and do all your slicing and dicing and displaying in PowerPivot and Power View. Presumably.

Interesting, no? We think so. If you agree, please join us at Tico (Berklee Street) this Thursday, from 7 to about 9:30 pm. You can RSVP here, or email me! And if you can’t make it, but know someone whom you think should attend, please spread the word!

NEUGS Part 11: Workflows, AKA Lifesavers for the Lazy

Not going to lie, guys, I’ve been putting this post off for a while. (Ironic, as procrastination is exactly what Workflows aim to prevent.) To me, the term connotates TPS reports and dingy cubicles and unsheathed florescent overhead lights and perpetually sweaty officeworkers in greasy button-downs and Bluetooth headsets. Also, blandly enthusiastic sales execs talking about connection and knowledge share and  koi ponds, though I’m not sure where that last image comes from. Butttt, here’s the thing: workflows provide a pretty useful method for keeping individuals and teams on track, through a series of automated steps triggered by the initialization or completion of a designated action.

Eg let’s say, completely hypothetically, that I am a fairly low-ranking business analyst at Kibble ‘n’ Krunchy Bits Corp. Let’s also say, again completely hypothetically, that I have this habit of uploading my weekly sales report to the sales team site, then wandering off to gchat for hours. So the reports just sit there without anyone looking at them for like, weeks at a time, and then at the end of the quarter everyone is surprised by how much sales of KrunchExtreme Lite with Passionfruit Extract ™ have grown. (Even though, hello, they should have known this because the factory workers and delivery men have all been putting in on average 13 hours of overtime a week for the past four months, figures which someone in a different department really should be keeping a better eye on.) A Workflow – in this case a modified Approval Workflow – provides me and my managers with an easy solution to this lack-of-awareness problem. Continue reading NEUGS Part 11: Workflows, AKA Lifesavers for the Lazy

Boston SharePoint Salon Recap: Powerview and Fall in a Glass

Cross-posted from bostonsharepointsalon.com:

Last night’s Salon was, by I want to say all accounts, a rather smashing success. (Perhaps a smashed success for a few philosophes.) About twenty locals, newbies and visitors braved the seriously odious weather to talk about, among a few many other things, Power View and the revamped BI Stack. Many many thanks to Sean Boon (b | t), from Microsoft’s Power View team, for coming all the way from Providence on a tweet’s notice—your inside expertise was much appreciated!

If you’d like to come to the next Salon, consider this your invitation! It’ll happen sometime in mid-December–stay tuned for specifics!

Everything You Wanted To Know About Power View—But Were Afraid to Ask

Before you decide whether Power View is the best damn thing to happen to self-service BI since graph paper or is just a smoke and mirrors, CamelCaseless extension to PowerPivot, you need to know its gist. The following blog posts and videos will give you just that, from a (mostly) business user perspective. Read ’em, and then get cracking with the CTP3 version, available for download here.

  • Dan English’s (b | t) “Intro to BI Semantic Model & Delivering Self-Service Reporting with Power View (Crescent)” video and slide deck

A comprehensive MSBI presentation that covers the BI Semantic Model concept, Power View and SQL Server Analysis Services with Power Pivot in SQL Server 2012.

Continue reading Everything You Wanted To Know About Power View—But Were Afraid to Ask