实际上你是调用IE浏览器的打印功能,而IE的打印接口是有返回值的!
解决方案 »
- 控件操作大量的时候界面冰死问题
- 关于c#调用excel事件,为何给事件添加代码之后,只能响应前几次的事件?
- 在gridview控件里删除最后条记录时出现错误,不是最后条记录没问题!!!急!!!
- 正则中的“不等于”怎么写???!!!???
- 请问PB能否使用C#写的DLL或者COM组件
- 我嵌的一段js怎么调也不行郁闷,请朋友们指点一下
- 关于一个简单的问题?label1
- 急!哪有 .net 的组件下载啊?
- 怎么样才能把返回的object类型转化成int类型阿?
- 那位数学家给我介绍一下哈希算法,哈希表等等。。。。
- 国外有没有像CSDN.NET这样的好网站,最好有论坛(可以标出来么)
- 多功能搜索控件(WebSearch)开发成功!欢迎下载!来者有分!
或着打印WEB窗体
将数据导入EXCEL,PDF代码如下:
SqlConnection sqlconn=new SqlConnection(_server_username_password)
if(sqlconn.State.ToString()!="Open")sqlconn.Open();
DataSet set1=new DataSet();
string selecomm="select * from xsfxph“
SqlDataAdapter reader=new SqlDataAdapter(selecomm,sqlconn);
reader.Fill(set1,"xsfxph");
report111Report1 myReport=new report111Report1();
myReport.SetDataSource(set1);
crystalDecisions.Shared.DiskFileDestinationOptions files = new CrystalDecisions.Shared.DiskFileDestinationOptions();
myReport.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
myReport.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel;//输出文件格式选择
files.DiskFileName = "c:\\output1.xls";
myReport.ExportOptions.DestinationOptions = files;
try
{
myReport.Export();
}
catch
{}
myReport.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;;//输出文件格式选择
files.DiskFileName = "c:\\output1.pdf";
myReport.Export();
if(sqlconn.State.ToString()=="Open")
sqlconn.Close();