Help ME PLEASE
I am working with Delphi7 and Crystal Reports 10 along with the Cyrstal10VCL component. I am getting a Error:692 Export.Send <PEExportTo>.
I checked out the UCRPE32.pas file and found all of the needed DLL's in it.
Below is a list those with '*' in front I have been able to located.
I need the other DLL's, does anyone know where to find them?
- *crxf_html.dll
- *crxf_pdf.dll
- *crxf_rtf.dll
- *crxf_wordw.dll
- *crxf_xls.dll
- *u2fcr.dll
- *u2fodbc.dll
- *u2frdef.dll
- *u2frec.dll
- *u2fsepv.dll
- *u2ftext.dll
- u2fxml.dll
- uxdapp.dll
- uxddisk.dll
- uxdmapi.dll
- uxdnotes.dll
- uxdpost.dll
- uxdvim.dll
procedure TCrpeExportOptions.Clear;
begin
FFileName := '';
FFileType := TextFormat;
FDestination := toFile;
FPromptForOptions := False;
FPromptOnOverwrite := False;
FEmail.Clear;
FExchange.Clear;
FODBC.Clear;
FExcel.Clear;
FLotusNotes.Clear;
FHTML.Clear;
FRTF.Clear;
FText.Clear;
FWord.Clear;
FPDF.Clear;
FXML.Clear;
end;
{------------------------------------------------------------------------------}
{ Send }
{------------------------------------------------------------------------------}
function TCrpeExportOptions.Send : Boolean;
const
FormatExt: array[TCrExportType] of PEDllNameType = ('.pdf',
'.rpt', '.html', '.html', '.xls', '.doc', '', '.rec',
'.txt', '.rtf', '.csv', '.ttx', '.txt', '.xml');
var
SectionCode : Smallint;
nGroup : integer;
dwFirst : PEDWordArray;
dwLast : PEDWordArray;
{ Private DiskOptions }
function DiskOptions(const Key : TCrExportDestination) : Pointer;
begin
Result := nil;
case Key of
{Disk}
toFile :
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxddisk.dll');
PEExpOptions.destinationType := UXDDiskType;
UXDDisk.structSize := SizeOf(UXDDiskOptions);
UXDDisk.filename := PChar(FFileName);
Result := Addr(UXDDisk);
end;
{MAPI}
toEmailViaMapi :
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxdmapi.dll');
PEExpOptions.destinationType := UXDMAPIType;
UXDMapi.structSize := SizeOf(UXDMAPIOptions);
UXDMapi.toList := PChar(FEmail.FToList);
UXDMapi.ccList := PChar(FEmail.FCCList);
UXDMapi.subject := PChar(FEmail.FSubject);
UXDMapi.mailmessage := PChar(FEmail.FMessage);
UXDMapi.nRecipients := 0;
UXDMapi.recipients := nil;
UXDMapi.userName := PChar(FEmail.FUserName);
UXDMapi.password := PChar(FEmail.FPassword);
UXDMapi.nEncodedBytes := 0;
Result := Addr(UXDMapi);
end;
{VIM}
toEMailViaVIM :
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxdvim.dll');
PEExpOptions.destinationType := UXDVIMType;
UXDVIM.structSize := SizeOf(UXDVIMOptions);
UXDVIM.toList := PChar(FEmail.FToList);
UXDVIM.bccList := PChar(FEmail.FCCList);
UXDVIM.ccList := PChar(FEmail.FBCCList);
UXDVIM.subject := PChar(FEmail.FSubject);
UXDVIM.mailmessage := PChar(FEmail.FMessage);
UXDVIM.userName := PChar(FEmail.FUserName);
UXDVIM.password := PChar(FEmail.FPassword);
UXDVIM.nEncodedBytes := 0;
Result := Addr(UXDVIM);
end;
{Exchange}
toMSExchange :
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxdpost.dll');
PEExpOptions.destinationType := UXDExchFolderType;
UXDExchange.structsize := SizeOf(UXDPostFolderOptions);
UXDExchange.pszProfile := PChar(FExchange.FProfile);
UXDExchange.pszPassword := PChar(FExchange.FPassword);
UXDExchange.wDestType := 1011; {UXDPostDocMessage}
UXDExchange.pszFolderPath := PChar(FExchange.FFolder);
UXDExchange.nEncodedBytes := 0;
Result := Addr(UXDExchange);
end;
{Lotus Notes DB}
toLotusNotes :
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxdnotes.dll');
PEExpOptions.destinationType := UXDNotesType;
UXDNotes.structsize := SizeOf(UXDNotesOptions);
UXDNotes.szDBName := PChar(FLotusNotes.FDBName);
UXDNotes.szFormName := PChar(FLotusNotes.FFormName);
UXDNotes.szComments := PChar(FLotusNotes.FComments);
Result := Addr(UXDNotes);
end;
{Application}
toApplication :
begin
{If AppName not defined: set destination to Application via PE}
if IsStrEmpty(FAppName) then
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxdapp.dll');
PEExpOptions.destinationType := UXDApplicationType;
UXDApp.structSize := SizeOf(UXDApplicationOptions);
if IsStrEmpty(FFileName) then
UXDApp.fileName := nil
else
UXDApp.fileName := PChar(FFileName);
PEExpOptions.destinationOptions := Addr(UXDApp);
end
{AppName is defined: the VCL will send the file to
an application. First set export destination to disk,
and handle the rest in TCrpe.Execute}
else
begin
StrPCopy(PEExpOptions.destinationDLLName, 'uxddisk.dll');
PEExpOptions.destinationType := UXDDiskType;
UXDDisk.structSize := SizeOf(UXDDiskOptions);
if IsStrEmpty(FFileName) then
begin
UXDAppFileName := CrGetTempName(FormatExt[FFileType]);
UXDApp.fileName := PChar(UXDAppFileName);
end
else
UXDApp.fileName := PChar(FFileName);
UXDDisk.filename := PChar(FFileName);
Result := Addr(UXDDisk);
end;
end;
end; { case }
end; { DiskOptions }
{ Private FormatOptions }
function FormatOptions(const FType: TCrExportType) : Pointer;
begin
Result := nil;
case FType of
AdobeAcrobatPDF :
begin
PEExpOptions.formatType := UXFPortableDocumentFormat;
StrPCopy(PEExpOptions.formatDLLName, 'crxf_pdf.dll');
UXFPDF.structSize := SizeOf(UXFPDFFormatOptions);
UXFPDF.exportPageRange := FPDF.FUsePageRange;
UXFPDF.firstPageNo := FPDF.FFirstPage;
UXFPDF.lastPageNo := FPDF.FLastPage;
Result := Addr(UXFPDF);
end;
CrystalReportRPT :
begin
PEExpOptions.formatType := UXFCrystalReportType;
StrPCopy(PEExpOptions.formatDLLName, 'u2fcr.dll');
end;
HTML32, HTML40 :
begin
if FType = HTML32 then
PEExpOptions.formatType := UXFHTML32StdType
else
PEExpOptions.formatType := UXFHTML40Type;
StrPCopy(PEExpOptions.formatDLLName, 'crxf_html.dll');
UXFHTML.structSize := SizeOf(UXFHTML3Options);
UXFHTML.filename := PChar(FFileName);
UXFHTML.pageNavigator := FHTML.FPageNavigator;
UXFHTML.separatePages := FHTML.FSeparatePages;
UXFHTML.imageExtStyle := UXFJPGExtensionStyle;
UXFHTML.nPageRanges := Ord(FHTML.FUsePageRange);
dwFirst[0] := FHTML.FFirstPage;
dwLast[0] := FHTML.FLastPage;
UXFHTML.pfirstPageNo := @dwFirst;
UXFHTML.plastPageNo := @dwLast;
Result := Addr(UXFHTML);
end;
MSExcel :
begin
{Check for Excel export type}
if (FExcel.FXlsType = ExcelStandard) then
PEExpOptions.formatType := UXFXl97Type
else {ExcelDataOnly}
PEExpOptions.formatType := UXFXlRecDumpType;
StrPCopy(PEExpOptions.formatDLLName, 'crxf_xls.dll');
{Set Options}
UXFXls.structSize := SizeOf(UXFXlsOptions);
UXFXls.bColumnHeadings := False; {ignored in CR9}
case FExcel.FColumnWidth of
ByConstant : UXFXls.bUseConstColWidth := Bool(True);
ByArea : UXFXls.bUseConstColWidth := Bool(False);
end;
if (FExcel.FConstant > MAX_CONST_COL_WIDTH_IN_TWIPS) or
(FExcel.FConstant < MIN_CONST_COL_WIDTH_IN_TWIPS) then
FExcel.FConstant := DEFAULT_COLUMN_WIDTH_IN_TWIPS;
UXFXls.fConstColWidth := FExcel.FConstant;
UXFXls.bTabularFormat := False; {ignored in CR9}
if not StrToSectionCode(FExcel.FArea, SectionCode) then
UXFXls.baseAreaType := PE_SECT_WHOLE_REPORT
else
begin
nGroup := SectionCode mod 25;
SectionCode := (SectionCode div 1000);
UXFXls.baseAreaType := SectionCode;
UXFXls.baseAreaGroupNum := nGroup + 1;
end;
UXFXls.bUseWorksheetFunc := Bool(FExcel.FWorksheetFunctions);
UXFXls.bExportPageBreaks := Bool(FExcel.FCreatePageBreaks);
UXFXls.bCnvrtDateValToStr := Bool(FExcel.FConvertDatesToStrings);
if FExcel.FUsePageRange = True then
UXFXls.bExportAllPages := Bool(False)
else
UXFXls.bExportAllPages := Bool(True);
UXFXls.bExportPageHeaders := Bool(FExcel.FExportHeaderFooter);
UXFXls.dwStartPageNumber32 := FExcel.FFirstPage;
UXFXls.dwEndPageNumber32 := FExcel.FLastPage;
UXFXls.bChopPageHeader := Bool(FExcel.FChopPageHeader);
Result := Addr(UXFXls);
end;
MSWord :
begin
PEExpOptions.formatType := UXFExactDocFormatType;
StrPCopy(PEExpOptions.formatDLLName, 'crxf_wordw.dll');
if not FWord.FPrompt then
begin
UXFWord.structSize := SizeOf(UXFEDOCFormatOptions);
UXFWord.exportPageRange := Bool(FWord.FUsePageRange);
UXFWord.firstPageNo := FWord.FFirstPage;
UXFWord.lastPageNo := FWord.FLastPage;
Result := Addr(UXFWord);
end;
end;
ODBCTable :
begin
PEExpOptions.formatType := UXFODBCType;
StrPCopy(PEExpOptions.formatDLLName, 'u2fodbc.dll');
if not FODBC.FPrompt then
begin
UXFODBC.structSize := SizeOf(UXFODBCOptions);
UXFODBC.dataSourceName := PChar(FODBC.FSource);
UXFODBC.dataSourceUserID := PChar(FODBC.FUser);
UXFODBC.dataSourcePassword := PChar(FODBC.FPassword);
UXFODBC.exportTableName := PChar(FODBC.FTable);
UXFODBC.nEncodedBytes := 0;
Result := Addr(UXFODBC);
end;
end;
Records :
begin
if FText.FRecordsType = ColumnsWithSpaces then
PEExpOptions.formatType := UXFRecordType
else
PEExpOptions.formatType := UXFRecord6Type;
StrPCopy(PEExpOptions.formatDLLName, 'u2frec.dll');
UXFRec.structSize := SizeOf(UXFRecordStyleOptions);
UXFRec.useReportNumberFormat := FText.FUseRptNumberFmt;
UXFRec.useReportDateFormat := FText.FUseRptDateFmt;
Result := Addr(UXFRec);
end;
ReportDefinition :
begin
PEExpOptions.formatType := UXFReportDefinitionType;
StrPCopy(PEExpOptions.formatDLLName, 'u2frdef.dll');
end;
RichText :
begin
PEExpOptions.formatType := UXFExactRichTextFormatType;
StrPCopy(PEExpOptions.formatDLLName, 'crxf_rtf.dll');
if not FRTF.FPrompt then
begin
UXFRTF.structSize := SizeOf(UXFERTFFormatOptions);
UXFRTF.exportPageRange := Bool(FRTF.FUsePageRange);
UXFRTF.firstPageNo := FRTF.FFirstPage;
UXFRTF.lastPageNo := FRTF.FLastPage;
Result := Addr(UXFRTF);
end;
end;
SeparatedValues :
begin
PEExpOptions.formatType := UXFSeparatedValuesType;
StrPCopy(PEExpOptions.formatDLLName, 'u2fsepv.dll');
UXFSepVal.structSize := SizeOf(UXFCharCommaTabSeparatedOptions);
UXFSepVal.useReportNumberFormat := FText.FUseRptNumberFmt;
UXFSepVal.useReportDateFormat := FText.FUseRptDateFmt;
UXFSepVal.stringDelimiter := FText.FStringDelimiter;
UXFSepVal.fieldDelimiter := PChar(FText.FFieldSeparator);
UXFSepVal.nEncodedBytes := 0;
Result := Addr(UXFSepVal);
end;
TabSeparatedText :
begin
PEExpOptions.formatType := UXFTabbedTextType;
StrPCopy(PEExpOptions.formatDLLName, 'u2ftext.dll');
end;
TextFormat :
begin
PEExpOptions.formatType := UXFPaginatedTextType;
StrPCopy(PEExpOptions.formatDLLName, 'u2ftext.dll');
UXFPagText.structSize := SizeOf(UXFPaginatedTextOptions);
UXFPagText.nLinesPerPage := FText.FLinesPerPage;
if FText.FCharPerInch = 0 then
UXFPagText.useDefaultCPI := Bool(True)
else
UXFPagText.useDefaultCPI := Bool(False);
UXFPagText.userDefinedCPI := FText.FCharPerInch;
Result := Addr(UXFPagText);
end;
XML1 :
begin
PEExpOptions.formatType := UXFXMLType;
StrPCopy(PEExpOptions.formatDLLName, 'u2fxml.dll');
if not FXML.FPrompt then
begin
UXFXML.structSize := SizeOf(UXFXmlOptions);
UXFXML.fileName := PChar(FFileName);
UXFXML.allowMultipleFiles := Smallint(FXML.FSeparatePages);
Result := Addr(UXFXML);
end;
end;
end; { case ExportType }
end;
{Main procedure: Export.Send}
begin
Result := False;
if (Cr = nil) then Exit;
if not Cr.OpenPrintJob then Exit;
if FPromptForOptions then
begin
PEExpOptions.structSize := SizeOf(PEExportOptions);
if not Cr.FCrpeEngine.PEGetExportOptions(Cr.FPrintJob, PEExpOptions) then
begin
case Cr.GetErrorMsg(Cr.FPrintJob,errCancelDialog,errEngine,'',
'Export.Send <PEGetExportOptions>') of
errIgnore : Exit;
errAbort : Abort;
errRaise : raise ECrpeError.Create(Cr.FLastErrorNumber, Cr.FLastErrorString);
end;
end;
Result := True;
end
else
begin
{Set Format Options}
pFormat := nil;
pFormat := FormatOptions(FFileType);
PEExpOptions.formatOptions := pFormat;
{Set DestinationOptions}
pDisk := nil;
pDisk := DiskOptions(FDestination);
PEExpOptions.destinationOptions := pDisk;
end;
if not Cr.FCrpeEngine.PEExportTo(Cr.FPrintJob, PEExpOptions) then
begin
case Cr.GetErrorMsg(Cr.FPrintJob,errNoOption,errEngine,'',
'Export.Send <PEExportTo>') of
errIgnore : Exit;
errAbort : Abort;
errRaise : raise ECrpeError.Create(Cr.FLastErrorNumber, Cr.FLastErrorString);
end;
end;
Result := True;
end;