資源簡(jiǎn)介
我的報(bào)表工具:MyReportMachine.dll(報(bào)表工具)
本案例基于.net2012開發(fā)平臺(tái)
MyReportMachine.dll調(diào)用案例,包括調(diào)用源碼
簡(jiǎn)單調(diào)用實(shí)例,包括調(diào)用源碼

代碼片段和文件信息
//----------------------------------------------------------------------------
//模塊名稱:?FastReport
//模塊描述:?代替k3報(bào)表工具
//創(chuàng)建日期:?2008-06-20
//創(chuàng)?建?人:?Sealy
//----------------------------------------------------------------------------‘
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data.OleDb;
using?ADODB;
using?System.Windows.Forms;
using?System.Reflection;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Runtime.InteropServices;
namespace?Report_CSharp
{
????public?partial?class?FrmReport?:?Form
????{
????????//創(chuàng)建控件;?hwnd為控件句柄,大于0為嵌入報(bào)表
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MCreate(int?hwnd);
????????//關(guān)閉控件并釋放
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MClose();
????????//清除所有變量與數(shù)據(jù)對(duì)象
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MClearAll();
????????//將變量傳入報(bào)表
????????//???objName:變量名稱;
????????//???objValue:變量值(可以是字符串?dāng)?shù)值日期是否等類型)
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MAddV(object?objName?object?objValue);
????????//動(dòng)態(tài)將數(shù)據(jù)集傳入報(bào)表
????????//???objName:數(shù)據(jù)集名稱;
????????//???objValue:Recordset數(shù)據(jù)集
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MAddData(object?objName?ADODB.Recordset?rsData);
????????//控件中有數(shù)據(jù)源指定數(shù)據(jù)源對(duì)應(yīng)關(guān)系(最多10個(gè)數(shù)據(jù)源)(不超過10個(gè)數(shù)據(jù)源時(shí),請(qǐng)使用這個(gè)方法)
????????//???intNumber:數(shù)據(jù)源編號(hào)(0-9)共12個(gè)數(shù)據(jù)源
????????//???objValue:Recordset數(shù)據(jù)集
????????//???objName:數(shù)據(jù)集別名
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MSetData(int?intNumber?ADODB.Recordset?rsData?object?objName);
????????//報(bào)表打印
????????//???intKind:?=0:報(bào)表預(yù)覽;=1:打印報(bào)表;=2:報(bào)表設(shè)計(jì);=3:報(bào)表準(zhǔn)備;=4:顯示準(zhǔn)備的報(bào)表;
????????//???intShowDialog:?=0:隱藏打印對(duì)話框?<>0:顯示打印對(duì)話框
????????//???intProgress:?=0:隱藏報(bào)表加載進(jìn)度條?<>0:顯示報(bào)表加載進(jìn)度條
????????//???objFileName:報(bào)表文件路徑
????????//???objPrinter:打印名稱=““:默認(rèn)打印
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MPrintReport(int?intKind?int?intShowDialog?int?intProgress?object?objFileName?object?objPrinter);
????????//--------------------------------------------------------以下是報(bào)表附屬屬性,可以不用調(diào)用
????????//返回報(bào)表頁數(shù)
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?int?MReportCount();
????????//設(shè)報(bào)表預(yù)覽按鈕顯示狀態(tài)
????????//???intZoom:縮放按鈕
????????//???intLoad:導(dǎo)出按鈕
????????//???intSave:保存按鈕
????????//???intPrint:打印按鈕
????????//???intPageSetup:報(bào)表頁面設(shè)置按鈕
????????//???intExit:退出報(bào)表預(yù)覽按鈕
????????//???intSaveToXls:導(dǎo)出到Execl按鈕
????????//???intExport:導(dǎo)出按鈕
????????//???intNavigator:導(dǎo)航按鈕
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MPreviewButtons(int?intZoom?int?intLoad?int?intSave?int?intPrint?int?intPageSetup?int?intExit?int?intSaveToXls?int?intExport?int?intNavigator);
????????//設(shè)置報(bào)表語言(默認(rèn)中文)
????????[DllImport(“MyReportMachine.dll“)]
????????private?static?extern?void?MLanguage(object?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????110592??2005-11-12?13:24??Simple?Demo\adodb.dll
?????文件????????144??2012-09-11?07:57??Simple?Demo\C#\app.config
?????文件???????1150??2008-10-26?09:13??Simple?Demo\C#\C#16.ico
?????文件???????4286??2008-10-26?09:13??Simple?Demo\C#\C#32.ico
?????文件??????13067??2014-05-19?14:25??Simple?Demo\C#\FrmReport.cs
?????文件???????7070??2014-05-19?14:22??Simple?Demo\C#\FrmReport.Designer.cs
?????文件???????8042??2014-05-19?14:22??Simple?Demo\C#\FrmReport.resx
?????文件???????4608??2009-09-08?12:28??Simple?Demo\C#\obj\Debug\Interop.My_FastReport.dll
?????文件????????662??2009-09-08?12:28??Simple?Demo\C#\obj\Debug\Report_CSharp.csproj.ResolveComReference.cache
?????文件????????863??2014-04-11?05:50??Simple?Demo\C#\obj\Release\DesignTimeResolveAssemblyReferences.cache
?????文件???????6654??2014-05-19?14:21??Simple?Demo\C#\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????598??2012-09-11?08:07??Simple?Demo\C#\obj\Release\GenerateResource.read.1.tlog
?????文件????????642??2012-09-11?08:07??Simple?Demo\C#\obj\Release\GenerateResource.write.1.tlog
?????文件???????1829??2014-05-19?14:27??Simple?Demo\C#\obj\Release\Report_CSharp.application
?????文件???????3383??2014-05-19?14:28??Simple?Demo\C#\obj\Release\Report_CSharp.csproj.FileListAbsolute.txt
?????文件????????979??2014-05-19?14:24??Simple?Demo\C#\obj\Release\Report_CSharp.csproj.GenerateResource.Cache
?????文件???????4872??2014-04-11?05:50??Simple?Demo\C#\obj\Release\Report_CSharp.csprojResolveAssemblyReference.cache
?????文件??????21504??2014-05-19?14:27??Simple?Demo\C#\obj\Release\Report_CSharp.exe
?????文件???????4159??2014-05-19?14:27??Simple?Demo\C#\obj\Release\Report_CSharp.exe.manifest
?????文件???????1716??2014-05-19?14:24??Simple?Demo\C#\obj\Release\Report_CSharp.FrmReport.resources
?????文件??????40448??2014-05-19?14:27??Simple?Demo\C#\obj\Release\Report_CSharp.pdb
?????文件????????180??2014-05-19?14:24??Simple?Demo\C#\obj\Release\Report_CSharp.Properties.Resources.resources
?????文件??????????2??2012-09-11?08:07??Simple?Demo\C#\obj\Release\ResGen.read.1.tlog
?????文件??????????2??2012-09-11?08:07??Simple?Demo\C#\obj\Release\ResGen.write.1.tlog
?????文件???????2829??2012-09-11?07:57??Simple?Demo\C#\obj\Release\ResolveAssemblyReference.cache
?????文件???????4608??2012-09-11?08:02??Simple?Demo\C#\obj\Release\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????395??2009-10-06?00:35??Simple?Demo\C#\obj\Report_CSharp.csproj.FileList.txt
?????文件???????1144??2011-01-21?23:55??Simple?Demo\C#\obj\Report_CSharp.csproj.FileListAbsolute.txt
?????文件????????476??2008-10-25?15:38??Simple?Demo\C#\Program.cs
?????文件???????1222??2008-10-25?23:53??Simple?Demo\C#\Properties\AssemblyInfo.cs
............此處省略131個(gè)文件信息
- 上一篇:PCRat遠(yuǎn)控開源代碼
- 下一篇:AR8328 datasheet
評(píng)論
共有 條評(píng)論