short hJob; /* print job handle */
BOOL bResult; hJob = PEOpenPrintJob("C:\\CRW\\ORDER.RPT");
if (!hJob)
{
ReportError(hJob);
return;
} if (ToWindow)
{
bResult = PEOutputToWindow(hJob,
"My Report", CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, 0, NULL);
}
else
{
bResult = PEOutputToPrinter(hJob, 1);
}
if (!bResult)
{
ReportError(hJob);
PEClosePrintJob(hJob);
return;
}
if (!PEStartPrintJob(hJob, TRUE))
{
ReportError(hJob);
}
PEClosePrintJob(hJob);
return;
| Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |