Code: Select all
---| Get the PDF Template |---
hide stack "PDFLayout"
go stack "PDFLayout"
put the rect of graphic "header" into tHeaderRect
put the rect of graphic "body" into tBodyRect
put the rect of graphic "footer" into tFooterRect
put the rect of graphic "Total" into tTotalRect
close stack "PDFLayout"
---| Initialize PDF file creation |---
put specialfolderpath("documents") & "/" into tPDF
put "TestRPT.pdf" after tPDF
delete file tPDF --> delete any existing file first
set the printpaperorientation to "landscape"
set the printscale to 1
open printing to pdf tPDF
---| Get the PDF Header |---
go stack "PDFHeader"
set the defaultstack to "PDFHeader"
print this card from the topleft of field "txtHeader" to \
the bottomright of field "txtHeader" into tHeaderRect
close stack "PDFHeader"
---| Get the BodyText |---
#### NOTE: This works, but only prints the current view (one page) ####
## go stack "PDFBody"
## set the defaultstack to "PDFBody"
## print this card from the topleft of group "dgDetailReport" to \
the bottomright of group "dgDetailReport" into tBodyRect
## close stack "PDFBody"
##########
### This is where I need help to have the BodyText print everything in the group "dgDetailReport" ...
---| Reset the default stack and exit |---
close printing