To export Seagate Crystal Reports report to disk *.rpt file, I trying to use following code. What's wrong?
PEExportOptions exportOptions;
UXDDiskOptions diskOptions;
BOOL bEngineReady = PEOpenEngine ();
short iPrintJob = PEOpenPrintJob("c:\\MyReport2.rpt"
short nNumber = PEGetNParameterFields (iPrintJob);
diskOptions.structSize = UXDDiskOptionsSize;
diskOptions.fileName = "c:\\exp025.rpt";
exportOptions.StructSize = PE_SIZEOF_EXPORT_OPTIONS;
lstrcpy(exportOptions.formatDLLName, "u2fcr.dll"
exportOptions.formatType = UXFCrystalReportType;
lstrcpy(exportOptions.destinationDLLName, "u2ddisk.dll"
exportOptions.destinationType = UXDDiskType;
exportOptions.destinationOptions = &diskOptions;
if (!PEExportTo(iPrintJob, &exportOptions))
{
AfxMessageBox(PEGetErrorCode(iPrintJob));
}
// Start the job (here error has occur)
if (!PEStartPrintJob(iPrintJob,1))
{
AfxMessageBox(PEGetErrorCode(iPrintJob));
}
BOOL b2 = PEClosePrintJob(iPrintJob);
PEExportOptions exportOptions;
UXDDiskOptions diskOptions;
BOOL bEngineReady = PEOpenEngine ();
short iPrintJob = PEOpenPrintJob("c:\\MyReport2.rpt"
short nNumber = PEGetNParameterFields (iPrintJob);
diskOptions.structSize = UXDDiskOptionsSize;
diskOptions.fileName = "c:\\exp025.rpt";
exportOptions.StructSize = PE_SIZEOF_EXPORT_OPTIONS;
lstrcpy(exportOptions.formatDLLName, "u2fcr.dll"
exportOptions.formatType = UXFCrystalReportType;
lstrcpy(exportOptions.destinationDLLName, "u2ddisk.dll"
exportOptions.destinationType = UXDDiskType;
exportOptions.destinationOptions = &diskOptions;
if (!PEExportTo(iPrintJob, &exportOptions))
{
AfxMessageBox(PEGetErrorCode(iPrintJob));
}
// Start the job (here error has occur)
if (!PEStartPrintJob(iPrintJob,1))
{
AfxMessageBox(PEGetErrorCode(iPrintJob));
}
BOOL b2 = PEClosePrintJob(iPrintJob);