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.

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?

Comments

  • edited June 2009
    Hi,

    For future reference, please use your real name when posting to these
    newsgroups.

    This is not a known issue with RAP. There doesn't seem to be very many ways
    the OnCalc event could fail. Try removing all the references to the
    pipelines and simply giving the variable value a static value and see if you
    still get the error.

    Value := 'Test';

    If this works, you then know the problem is with the pipelines. Check to
    see that you have proper access to these data pipelines or that their names
    are correct.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2009
    Thanks,

    That put me on the right track and the problem has been solved. The
    pipelines had been created in code and nil was passed as the parameter
    in the constructor.

    Mark

This discussion has been closed.