码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2016-01-25 19:35:01      阅读:345      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!