Friday, June 21, 2013

Displaying a Raiser's Edge Gift List in a SharePoint page with an ASP.NET Web Part

In an earlier post I wrote about some of the possible ways Raiser's Edge data could be reported or displayed using SharePoint, allowing other people in your organization to access these reports, dashboards, and lists without having to log into The Raiser's Edge.  Today we are going to focus on one of those ways:  using the available ASP.NET web controls or web parts in SharePoint Designer.

In this post I am going to focus on creating a simple recent gift list displayed on a SharePoint web page.  As mentioned in the previous post, there are many ways to go about this.  For those developers that know how to use the ASP.NET web parts, a quick and easy way to accomplish this is to drop one of the available web parts onto a Web Part Page, connect the web part to the Raiser's Edge database, write the SQL statement, and format the web part - pretty simple!!
The first step is creating a new web part page.  We need a place that we want to display the gifts and the natural location is to create a Web Part Page in a library that is on the site.  You may want to create your own library for pages, or use the built-in Site Pages library.  It is really up to you.  In addition a Wiki Page may present problems, thus we recommend that you create a Web Part Page.  When creating the page we selected a layout that was one column as we are only going to have one web part on the page and we want as much real estate hortizontally as possible to add as many columns as we might want.

After creating the page, I open up the site with SharePoint Designer, check out the web part page, and open the page in design mode.  When in this mode you can add SharePoint web parts as well as other web parts.  As mentioned above, we are going to use an ASP.NET web part (some of these are pictured at the left).  We are going to choose the GridView for its tabular or grid format, simple rendering of the data in a list format, and easy styling the control to make it a bit more professional.
After placing the GridView web part on the page, we need to tell the web part how to connect to The Raiser's Edge database.  To do this we create a new data connection.  When setting up this connection, you will be presented a similar dialog form to many of the sql tools and utilities in the marketplace.  Because The Raiser's Edge is a SQL Server database, we select this option then enter the appropriate details to connect to the database.  I recommend that you have your administrator create a new SQL Login and provide it the appropriate privileges (read-only to protect the integrity of the data).  Note, this SQL Login is not the same as the "new user" created in The Raiser's Edge application, but a SQL Login created via the SQL Server Management Studio.   We entered the SQL Server instance where the RE database resides, the SQL Login user name and password, along with the Raiser's Edge database.  I recommend that you also click the "Test Connetion" button to ensure that the connection details you have entered work!

 
Now that we have the connection details defined, we need to write the SQL to pull our gifts.  As many of you may know, writing a SQL statement to pull information from The Raiser's Edge may not be a simple SQL.  I tried to display enough information to keep it interesting but not go too overboard.  I also chose to pull just cash gifts as well (see the WHERE G.TYPE IN (1,2,3,31) at the left).  We could write a function to be included in the SQL to show the gift type and allow all gift types to be displayed, but this shows how we can really get at specific information in our reports.

After writing the SQL we then have a Grid View that displays a rough outline of how the grid is going to look.  I chose an out of the box "Professional" style which applied the formatting to the headers, columns and rows.  You could really spend a lot of time customizing the look and feel of the GridView and the individual elements, but for our exercise I thought keeping it simple was the best approach.

Now that we have the SQL written, a connection to the database configured, and the web part styled, it is just a matter of checking in the web part page and opening the SharePoint site to see how it looks and making any edits we might need to.  Below is the outcome of our little project: a web part page that displays recent gifts sorted by the gift date, with the most recent at the top.  Someone that wants to see this information doesn't have to log into The Raiser's Edge or ask someone for the "report", they can just go to the web page to see the information.  Obviously you can extend this type of functionality to dashboards, other reports, adding filtering and search criteria to make it truly dynamic and powerful, even create a mini RE application (having one page that shows constituent information about a specific constituent, another for a campaign, etc. and connecting via links embedded on the pages - now that would be fun).  And the best of all is someone doesn't have to log into The Raiser's Edge to get this information; they can get it on-demand, and it looks professional.



If you would like to explore this type of functionality or run an idea by us, please go to our website to see what else we can do for you or send us a contact us request.  I would even love to hear what other ideas you would like for me to explore on this blog that you think could be powerful, especially if it pertains to The Raiser's Edge or SharePoint.   Also, I want to say thanks for checking out my blog.  If you have any feedback, don't hesitate to reach out to me via this blog or the website referenced above.

No comments:

Post a Comment