How to set JobName in Report at runtime

Does anyone know how to get data from a variable and put it in the Report’s jobName?

Report {PROP:Text} = JobName

Report should not be OPENed yet.


The Help is pretty good at specifying the PROP’s used to set attributes:


I don’t see the detail to assign “Before OPEN(Report)” in that help page. I just know Reports are different than Windows when it comes to properties. I would have done it wrong, had it not work, then realized I needed it Before Open.

I tried Report {PROP:Text} = ‘JobName’, in several embeds and nothing, if I leave empty in properties the jobName assumes JOB_CWDEFAULT, I made a TXA and looked for where this is declared but it doesn’t have it… I’m lost…

Use the OpenReport method after the parent call.

  ! This comes in via the report selections extensions (s_print.tpw)
  ! It makes the job name = reportitle, so shows in print manager
    If ReturnValue=Level:Benign

Need more specific info than “Several Embeds”…

Is this Legacy or ABC templates?

In ABC there is a ThisWindow.OpenReport method. Put your code before the Parent.OpenReport() call. If you look at LibSrc ABReport.clw you’ll see that does an OPEN(SELF.Report)

In Legacy you’ll find an Open(Report) in the procedure code. Use the Embeditor to see all the code.

It worked!, Ohhh thanks…!!!

No ‘Several’, many embeds… my translator exaggerated the dose… thanks!!!