ZT: How to display the print settings dialog box in China?

zhaozj2021-02-16  56

How to display the print settings dialog box in China?

Copy the rpformsetup.pas and rpformsetup.dfm in the C: / Rave5 / Source directory to the corresponding project directory.

Add RPFormSetup.pas to the corresponding project file, change the name of the corresponding form from RPSetupform to scsetupform; save the file Rpformsetup.PAS as scformsetup.pas.

Change the correspondence in the form ScsetupForm to Chinese.

On the main form, add the RVProject and Rvsystem components, simply hook it by setting RvProject.Engine as the RVSystem component.

Setting the OverridSetup event procedure of the RVSystem component for the following code:

procedure TForm1.RvSystem1OverrideSetup (ReportSystem: TRvSystem; OverrideMode: TOverrideMode; var OverrideForm: TForm); begin case OverrideMode of omCreate: begin OverrideForm: = TSCSetupForm.Create (nil); //OverrideForm.Caption: = RvSystem1.TitleSetup; (OverrideForm as TSCSetupForm) .ReportSystem: = ReportSystem; end; omShow: begin with OverrideForm as TSCSetupForm, ReportSystem do begin PreviewSetup: = False; Aborted: = showModal = mrCancel; end; end; omWait: begin {because showModal: no wait necessary!} end Omfree: begin overrideform.free; end; end; end;

Compiling this project, its print settings dialog box will become Chinese! In this way, Chinese culture will not be affected by the RAVE version upgrade!

-------------------------------------------------- ------------------------------------

Reference

How To override the Standard SetupDialog

Category

Rave - General

Question

How Can I CHANGE THE SETHER LOOKOGBOX IN AN OTHER LOOK ON An Other Language, for example german?

Solution

In Rave 5 EXIST A Standard Setup-form. Many User, Especially in "Non" --English Countries, Would Localize this Dialog.

.

Copy the rpFormSetup.pas- and rpFormSetup.dfm-file in the project folder and change the filenames and the unit-name inside the pas-file and the form-name for example in dtFormSetup (dt is the abbreviation of "deutsch". - German) .sample files:

Rave_dtformsetiup.zip

Add DTFormSetup to The Uses Statement in The Project. Make Visual Changes and localization to the form and save it.

Connect The Rvsystem Component with The Rvproject Component.

Select The Rvsystem Component and create the overridESetup Event and Enter The Following Code:

procedure TForm1.RvSystem1OverrideSetup (ReportSystem: TRvSystem; OverrideMode: TOverrideMode; var OverrideForm: TForm); begin case OverrideMode of omCreate: begin OverrideForm: = TdtSetupForm.Create (nil); OverrideForm.Caption: = RvSystem1.TitleSetup; (OverrideForm as TdtSetupForm) .ReportSystem: = ReportSystem; end; omShow: begin with OverrideForm as TdtSetupForm, ReportSystem do begin PreviewSetup: = False; Aborted: = showModal = mrCancel; end; end; omWait: begin {because showModal:! no wait necessary) end; omFree :.

Compile and Run Any of the Reports, your Special Setup form should be displayed when you Execute a rave-report.

-> This Way Doesn't Override Your Setupform on A Rave-Update, TOO.

转载请注明原文地址:https://www.9cbs.com/read-16255.html

New Post(0)