If I understand what you are suggesting, it doesn't really make sense to have a special way to provide the reference to a private data session during the design session.
Just because you have checked off "Private Data Session" in the menu, this doesn't mean that there is a private data session during design. The "private data session" is only for the report processing run, not for the design session.
Of course, if you choose to preview or print the report during the MODI REPO, and if you have asked for a private data session for this report, *then* you will get the private data session for the report output.
But you already have access to that reference!As I have already told you, all you need is JUSTSTEM() of the report file name. Because there is no NAME clause being used on the internally-invoked REPORT FORM command, the default reference name will be used for this report run. This works pretty much the same as a DO FORM reference.
If you prefer, you can also grab the reference by asking the running reportlistener for it, assuming you SET REPORTB 90.
Try the following:
SET REPORTBEHAVIOR 90
CLEAR ALL
DO (_REPORTOUTPUT) WITH 1, "ox"
DEBUG
CREATE REPORT
The source code for the listener won't be available, but that's not a problem. We just need to pause the report somehow, we don't need the listener code. In the command window try this:
WAIT WINDOW ox.CommandClauses.de_NAME
... there's your reference variable, the same as the name of the current FRX, as I told you. If you need to prove it further, do this:
oy = EVALUATE(ox.CommandClauses.de_NAME)
WAIT WINDOW oy.BaseClass
When you are finished examining this, you can resume generating the preview or use the listener's .CancelReport() method if you prefer.
Just remember that this reference is only of interest while the output is generated. The Designer session itself, as well as the actual preview period, are outside the report processing run. The DE session reference is of no value, because there is no private datasession (unless you count the one used by the Report Builder -- an entirely different kettle of fish, and not the one you are looking for <g>).
HTH,
>L<