ReportMachine OCX 的使用方法
http://rmachine.haotui.com/thread-55-1-1.html
RMReport.ocx
RMEngine.Init(1); // 初始化
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, 1, 1 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

ReportMachine OCX 的使用方法的更多相关文章
- FAQ:win7和win8 64位注册ocx控件方法
win7/win8 问题所在: 64位的系统一般都是可以安装32位程序的, 执行 C:\Windows\SysWOW64\regsvr32.exe 而不是 C:\Windows\Sys ...
- 窗体调用 OCX 的使用方法(MFC,WINFORM)
在上一篇中,我们做了一个OCX控件,叫mfcActive.ocx,在这一篇我们要做的就是使用这个ocx控件.第一步:创建一个MFC的对话框工程(其实winform 也是一样的) 第二步:在工具箱中常规 ...
- ReportMachine OCX
http://rmachine.haotui.com/thread-55-1-1.html 偏高偏低提示 [IF( [RMDBDataSet1."abnormalIndicator" ...
- VB 6.0不能加载MSCOMCTL.OCX的解决方法
问题场景:打开 VB 6项目时报错,不能加载 'C:\WINDOWS\system32\MSCOMCTL.OCX'--继续加载工程吗? 解决方法: 1.新建一个VB工程,然后按CTRL + T,选中 ...
- jacob访问ocx控件方法和遇到的问题
最近在进行摄像机的二次开发,摄像机厂商提供了使用C++开发的ocx控件:所以尝试使用jacob来进行访问. 操作步骤如下: 1, 从官网(http://sourceforge.net/projects ...
- Windows系统下运行某些程序时缺少“Msflxgrd.ocx”的解决方法
出现这样的错误就是系统缺少相应的库文件,我们安装即可. 下载Msflxgrd.ocx,这里提供一个下载网址:https://www.ocxme.com/files/msflxgrd_ocx 64位系统 ...
- Html页中使用OCX控件
原文:http://blog.csdn.net/mouse8166/article/details/5515657 最近准备开发一个b/s架构的应用程序需要用到activeX控件,web服务器尚未进入 ...
- JAVASCRIPT 调用 其他应用程序的方法
在上一篇中就已经提供了一种方法,就是通过自己写OCX 给OCX 传入路径,通过OCX 启动应用程序.当然这种方法可扩展性很多,不一定是启动应用程序了.今天提供另一种比较简单的可以启动应用程序的方法,不 ...
- 根据不同浏览器判断OCX插件是否安装
最近项目进入到了验收阶段,需要兼容不同的浏览器,海康的Demo写了一个判断插件是否成功安装的函数,但是经过测试,只在IE浏览器下有效果,在其他的浏览器下面会出现Bug,现在需要写一个通用的方法,在不同 ...
随机推荐
- codeforces round#510
蒟蒻和以前一样还是只能做 $4$ 题, 希望有一天可以 水到 $5$ 题!! 不过也终于上了蓝了... A. Benches Description 给出$N$个座位, 每个座位上初始有$a_i$ ...
- imaplib.error: command: SEARCH => got more than 10000 bytes
imaplib.error: command: SEARCH => got more than 10000 bytes 使用IMAPLIB进行标记邮件状态的时候,在 typ,data=M.sea ...
- 201621123008 《Java程序设计》 第11周学习总结
1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 2. 书面作业 本次PTA作业题集多线程 1. 源代码阅读:多线程程序BounceThread 1.1 BallR ...
- 状态机学习(三)解析JSON1
来自 从零开始的 JSON 库教程 从零开始教授如何写一个符合标准的 C 语言 JSON 库 作者 Milo Yip https://zhuanlan.zhihu.com/json-tutorial ...
- Capacity To Ship Packages Within D Days LT1011
A conveyor belt has packages that must be shipped from one port to another within D days. The i-th p ...
- pc-H5 适配方案
一.介绍 在前端项目页面开发中,尤其是H5页面开发,我们常常要适配各种分辨率的屏幕,才能让用户获得最好的体验效果.pc也是如此,很多页面是一屏,也是要适配各种尺寸的分辨率.这时候我们就需要对各种分辨率 ...
- MVVM模式理解
MVVM 是Model-View-ViewModel 的缩写,它是一种基于前端开发的架构模式,其核心是提供对View 和 ViewModel 的双向数据绑定,这使得ViewModel 的状态改变可以自 ...
- 火狐 debug 看向后台传递的信息
自己做前端和后台开发,最重要的是数据交换,知道了数据是怎么传的,传到哪里,传的什么,就能很容易的开发. 火狐看传递参数的信息在debug里面,详情如图: 我的后台的C# 的webservice,接收起 ...
- Roslyn研究随笔
Roslyn概述: http://blogs.ejb.cc/archives/7604/dotnet-compile-platform-roslyn-overview 使用Microsoft Rosl ...
- SpringMVC 学习 十 SSM环境搭建(三)springMVC文件配置
SpringMVC文件配置的详细过程,可以查看springMVC环境搭建的注解配置篇<springMVC学习三 注解开发环境搭建> <?xml version="1.0&q ...