FastReport6.3 是中文官網下載的,想看看demo里面的例子,運行的時候一直報錯;都是相同的錯誤;求高手解答下,是不是fastreport沒裝好?

uj5u.com熱心網友回復:
1、你用的是試用版,可能有限制。2、資訊提示最后一行,說明FRXML.pas 有問題
3、代碼視窗{$ifdef}處得知,你上面的DEMO是DELPHI 4.0的,而你現在的用 是DLPHI XE 10.3 還比Delphi 10.2 Tokyo 32 VER320 新,由此可推斷全部是由于字串字符型別發生了變化。 Delphi xe10, 支持AnsiChar和WideChar兩種基本的字符型別.,你DEMO中的字串改為ANSICHAR試試
uj5u.com熱心網友回復:
錯誤提示比較明顯,一個一個查吧,好多都更新了舊函式,比如第一個應該是SysUtils單元里面用CharInSet函式,你可能使用了key in []。uj5u.com熱心網友回復:
把 報錯Error的兩行的函式按照他的提示換一下。 或者google一下uj5u.com熱心網友回復:
frmxl.pas單元參考錯誤,應該是找不到這個檔案,自己增加lib可以搜索的路徑,然后就應該可以運行demo的例子了。uj5u.com熱心網友回復:
procedure TfrxXMLDocument.CreateTempFile;
var
{$IFDEF FPC}
Path: String;
{$ELSE}
{$IFDEF Delphi12}
Path: WideString;
FileName: WideString;
{$ELSE}
Path: String[64];
FileName: String[255];
{$ENDIF}
{$ENDIF}
begin
if FTempFileCreated then Exit;
{$IFDEF FPC}
Path := FTempDir;
if (Path = '') or not DirectoryExistsUTF8(Path) then
Path := GetTempDir;
FTempFile := GetTempFilename(Path,'');
FileCreate(FTempFile);
{$ELSE}
{$IFDEF Delphi12}
SetLength(FileName, 255);
Path := FTempDir;
if (Path = '') or not DirectoryExists(String(Path)) then
begin
SetLength(Path, 255);
SetLength(Path, GetTempPath(255, @Path[1]));
end
else
{$ELSE}
Path := FTempDir;
if (Path = '') or not DirectoryExists(Path) then
Path[0] := Chr(GetTempPath(64, @Path[1])) else
{$ENDIF}
Path := Path + #0;
if (Path <> '') and (Path[Length(Path)] <> '\') then
Path := Path + '\';
GetTempFileName(@Path[1], PChar('fr'), 0, @FileName[1]);
{$IFDEF Delphi12}
FTempFile := StrPas(PWideChar(@FileName[1]));
{$ELSE}
FTempFile := StrPas(@FileName[1]);
{$ENDIF}
{$ENDIF}
FTempStream := TFileStream.Create(FTempFile, fmOpenReadWrite);
FTempFileCreated := True;
end;
這是6.5.5版本的代碼,建議你換一個版本使用,不要用你這6.3了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/11128.html
標籤:VCL組件開發及應用
