CT,
>The cReportsObj::SendToExcel() method doesn't seem to send anything to Excel.
>
>REPORT FORM (cFileNameHere) TO PRINTER PROMPT NOCONSOLE
>
>Am I missing something simple here?
Just looking at this code it would appear that Excel is not getting called. However, in the MM Developer's Guide under the topic "Sending Reports to Excel", there is a code snippet that you need to add to the bottom of the DataEnvironment.Init() method of any reports you want to send to Excel:
IF TYPE('poExcel') == 'O' AND NOT ISNULL(poExcel)
poExcel.ExportCursorToExcel(ALIAS(), pcExcelFileName , .T.)
RETURN .F.
ENDIF
Although the code snippet is intact, it looks like the explanation in the DevGuide right above it got "lost" somewhere along the line. This text should read:
To send a report to Excel, add the following code to the bottom of the report's DataEnvironment.Init() method:".
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com