RDC Ver 9.0 PrintOut Method is Generating a error.
I am trying to call the Report object's printout method and I am getting a OLE error "Type Mismatch" if the value of .opgPrintRange <> 1.
I am running my own print options form and I am getting the values from the controls on the form to pass as parameters. I have checked the parameters and they all seem to be fine i.e. the correct type but I keep getting the error.
This is the Code:
LOCAL lPrompt, nNumCopies, lCollated, nStartPage, nStopPage
WITH ThisForm
lPrompt = .F.
nNumCopies = .spnNumCopies.Value
lCollated = .chkCollated.Value
nStartPage = .txtStartPage.Value
nStopPage = .txtStopPage.Value
IF .opgPrintRange.Value = 1 && All
*-- This always works...
.oReport.PrintOut( lPrompt, nNumCopies, lCollated, nStartPage )
ELSE && Pages
*-- This is not working...
.oReport.PrintOut(lPrompt,nNumCopies,lCollated,nStartPage,nStopPage)
ENDIF
.Release()
ENDWITH
My Regards
John Hussey