Daniel - your mention of 'invalid type cast exception' is worth looking into. Could there be an element in the application model where the data type has been changed from the default? For example, if you spy a 'Total' field you might be tempted to change the element data type to Number. This will work, provided the field always contains a number, but if it doesn't, I think you'll get some sort of casting error message.