Alexander,
hmm, try this (fast and dirty):
LOCAL oV1
oV1=CREATEOBJECT("_xsession")
REPORT FORM any_report
DEFINE CLASS _xsession as custom
PROCEDURE SetSession(liSessionID)
SET DATASESSION TO liSessionID
ENDPROC
PROCEDURE any_method
messagebox(STR(SET("DATASESSION"),11))
ENDPROC
ENDDEFINE
Variable: xoV1
Initial Value: oV1.SetSession(SET("DATASESSION"))
On Entry: ov1.any_method()
MartinJ
>Hi Martin,
>
>I need the Objects in the scope of report's private datasession! So the objects cannot be created before calling the report.
>
>Regards,
>
>Alexander
>
>>Hi Alexander,
>>
>>-or Cx00000005
>>
>>Create object before calling REPORT.
>>
>>MartinJ
>>
>>>Hello,
>>>
>>>are there any known issues about using the object references as report variables? I can't figure out what happens: I define a report variable oV1 as NewObject(cClass1, cLib) and reference it in report - it functions very good.
>>>
>>>As soon as I try to define another variable oV2 as NewObject(cClass2, cLib), I get
>>>
>>>- either the message "oV1 is not an object"
>>>- or "oV1 not found"
>>>- or "
is not found on calling the method.
>>>
>>>either before the output of the report or after the first record has been printed.
>>>
>>>It is always the first object that causes the problem: if oV2 is the first in the list, it is the one that will be "not an Object" or "not found" etc. I have already experimented with all possible dummy-objects - it is always the same: the second object kills the first one.
>>>
>>>I thought, it had something to do with the datasessions - nothing of the kind, it doesn't matter, if the report runs in a default or in a private datasession.
>>>
>>>But as this particular report has to run in a private datasession, I wouldn't like to set private variables outside of it because the objects then do not see the tables inside the report's datasession.
>>>
>>>Thankful for any help