Thanks Bruce, I will work on the example. In the meantime this is  the compile error in context when the print preview is unchecked. However no procedure SetReportTarget  is being cr.eated but is when print preview is checked.
  ! Report procedure should have prototype of (<NetWebServerWorker p_web>)
  If Not p_Web &= NULL
      SELF.SetReportTarget(PDFReporter.IReportGenerator)
    self.SkipPreview = True
    ProgressWindow{prop:hide} = 1
    loc:ProgressName = p_web.GetValue('_ProgressName_')
    p_web.SetProgress(loc:ProgressName,1) ! report has started
    loc:URL = '\reports\$$$' & format(random(1,99999),@n05) &'.pdf'
    loc:PDFName = clip(p_web.site.WebFolderPath) & loc:URL
     loc:PDFName = clip(p_web.site.WebFolderPath)&'\Data\'&WQName
  End
If I delete the call it then wants to print it etc
John