Hi All,
This is related to my crusade to dissect the report metadata tables. Anyway, I am looking for a way to emulate a private dataenvironment defined in a report.
I have the part down about extracting the table and relationships, but I'm thinking that a way to do this may be to script out a class definition for a Session object. In the scripted PRG, I can move custom datasession code like BeforeOpenTables, OpenTables, whatever to the Init of the Session and open all of the tables in the Session.
I cannot interfere with whatever datasession may be open when the routine is called.
Than I compile the script on the fly (thank you SP3!) and use NEWOBJECT("MySession","script.prg") to add a new session object (thank you, GT!).
When I don't need it anymore, I release the Session object. I close all of the tables in the Destroy of the Session.
Does this sound "do-able"?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05