如何显示中文化的Rave报表打印预览对话框

时间:2010-01-26 14:50:27  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:orm;将文件RpFormPreview.pas另存为SCFormPreview.pas。      把窗体SCRavePreviewForm中的对应文字从英文更改为中文。      在主窗体上加上 RvProject和 RvSystem部件,通过设定RvProject.Engine为RvSystem部件来把两者挂接。       ...
  正文:

拷贝C:Rave5Source目录中的RpFormPreview.pas和RpFormPreview.dfm到对应的项
目目录中。

      把RpFormPreview.pas加入到对应的项目文件中,把对应窗体的名字从
RavePreviewForm更改为SCRavePreviewForm;将文件RpFormPreview.pas另存为
SCFormPreview.pas。

      把窗体SCRavePreviewForm中的对应文字从英文更改为中文。

      在主窗体上加上 RvProject和 RvSystem部件,通过设定RvProject.Engine为
RvSystem部件来把两者挂接。    

      设置RvSystem部件的OverridePreview事件过程为以下代码


procedure TForm1.RvSystem1OverridePreview(ReportSystem: TRvSystem;
OverrideMode: TOverrideMode; var OverrideForm: TForm);
begin
  Case OverrideMode Of
  omCreate:
  Begin
    OverrideForm := TSCRavePreviewForm.Create(self);
    //OverrideForm.Caption := ReportSystem.TitlePreview;
        OverrideForm.Width := ReportSystem.SystemPreview.FormWidth;
    OverrideForm.Height := ReportSystem.SystemPreview.FormHeight;
    OverrideForm.WindowState := ReportSystem.SystemPreview.FormState;
    (OverrideForm As TSCRavePreviewForm).ReportSystem := ReportSystem;
    End;
    omShow:
    Begin
      ReportSystem.SystemPreview.InitPreview((OverrideForm As
      TSCRavePreviewForm).RvRenderPreview);
      If Assigned(ReportSystem.OnPreviewSetup) Then
      Begin
        ReportSystem.OnPreviewSetup((OverrideForm As
        TSCRavePreviewForm).RvRenderPreview);
        End; { if }
        (OverrideForm As TSCRavePreviewForm).InputFileName :=
        ReportSystem.SystemFiler.Filename;
        (OverrideForm As TSCRavePreviewForm).InputStream :=
        ReportSystem.SystemFiler.Stream;
        (OverrideForm As TSCRavePreviewForm).InitFromRphotoshop/ target=_blank class=infotextkey>psystem;
        (* *)
        If soPreviewModal In ReportSystem.SystemOptions Then
        Begin
          OverrideForm.ShowModal;
          End
          Else
          Begin
            OverrideForm.Show;
            End; { else }
            End;
            omWait:
            Begin
              If Not (soPreviewModal In ReportSystem.SystemOptions) Then
              Begin
                // Wait for close

如何显示中文化的Rave报表打印预览对话框》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Language/Delphi/2010-01-26/12439.html


关键字:

关于《如何显示中文化的Rave报表打印预览对话框》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td