Tag Archives: Microsoft

Installing a plug-in more manually than previously

I have covered this a couple of time before (hence the more and more obscure title) in various posts; here and here but I have been preparing IDLookup for install on Blackbaud’s OnDemand hosting service. Among several requirements is the fact that you have to install the plug-ins manually and not through an installer.

Continue reading Installing a plug-in more manually than previously

Crash when Filtering on Missing Constituent Codes

I wrote some code for a client a while back and tested it thoroughly and everything worked fine. There was somewhat of a delay before the client was due to implement it and when they ran the application it crashed at the beginning. After some investigation we worked out what was going on. The code gathered together a collection of constituents that had two constituent codes. Only now one of them was no longer in The Raiser’s Edge. Continue reading Crash when Filtering on Missing Constituent Codes

Battling on with the Batch API

I have on several occasions expressed my delight about the arrival of the Batch API. I am still enthusiastic but somewhat war weary having spent this passed week trying to solve problems that have appeared. Clearly the Batch API was not rigorously tested before it was released as otherwise the sort of errors I am getting would not have appeared. In case you have been struggling too or in case you thinking about using this functionality here is what I have been up against.
Continue reading Battling on with the Batch API

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 
     If Not objBook Is Nothing Then 
        Set objBook = Nothing 
    End If 
     If Not objExcel Is Nothing Then  
        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.

Sometimes the API is just not enough

Sometimes I cannot quite get want I want from Raiser’s Edge using the API. Or if I can it is very slow to get the information. For example when you get a collection of top level records, say constituents, there are filter objects which work well, you can also use the custom where clause which works when there is not a filter parameter. However what do you do when you want a combination of different areas of The Raiser’s Edge all combined into one selection.

Continue reading Sometimes the API is just not enough