没有用过,应该第三方会有sample吧
解决方案 »
- 部门级别
- 创建Web网站出现问题
- C#正则表达式解析标签
- 关于下载文件压缩的问题
- server2003 w3wp.exe占用带宽过高
- try {}catch{}如何捕捉“ UNIQUE KEY 约束 不能插入重复键”的错误??
- 遇到困难:上传文件后,如何把相应的文件名放到数据库字段中...
- 读数据库字符限定问题?急用~~~
- 求教DataGrid中列排序和header部分固定的问题
- GZIPSTREAM碰到错误,一直解决不了
- 页面上textbox像label一样显示效果,怎么设置??
- 我想对我的项目里的每一页都验证用户是否登录了,该怎么验证?还要像以前asp那样每一页里都验证session吗?在asp.net里有没有更好的方法
public string Svg="";
public string Firs="";
public string Fill="";
private void Page_Load(object sender, System.EventArgs e)
{
// System.Reflection.Assembly a = System.Reflection.Assembly.GetAssembly(typeof(Form1));
// System.IO.FileInfo fi = new System.IO.FileInfo(ystem.Configuration.ConfigurationSettings.AppSettings["ReportPaht"]);
string sss=System.Configuration.ConfigurationSettings.AppSettings["ReportPaht"];
System.IO.DirectoryInfo Dir=new System.IO.DirectoryInfo(sss);
System.IO.FileInfo[] Files= Dir.GetFiles() ;
for (int i=0;i<Files.GetLength(0);i++)
{
if (Files[i].Name.IndexOf(".rpt")>0)
{
if (this.Files=="")
{
this.Firs=Files[i].Name.Substring(0,Files[i].Name.IndexOf("."));
}
this.Files=this.Files+@"[<a href=""Default.aspx?FileName="+Files[i].Name.Substring(0,Files[i].Name.IndexOf("."))+@""">";
this.Files=this.Files+Files[i].Name.Substring(0,Files[i].Name.IndexOf("."))+@"</a>]";
}
} if (Request["Filename"]==null)
{
EastReport.Report report = new EastReport.Report();
System.Xml.XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load(sss+this.Firs+".rpt") ;
report.Load(xmlDoc);
if (report.Pages.Count>0)
this.Svg=@"<div align=""center""><embed width="""+report.Pages[0].Width.ToString()+@""" height="""+report.Pages[0].Height.ToString()+@""" src=""svg.aspx?Filename="+this.Firs+@""" type=""image/svg+xml"" align=""top""></div>";
Fill=this.Firs; }
else
{
EastReport.Report report = new EastReport.Report();
System.Xml.XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load(sss+Request["Filename"]+".rpt") ;
report.Load(xmlDoc);
if (report.Pages.Count>0)
this.Svg=@"<div align=""center""><embed width="""+report.Pages[0].Width.ToString()+@""" height="""+report.Pages[0].Height.ToString()+@""" src=""svg.aspx?Filename="+Request["Filename"]+@""" type=""image/svg+xml"" align=""top""></div>";
this.Fill=Request["Filename"];
}
}