cwg1027
79516
|
2014/1/29 22:30:11 |
今天有点时间再次进行测试,成功!分析一下,都是自己不细心缘故。 但还是要感谢yihuas无私奉献! |
cwg1027
79379
|
2014/1/27 22:13:15 |
增加了一个数据源(2个数据源),但没有成功。请教yihuas需要修改那几个文件的那几个地方,先谢了! |
yihuas
43184
|
2013/1/5 15:18:33 |
我那个测试的东西是 fastreport 3.0做的报表文件,会不会版本不一致导致报表文档不兼容啊.我也没有用过 fastreport 4.0 所以没法解答,下面贴一个生成报表工具的代码. ---------- program designrpt;
uses
forms, classes, Sysutils, registry, frxClass, frxDCtrl, frxRich, frxBarcode, frxDBSet, frxChart, frxOle, frxExportPDF, frxExportImage, frxExportRTF, frxExportXLS, frxExportHTML, frxGradient, frxChBox, frxDMPExport, frxCross, frxDesgn;
{$R *.RES}
//********** // 关联 FastReport 报表文件 //********** procedure RegFilefilter; begin with tregistry.create do try RootKey:=$80000000; openkey('.fr3',true); writestring(','FRFiles'); closekey; //---------- openkey('FRFiles',true); writestring(','FastReport Files'); openkey('Defaulticon',true); writestring(',application.exename); closekey; //---------- openkey('FRFiles\shell\open\command',true); writestring(',application.exename+' "%1"'); finally closekey; free; end; end;
//********** // 创建DataSet //********** procedure InitialDataSet; var i:Integer; sFileName:String; TmpList:TStringList; begin try TmpList:=TStringList.Create; sFileName:=ChangeFileExt(Application.ExeName,'.txt'); if fileexists(sFileName) then TmpList.LoadFromFile(sFileName);
if TmpList.Count=0 then begin TmpList.add('userdata'); TmpList.add('masterdata'); TmpList.Savetofile(sFileName); end;
for i:=1 to TmpList.Count do TfrxdbDataSet.create(Application).Name:=TmpList.Strings[i-1];
finally freeandnil(TmpList); end; end;
//********** // 主程序 //********** begin Application.Initialize; with TfrxReport.create(Application) do try RegFilefilter; InitialDataSet; if ParamCount>0 then LoadFromFile(ParamStr(1)); DesignReport; finally free; end; Application.run; end. |
linkyang
43183
|
2013/1/5 11:38:39 |
yihuas 4 帮忙解决下,我这里打印出现乱码,打开设计页面的数据集也是乱码,帮忙指点下 我用的是fastreport 4.21 版本 |
cwg1027
43177
|
2013/1/2 18:38:23 |
修改 SimpleXmlUnt.pas 文件后,一切正常,谢谢! |
yihuas
43166
|
2012/12/30 7:46:09 |
修改 SimpleXmlUnt.pas 文件 找到 function ConvertNetToDelphiDataType(sTmpStr:String):String; 函数 ////原代码 if CompareText(sTmpStr,'decimal')=0 then begin Result:='fixed'; exit; end; ////修改后 if CompareText(sTmpStr,'decimal')=0 then begin Result:='i4'; exit; end; |
storylok
43165
|
2012/12/29 23:07:55 |
这个东西真的还是很好用的,但是就是我不会用 哈哈 www.coco18.com |
cwg1027
43164
|
2012/12/29 19:36:09 |
打扰下好人yihuas ORACLE的NUMBER数据类型转换有点问题,打印报 value of field “zpdbid”is out range错误对话框。是否要改一下delphi的.pas文件数据类型转换代码?请抽空看一下,谢谢! |
linkyang
43137
|
2012/12/22 18:52:20 |
多谢了,我也要写类似的, 看来我不用写了! |
yihuas
43120
|
2012/12/18 6:41:13 |
工作室是业余的,主要是上班了。 这个代码完全是 Delphi7 + FastReport 3 不需要改动应该是可以直接编译的. 没有其它的第三方控件. |
cwg1027
43118
|
2012/12/17 22:51:30 |
补充,请问是用delphi7+FastReport3.0 开发的吗? |
cwg1027
43117
|
2012/12/17 22:41:35 |
太谦虚了,已经做的很好了,内置在控件上不存在技术上的问题,只是多费些事而已了。 本人早几年做过客户端midas.dll,服务端用DELPHI做的数据库服务器三层结构的,现在用ASP.NET开发一直想用FASTREPORT做报表,也知道用XML交换数据,但一直没能实现,看了您的列子看来有点眉目了,谢谢。 本人是业余爱好,看来对DELPHI的深入研究还是太欠缺。 本人晚您两年在盒子注册,这是我看到的最好的,前几年也有人发了一个,但感觉没您这个强大。 这是您工作室吗?http://www.yhsee.com/index.php |
yihuas
43116
|
2012/12/17 19:08:28 |
我只是普通的开发人员而已高人可算不上,其实这个封装做的还不太好.窗体是直接弹出来的.应该内置在控件上才对. QQ:285455356 |
cwg1027
43115
|
2012/12/17 18:22:31 |
Asp.Net例子测试成功。在此感谢yihuas无私帮助!!! 本人也用过几年DELPHI,主要是数据库方面,也做过几个IE插件ocx。 但yihuas做的这个ocx 本人到现在还没完全看懂,深感惭愧。敢问高人yihuas是职业开发人员吗?能否继续打扰您这个OCX开发过程的详解? QQ 836896769 |
yihuas
43114
|
2012/12/17 15:39:43 |
**********Asp.Net 例子********** 文件:test.mdb 表创建语句 ---------- Create Table table1(id , HouseNumID Integer , damage VarChar(50), servicecontent Text , serviceman VarChar(50), CreateDate datetime) ---------- 测试数据自己加吧 |
yihuas
43113
|
2012/12/17 15:37:52 |
**********Asp.Net 例子********** 文件:Default.aspx.cs ---------- using System; using System.Configuration; using System.Data; using System.Data.OleDb; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page { private System.Data.DataSet myDataSet;
protected void Page_Load(object sender, EventArgs e) {
} protected void Button1_Click(object sender, EventArgs e) { try { //创建一个 OleDbConnection对象 string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = c:\\test.mdb ;Persist Security Info=False"; OleDbConnection myConn = new OleDbConnection(strCon); string strCom = "SELECT * FROM table1"; //创建一个 DataSet对象 myDataSet = new DataSet(); myConn.Open(); OleDbDataAdapter myCommand = new OleDbDataAdapter(strCom, myConn); myCommand.Fill(myDataSet, "table1");
System.IO.StringWriter strXml = new System.IO.StringWriter(); myDataSet.WriteXmlSchema(strXml); System.IO.StringWriter strValue = new System.IO.StringWriter(); myDataSet.WriteXml(strValue); TestSchema.Value = strXml.ToString(); TestData.Value = strValue.ToString();
myConn.Close(); } catch (Exception ex) { Response.Write("alert("+ex.Message+")"); }
} } |
cwg1027
43111
|
2012/12/17 12:34:23 |
高人yihuas,能否做一个asp.net(XML)为数据源的test.html例子。期待中。 |
cwg1027
43108
|
2012/12/16 0:28:16 |
感谢yihuas无私奉献。这种打印本人很感兴趣。机制和楚琳打印一样,但楚琳打印控件不提供源码。 能否给一个asp.net数据集生成的XML的 test.html文件例子不胜感谢!正在研究中..... |
cwg1027
43106
|
2012/12/15 14:27:08 |
谢谢!!! |
yihuas
43102
|
2012/12/12 18:44:36 |
这个他现支持的就是XML格式.只是控件内部转换的时候需要用到 midas.dll. 上面我写了一堆就是关于 activex 签名打包的过程,打包后的文件已经把 midas.dll已经包含进去了. |