Most of my reports are run via command buttons, and all the reports that I would need this for are done this way.
Here is the code I am using for my "Monthly Billed" button:
// Prints the expanded Monthly Billing report for this month
Var vPrintTheReport as string
IF NOT @Mode() = 0
THEN
{
vPrintTheReport = @PrintAReport(". Monthly Billed, this month", REPORT_MODE_HTML_PREVIEW, PRINT_ORIENTATION_PORTRAIT, 0, -1, -1, -1, -1, -1, -1)
}
ELSE @MSGBOX("Reports can only be run in Update mode", "Please switch to Update and", "select the records you wish to run the report on.")
Looking at the book, page 330, it seems like I would have to do something with vFilename, but I'm not sure what. Thanks for your help Erika.