
RMReport 第7期
5星
- 浏览量: 0
- 大小:None
- 文件类型:OCX
简介:
《RMReport第7期》是一份综合性的报告期刊,聚焦于最新研究发现与行业趋势分析,为读者提供深度洞察和实用信息。
RMReport的使用方法及详解
1. 不打印特定MemoView的情况:
- 页面设置 -> 其他 -> 取消背景图打印选项。
- 设置MemoView属性printable为False。
2. 如何在wwDBGrid中进行打印?
修改rm.inc文件,若要支持RX、GIF、JPEG、DimandAccess、Halcyon和DBISAM等格式,则需要相应修改该配置。取消定义{$DEFINE InfoPower}并移除以下行:
{$Ehlib}
3. 试用版安装方法(假设将文件释放到C:\rm目录中):
(1) Tools -> Environments Option -> Library -> Library Path 中添加路径如下:
C:\rmsource
C:\rmbpl
$(DELPHI)\Lib
$(DELPHI)\Bin
$(DELPHI)\Imports
$(DELPHI)\Projects\Bpl
(2) Component->Install Packages->Add,选择bplrm_d70.bpl。
4. 在Delphi IDE中卸载以前的Report Machine版本,然后打开rm_r50.dpk并编译。再打开rm_d50.dpk进行安装。
包被分成了Runtime package和Designer package,所以需要按照顺序依次安装。
5. 设置单元格变量格式:
代码示例如下:
t := TRMGridReportPage(RMGridReport1.Pages[0]).Grid.Cells[1, 1].View;
t.DisplayFormat := N0.001; // 数字型
t.DisplayFormat := Dyyyymmdd; // 日期型
6. 如何通过代码设置双页报表:
GridReport1.DoublePass := True;
7. 使用代码编写数据字典:
RMReport1.Dictionary.FieldAliases.Clear;
RMReport1.Dictionary.FieldAliases[RMDBDataSet1] := 动物;
RMReport1.Dictionary.FieldAliases[RMDBDataSet1.Name] := 姓名;
8. 在报表中使用变量(或为某个MemoView赋值):
a. 定义全局变量RMVariables,例如:
RMVariables[变量名称] := Edit1.Text;
b. 通过报表的数据字典来设置变量。如字符型需用AsString方法,其他类型则直接赋值。
RMReport1.LoadFromFile(1.rls);
RMReport1.Dictionary.Variables.AsString[变量名称] := Edit1.Text;
c. 直接对单元格进行赋值:
t := TRMGridReportPage(RMGridReport1.Pages[0]).Grid.Cells[1, 1].View;
if Assigned(t) then
t.Memo.Text := dsdsdsds;
d. 在脚本中引用表单的值:
procedure Main; begin Memo1.Memo.Text := Form1.Edit1.Text; end;
9. 自动换行:
- 主项数据栏Stretched = true。
- 文本框 Stretched = true,WordWrap = true。
10. RM内置变量(Script)的使用方法:
a. 属性PrintAtAppendBlank=True
CurReport.AppendBlanking=True时代表增加空行
在RM中,打印设置仅能保存页面边距、打印份数及是否双页打印等信息。缺少对打印机纸张类型、进纸方式以及页面大小的保存和引入功能。
修改代码以实现这些额外参数的保存:
将其他信息添加到注册表或INI文件中。
在读取时,同样需要更新相关代码来正确解析并应用存储的信息:
liRegIniFile.WriteInteger(aReportName, Page_ + IntToStr(i) + _PageWidth, aReport.Pages[i].pgWidth);
liRegIniFile.WriteInteger(aReportName, Page_ + IntToStr(i) + _PageHeight, aReport.Pages[i].pgHeight);
liRegIniFile.WriteInteger(aReportName, Page_ + IntToStr(i) + _PgOr, Integer(aReport.Pages[i].pgOr));
liRegIniFile.WriteInteger(aReportName, Page_ + IntToStr(i) + _PgBin, aReport.Pages[i].pgBin);
liRegIniFile.WriteInteger(aReportName, Page_ + IntToStr(i) + _PgSize, aReport.Pages[i].pgSize);
再修改引入处的代码:
AWidth := liRegIniFile.ReadInteger(aReportName, Page_ + IntToStr(i) + _PageWidth, 0);
AHeight := liRegIniFile.ReadInteger(aReportName, Page_ + IntToStr(i) + _PageHeight, 0);
AOr := TPrinterOrientation(liRegIniFile.ReadInteger(aReportName, Page_ + IntToStr(i) + _
全部评论 (0)


