ReportMachine OCX
http://rmachine.haotui.com/thread-55-1-1.html
偏高偏低提示
[IF( [RMDBDataSet1."abnormalIndicator"]='h','↑',IF( [RMDBDataSet1."abnormalIndicator"]='l','↓',''))]
RMReport.ocx
RMEngine.Init(); // 初始化
RMEngine.LoadFromFile('c:\1.rmf'); // 读入报表模版
RMEngine.AddDataSet(DataModule2.Customers, 'CustomersDS'); // 增加一个数据表
RMEngine.DesignReport; // 设计报表
RMReport.ShowReport; // 预览报表
c#调用
this.dataSet1 = new System.Data.DataSet();
this.dataView1 = new System.Data.DataView();
this.rmReport1 = new RMReportEngine.RMReport();
this.dataSet1.Reset(); this.oleDbDataAdapter1.SelectCommand.CommandText = "select * from Customer";
this.oleDbDataAdapter1.Fill(this.dataSet1, "Customer");
this.dataView1.Table = this.dataSet1.Tables["Customer"];
this.dataView1.RowFilter = "CustNo >= 3000";
//this.dataGrid1.DataSource = this.dataView1; rmReport1.ModifyPrepared = false;
rmReport1.Init(this, TxRMReportType.rmrtReport);
//rmReport1.PreviewOptions.BtnDesignVisible = true;
//rmReport1.AddDataSet(this.dataSet1.Tables["Customer"], "db1");
rmReport1.AddDataSet(this.dataView1, "db1");
rmReport1.LoadFromFile(MainPath + "reports\\SimpleList.rmf"); //SimpleList.rmf rmReport1.AddVariable("公司名称", "我的公司名称", true);
rmReport1.AddVariable("公司简称", "我的公司简称", true);
rmReport1.AddVariable("公司电话", "我的公司电话", true); if (radioButton1.Checked)
{
rmReport1.ShowReport();
}
else
{
rmReport1.DesignReport();
}
public void AddDataSet(System.Data.DataView aDataView, string aDatasetName)
public void AddDataSet(System.Data.DataTable aDataTable, string aDatasetName)
public void AddDetailDataSet(System.Data.DataTable aDataTable, string aDatasetName, string aMasterName, System.Data.DataRelation aDataRelation)
public void AddVariable(string aVarName, object aVarValue, bool aIsString)
public void GetReportData(ref string aReportData)
public void Init(System.Windows.Forms.Form aOwner, RMReportEngine.RMReportType aReportType)
web版 RMViewer.ocx
http://rmachine.haotui.com/thread-56-1-1.html
编译client_ActiveForm目录中的项目就会生成RMViewer.ocx
com版本
COM控件(ocx)可以在VB、.Net、VC、Delphi等支持ADO的开发工具中使用
ocx版本
Dim conn
Dim rs
Dim sql
Dim rq
Dim Engine Set conn = OpenDBConnection
Set rs = Server.CreateObject ("ADODB.recordset")
sql = "SELECT * from customer"
rs.Open sql, conn, , Set Engine = Server.CreateObject("RMEngine.Engine")
Engine.Init
Engine.AddDataSet "db1", rs
Engine.SetReportFile RootPath & "SimpleList.rmf"
Engine.ViewerVersion = ViewerVersion
Engine.ViewerFileName = ViewerFileName
Engine.SaveReportURL = "asp/DesignReportSave.asp?Report=" & "SimpleList.rmf"
Engine.AddVariable "NowTime", Now, false Engine.ShowProgress = True Set rs = nothing
conn.Close
Set conn = nothing
报表机器,双屏切换到单屏看不见预览界面了,解决方法修改注册表
计算机\HKEY_USERS\S-1-5-21-3613803311-2736177264-1221004870-500\Software\WHF SoftWare\Report Machine\Form\TRMPreviewForm
XPosition 1606 改为0
YPosition -173改为0
if GetFieldValue('RMDBDataSet1."SFYYFSX"') then // 是否用药方式行
begin
//ShowMessage(Memo12.Text);
Memo12.HAlign:=rmhRight;
end
else
begin
Memo12.HAlign:=rmhLeft;
end;
procedure MasterData1_OnBeforePrint(Sender: TObject);
begin
if GetFieldValue('RMDBDataSet1."SFZZYZX"') then // 是否重整医嘱行
begin
Line1.Visible:=true;
end
else
begin
Line1.Visible:=false;
end;
end;
procedure Memo13_OnAfterCalc(Sender: TObject);
begin
if Pos('┐',Memo13.Text)<>0 then
begin
Memo13.Visible:=true;
Shape2.Shape:=rmVertLine;
Shape2.Visible:=true;
Shape1.Visible:=false;
Shape3.Visible:=false;
end
else if Pos('┘',Memo13.Text)<>0 then
begin
Memo13.Visible:=true;
Shape3.Shape:=rmVertLine;
Shape3.Visible:=true;
Shape1.Visible:=false;
Shape2.Visible:=false;
end
else if Pos('│',Memo13.Text)<>0 then
begin
//Memo13.text:='';
Memo13.Visible:=true;
Shape1.Shape:=rmVertLine;
Shape1.Visible:=true;
Shape2.Visible:=false;
Shape3.Visible:=false;
end
else
begin
Memo13.Visible:=true;
Shape1.Visible:=false;
Shape2.Visible:=false;
Shape3.Visible:=false;
end;
end;
procedure Memo12_OnAfterCalc(Sender: TObject);
begin
if GetFieldValue('RMDBDataSet1."SFYYFSX"') then // 是否用药方式行
begin
//ShowMessage(Memo12.Text);
Memo12.HAlign:=rmhRight;
end
else
begin
Memo12.HAlign:=rmhLeft;
end;
end;
最新文章
- iOS系列 基础篇 05 视图鼻祖 - UIView
- [ASP.NET Core] Static File Middleware
- 类加载机制(深入理解JAVA虚拟机学习笔记)
- ajax中使用post传值数组array
- Atitit 如何利用先有索引项进行查询性能优化
- 从多个XML文档中读取数据用于显示webapi帮助文档
- 仙人掌(cactus)
- SQL数据库设计三范式
- php把文件上传到远程服务器上例子
- js基本语法与变量
- Asp.net 项目部署的两个问题
- 【Dojo 1.x】笔记7 配置对象dojoConfig的内容1:has属性、加载器的属性
- Hishop数据库根据产品ProductID取产品规格
- SpringMVC 图片上传,检查图片大小
- PHP实现防sql注入
- H5商城,纯前端静态页面
- Groovy 学习手册(1)
- iphone传照片还是用QQ比较好
- hashlib 和loggin模块
- 链表实现队列C语言写法
热门文章
- MYSQL 备份及还原数据库
- bootstrap下拉框的例子,提示Error: Bootstrap&#39;s JavaScript requires jQuery
- impulse&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;
- 【校招面试 之 C/C++】第6题 C++深拷贝与浅拷贝
- Loitor_产品(二)校准立体摄像机
- js 获取高度
- MySql中循环的使用
- Golang之写一个聊天室
- 搭建Eureka集群
- winXP使用