Beispiel #1
0
 /// <exclude/>
 public void OnCredentialsPrompt(Rdl.Runtime.CredentialsPromptEventArgs args)
 {
     if (CredentialsPrompt != null)
     {
         CredentialsPrompt(this, args);
     }
 }
Beispiel #2
0
        public System.Data.Common.DbConnection Connect(Rdl.Runtime.Context context)
        {
            if (_connectionProperties.DataProvider == "SQL")
            {
                _sqlConn = new System.Data.SqlClient.SqlConnection();
                _sqlConn.ConnectionString = _connectionProperties.ConnectString(context);
                if (_connectionProperties.IntegratedSecurity)
                {
                    _sqlConn.ConnectionString += ";Trusted_Connection=true;";
                }
                if (_connectionProperties.Promt != null && _connectionProperties.Promt != String.Empty)
                {
                    Rdl.Runtime.CredentialsPromptEventArgs args = new Rdl.Runtime.CredentialsPromptEventArgs();
                    args.Prompt = _connectionProperties.Promt;
                    Report.OnCredentialsPrompt(args);

                    _sqlConn.ConnectionString += ";User ID=" + args.UserID + ";Password=" + args.Password;
                }
                _sqlConn.Open();

                if (_transaction)
                {
                    _sqlTran = _sqlConn.BeginTransaction();
                }
            }
            return(null);
        }
Beispiel #3
0
 void _subReport_CredentialsPrompt(object sender, Rdl.Runtime.CredentialsPromptEventArgs args)
 {
     Report.OnCredentialsPrompt(args);
 }