首页 > Web开发 > 详细

web应用程序传递连接字符串给FastReport数据源

时间:2016-01-25 19:31:55      阅读:762      评论:0      收藏:0      [点我收藏+]

public static FastReport.Report fr = new FastReport.Report();        

public static FastReport.EnvironmentSettings es = new EnvironmentSettings();        

protected void Page_Load(object sender, EventArgs e)

        {

        }

        protected void Button1_Click(object sender, EventArgs e)

        {

            string path = Server.MapPath(@"\fr\Demo\1.frx");

            if (System.IO.File.Exists(path) == true)

            {  

               fr.Load(path);

                es.DesignerSettings.ApplicationConnection = new System.Data.SqlClient.SqlConnection();                 es.DesignerSettings.ApplicationConnection.ConnectionString = System.Configuration.ConfigurationManager.AppSettings["DataConn"].ToString();                 //设置语言

                FastReport.Utils.Res.LocaleFolder = Server.MapPath(@"\Localization");

                FastReport.Utils.Res.LoadLocale(FastReport.Utils.Res.LocaleFolder + @"\Chinese (Simplified).frl");

                fr.Design();

                //fr.Show();             }         }

web应用程序传递连接字符串给FastReport数据源

原文:http://www.cnblogs.com/sayshap/p/5157994.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!