在Rvproject的屬性中有一個StoreRav
目目錄中
RavePreviewForm更改為SCRavePreviewForm
SCFormPreview
3)把窗體SCRavePreviewForm中的對應文字從英文更改為中文
4)在主窗體上加上 RvProject和 RvSystem部件
RvSystem部件來把兩者掛接
5)設置RvSystem部件的OverridePreview事件過程為以下代碼
procedure TForm
OverrideMode: TOverrideMode; var OverrideForm: TForm);
begin
Case OverrideMode Of
omCreate:
Begin
OverrideForm := TSCRavePreviewForm
//OverrideForm
OverrideForm
OverrideForm
OverrideForm
(OverrideForm As TSCRavePreviewForm)
End;
omShow:
Begin
ReportSystem
TSCRavePreviewForm)
If Assigned(ReportSystem
Begin
ReportSystem
TSCRavePreviewForm)
End; { if }
(OverrideForm As TSCRavePreviewForm)
ReportSystem
(OverrideForm As TSCRavePreviewForm)
ReportSystem
(OverrideForm As TSCRavePreviewForm)
(* *)
If soPreviewModal In ReportSystem
Begin
OverrideForm
End
Else
Begin
OverrideForm
End; { else }
End;
omWait:
Begin
If Not (soPreviewModal In ReportSystem
Begin
// Wait for close
Repeat
Sleep(
Application
Until Not OverrideForm
End; { if }
End;
omFree:
Begin
If (ReportSystem
Begin
(OverrideForm As TSCRavePreviewForm)
(OverrideForm As TSCRavePreviewForm)
Nil;
End; { if }
FreeAndNil(OverrideForm);
End;
End; { case }
end;
6)編譯運行這個項目
備注
1)拷貝C:\Rave
錄中
2)把RpFormSetup
為SCSetupForm
3)把窗體SCSetupForm中的對應文字從英文更改為中文
4)在主窗體上加上 RvProject和 RvSystem部件
RvSystem 部件來把兩者掛接
5)設置RvSystem部件的OverrideSetup事件過程為以下代碼
procedure TForm
OverrideMode: TOverrideMode; var OverrideForm: TForm);
begin
case
OverrideMode of
omCreate:
begin
OverrideForm := TSCSetupForm
//OverrideForm
(OverrideForm as TSCSetupForm)
end;
omShow:
begin
with OverrideForm as TSCSetupForm
begin
PreviewSetup := False;
Aborted := ShowModal = mrCancel;
end;
end;
omWait:
begin
{because showModal: no wait necessary!}
end;
omFree:
begin
OverrideForm
end;
end;
end;
6)編譯運行這個項目
這種方式進行中文化不會受到RAVE版本升級的影響!對於其它對話框應該可以同法炮制吧!
1)創建一個窗口
RvProject
RvRenderPreview
2)設定RvNDRWriter
var
NDRStream:TMemoryStream;
begin
//建立內存流
NDRStream:=TMemoryStream
//輸出報表數據
RvProject
//將報表數據調入內存流中供預覽
NDRStream
//預覽相應的報表
RvRenderPreview
ShowButton();
end;
<!
要想在你的項目中很好的應用RAVE做好報表
<!
<!
<!
From:http://tw.wingwit.com/Article/program/Delphi/201311/24719.html