Rick,
>I have a report that pulls data from a temporary cursot that gets built on the fly with a sql statement. The cursor is called tempcur.
>
>One of the fields in the detail band of my report has the following express oApp.GetBval(). GetBval is a method of my application object that that returns a numerical value. To do this, in the method I'm doing a seek in another table based on the value in tempcur.cust_id.
If the only purpose for GetBval() is to pull the numeric value from another table according to the value of tempcur.cust_id, and it does not have to manipulate or calculate anything, you can just include the other table field in your SQL SELECT statement using a JOIN or WHERE clause to relate the two tables together.
Your resulting temporary cursor will then have the numeric value included in it. For example:
SELECT table1.*, table2.numfield ;
FROM table1 INNER JOIN table2 ;
ON table1.cust_id = table2.cust_id ;
INTO CURSOR tempcur
The inner join assumes that you have a record in table2 matching every cust_id in table1. If not, you may want a LEFT OUTER JOIN.