ReportMachine 3.0 tips

Source: Internet
Author: User
Tags custom name

1. Do not print specific MemoView.
A. Page settings --> others --> do not print the background image
B. Set the MemoView attribute printable = False

2. How to print wwDBGrid?
Modify rm. inc. If you want to support RX, GIF, JPEG, DimandAccess, Halcyon, DBISAM,
EHLib, you also need to modify rm. inc
// {$ DEFINE InfoPower} // modify this line and remove "//"
// {$ Ehlib}

3. trial version installation method (assume that the file is released to the c:/rm directory)
(1) Add the following to Tools> Environments Option> Libary Path:
C:/rm/souce
C:/rm/bpl
$ (DELPHI)/Lib
$ (DELPHI)/Bin
$ (DELPHI)/Imports
$ (DELPHI)/Projects/Bpl
(2) Component-> Install Packages-> Add, select bpl/rm_d70.bpl

4. Uninstall the previous Report Machine version in Delphi IDE, open rm_r50.dpk, and select "compile ",
Open rm_d50.dpk and select "Install ".

Package is divided into Runtime package and Designer package, so installation sequence is required

5. Use code to set the variable format of cells
T = TRMGridReportPage (RMGridReport1.Pages [0]). Grid. Cells [1, 1]. View
T = TRMMemoView (RMReport1.FindObject ('memo1 '));
T. DisplayFormat: = 'n0. 001' // numeric type
T. DisplayFormat: = 'dyyyy/mm/dd' // Date type

6. How to Use code to set reports twice
GridReport1.DoublePass: = True

7. Use code to write data dictionaries:
RMReport1.Dictionary. FieldAliases. Clear;
RMReport1.Dictionary. FieldAliases ['rmdbdataset1']: = 'animal ';
RMReport1.Dictionary. FieldAliases ['rmdbdataset1. "Name" ']: = 'name ';
In this way, the RM designer <insert data field> is displayed as a custom name, providing friendly display for end users.

8. How to Use variables in a report (or how to assign values to a memoview)
A. RMVariables is defined in RM_Class.pas as a global variable. After being defined, you can use the variable "var1" in the report. For example:
RMVariables ['variable name']: = Edit1.Text;
B. use the data dictionary in the report, TRMReport. dictionary. variables, it should be noted that if the variable is of the struct type, the AsString value should be used, and RMReport should be used for other types. dictionary. variables ['var1']: = 1234, for example:
RMReport1.LoadFromFile ('1. expression ');
RMReport1.Dictionary. Variables. AsString ['variable name']: = Edit1.Text;
C. assign values to a cell directly. For example:
RMGridReport1.LoadFromFile ('1. expression ');
TRMGridReportPage (RMGridReport1.Pages [0]). Grid. Cells [1, 1]. Text: = 'value ';
For RMReport:
RMReport1.LoadFromFile ('1. rmf ');
T: = RMReport1.FindObject ('memo1 ');
If t <> nil then // var t: TRMView
T. Memo. Text: = 'dsdsdss ';
D. Directly reference the Form value in the script
Procedure Main;
Begin
Memo1.memo. Text: = form1.edit1. text;
End;

9. Automatic line feed
Main item data column stretched = true
Text Box stretched = true
Wordwrap = true

10. rm built-in variable (SCRIPT), adding ....
A. Property printatappendblank = true
Curreport. appendblanking = true

Related Article

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.