All posts by David Zeidman

Integrating with Excel

Two common tasks seem to be integrating RE with an Excel file. This can mean two things. Either from a plugin or some RE:VBA code opening a Excel file and extracting the data or it can mean that from within Excel VBA access the RE objects to retrieve some data. The way you handle the two scenarios is quite different.

If you are trying to connect to Raiser’s Edge from Excel you will need the API module. You connect to RE using the REAPI object and initialize it with a serial number and optionally user name and password. You then use the API in exactly the same way as you would from within RE, i.e. via VBA or any other API application.

If you want to open up Excel from RE then you will need to create the application objects. This is shown in the example below:

    Dim objExcel As Excel.Application     ' Excel application 
    Dim objBook As Excel.Workbook      ' Excel workbook  
    Dim objSheet As Excel.Worksheet     ' Excel Worksheet  
    Dim oConstit As New CRecord    oConstit.Init REApplication.SessionContext 
    Set objExcel = CreateObject("excel.application") 'Starts the Excel Session  
    Set objBook = objExcel.Workbooks.Open("C:test.xls")   

    For Each objSheet In objBook.Sheets 
        If UCase(objSheet.Name) = "Sheet1" Then 
            oConstit.Load CLng(objSheet.Range("A2").Text) 
            objSheet.Range("A3").Text = oConstit.Fields(RECORDS_fld_FULL_NAME) 
            Exit For 
        End If 
    Next objSheet 
     objBook.Save  
     If Not objBook Is Nothing Then 
        objBook.Close 
        Set objBook = Nothing 
    End If 
     If Not objExcel Is Nothing Then  
        objExcel.Quit 
        Set objExcel = Nothing 
    End If  

This is quite self-explanatory code, although Excel has an object model just as RE does which is very large and takes a while to get to understand. There is plenty of Excel API information on MSDN.

Plugin Directory Sort and Filter

The plugin directory has been upgraded to include the possibility to filter by product type e.g. Raiser’s Edge, NetCommunity, etc. This is slightly limited as it is currently only possible to give each plugin one product category even though some span two products.

 I have also added sort functionality so that you can sort alphabetically, by most highly rated and most highly viewed (based on the click through to more information).

 As previously if you have had any experience with any of the plugins add your comments as it will help others to decide their usefulness.

Here is the link again: http://www.zeidman.info/php/plugins.php

API 7.82 – The Silent Revolution

I normally keep up with the latest changes in the Raiser’s Edge version.  I thought that the jump from 7.81 to 7.82 was not that great. I knew that there were fixes so that RE would work with Office 2007, there were some more changes to optional modules (I was only really familiar with events), there were new names for items in query and export, another change to Gift Aid and that was about it. At least that was it until I saw an item on the conference pages talking about the new Batch API code that had been made available. What?? Batch API! This is something that I have been asking for forever and it completely threw me when I just stumbled across it. Continue reading API 7.82 – The Silent Revolution

Custom user defined business rules

The idea of creating user defined business rules has been discussed in various threads at Blackbus and on the Blackbaud Raiser’s Edge forums (see User Defined Business Rules for example). The whole functionality  is really useful but there are clearly limitations.

One really good use of VBA is to perform this very task. For those not familiar with the build in version it allows you to select a query (constituent, gift or action) and for a all or a limited number of security groups it allows you to display a message on opening the record. This same functionality can be repeated using VBA. Of course you are able to query on a lot more, or perform more than simply display a message. Continue reading Custom user defined business rules

Plugin directory updated

I am pleased to announce phase 2 of the plugin directory!

You can now rate the plugins and add your own comments about them. If you have had some experience of some of the plugins listed then please do add your comments. Unlike adding or editing the plugins listed comments are not moderated so feel free to add what you think about them. The average rating is also given.

Adding ratings requires that you are “registered” this is so that plugin ratings are not skewed. Adding comments does not required any registration and can indeed be anonymous.

Check out the new features here:

http://www.zeidman.info/php/plugins.php

Look forward to reading your comments!

Phase 3 will include sorting and filtering by product, rating and date added. Watch this space…

How I would improve the API

If I have often wondered if I were in charge of the API at Blackbaud how I would change it. Well unfortunately I don’t wield that kind of power and secondly I am not sure that a major overhaul is required. It is clearly not a modern API being COM based but for the main it works well. However there are still quite a few areas that I would improve upon. I don’t suppose that these will ever happen. Changing the API is no doubt lower on Blackbaud’s list of priorities. With the imminent arrival of the Infinity platform (and, yes, its name does seem to have influenced the pace at which it is being released) , the ability to develop any interface into the system seems a real possibility. RE API by comparison appears somewhat staid and limited. I would imagine it no longer commands the attention at Blackbaud those of us using it would like.

That being said I would love to be proven wrong so Blackbaud if you are listening here are the areas that I would change: Continue reading How I would improve the API

Blackbaud Labs RE7 code sample

I just noticed Blackbaud have added a code sample to their Blackbaud Labs site. This appears to be the same code sample as was released on CodePlex but it will no doubt get a larger audience here.

My initial thought about this code are that it is unnecessarily complicated. Creating an embedded HTML resource, creating a specific control, putting in the correct GUID into to the HTML page and then getting it all to work seems to be somewhat of a long winded approach. Continue reading Blackbaud Labs RE7 code sample

Opening a custom Crystal Report from code

Have you ever wanted to call your own Crystal Report from a custom user form? Here is how…

In this example I have a UserForm, a button, a text field for the constituent id and a Crystal Report Control. You will need to go to the control toolbox and add this control before it can be added to your form. All of the constants (variables in upper case) have been previously defined somewhere in the code. Continue reading Opening a custom Crystal Report from code