ZT: how to display the print Settings dialog box in Chinese culture?

Source: Internet
Author: User

How to display the print Settings dialog box in Chinese culture?

Copy 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, and save rpformsetup. PAS as scformsetup. Pas.

Change the corresponding text in the form scsetupform from English to Chinese.

Add the rvproject and rvsystem components to the main form, and connect the two components by setting rvproject. engine as the rvsystem component.

The following code sets the overridesetup event of the rvsystem part:

Procedure tform1.rvsystem1overridesetup (reportsystem: trvsystem;
Overridemode: toverridemode; var overrideform: tform );
Begin
Case
Overridemode
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;

Compile and run this project, and the print Setting Dialog Box will become Chinese!
In this way, the Chinese culture will not be affected by the rave version upgrade!

 

Bytes --------------------------------------------------------------------------------------

Reference 1

How to override the standard setupdialog

Category

Rave-General

Question

    How can I change the setup-dialogbox in an other look or in an other language, for example German?

 

Solution

    In rave 5 exist a standard setup-form. Revoke user, especially in "Non"-English countries, wocould localize this dialog.

    Normally the printsetup form is displayed when executing the report to allow the user to select the report destination and other settings (copies, file format to use ).

    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: begin OverrideForm.Free; end; end; end; 

Compile and run any of the reports, your special setup form shoshould be displayed when you execute a rave-report.
-> This way doesn' t override your setupform on a rave-Update, too.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.