Printing one report from eight different queues: which embed points?

Applies to: the ABC report template; posted in the Clarion 9 group.

Problem

The poster wanted the best way to print a report from 8 queues, each with a different structure. He understood each queue would need its own detail band and asked which embed points to use. The plan was to process the data, fill the queues, then print queue 1, then 2, and so on.

Solution

Three approaches were given:

  1. Hand-code the report in a source module and keep the previewer, using a queue and a PrintPreviewClass object:

    PrintPreviewQueue  PreviewQueue
    Previewer          PrintPreviewClass
    CODE
    Previewer.Init( PrintPreviewQueue )
    OPEN( Report )
    Report{ PROP:Preview } = PrintPreviewQueue.FileName
    ! report processing goes here
    IF Previewer.Display() = TRUE
      Report{ PROP:FlushPreview } = TRUE
    END
    CLOSE( Report )
    FREE( PrintPreviewQueue )
    
  2. Keep the template. Separate detail bands are not always needed; if the queues are mostly alike, hide and unhide fields on one band. Use the normal before/after print detail embeds, and ENDPAGE between queues if they print one after another.

  3. In the template, give each detail a variable so it prints only when wanted. Print nothing in TakeRecord, then loop the queues or tagged records in TakeCloseEvent and PRINT the details there.

Caveats

  • The poster said the hand-coded approach suited him since the queues were independent; the thread shows no result.
  • Option 3 lets you load records from other tables and control the sort order.
  • The thread did not name embed point priorities.

Today (2026)

Not re-tested; the techniques are plain class and report calls, so likely still valid.

Sources: Tony L. (Dec 2013, the question), Gustavo P., Dave J., Jim R. (Dec 2013) in sv.clarion.clarion9.