Home RAP

Error: Cannot Compile Program : Variable1OnCalc in a thread

edited June 2009 in RAP
Version 9.7 and 11.7 (I think)

TriggerCodeModuleCreate

procedure TppReport.RequestPage(Sender: TObject; aPageRequest: TObject);


I've assumed a project which is using RAP code.

The report runs when viewed in the designer and run in the main thread.

But when run in a separate thread, I get the above error. The error
appears to be in the call TriggerCodeModuleCreate. Also, my call looks
like this:

if ppReport.InitializeParameters
then ppReport.PrintToDevices;

Variable1OnCalc looks like this:

begin

Value := 'Totals for: '+ pJITData['SoldtoCust_D'] + '_'+
pJITData['SoldtoCust'];

end;

Other reports which don't contain RAP code run with no problem in a
thread. There may be some reports with RAP that run in this thread, I'm
double checking on this.

Since I don't have the code which reports the error, I can't track it
down easily.

Those familiar with the RAP code and the above error, any ideas on what
th issue could be?
This discussion has been closed.