Inheritance: System.Windows.Forms.UserControl
        public DialogDatabase(RdlUserControl rDesigner)
        {
            _rUserControl = rDesigner;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            string[] items = RdlEngineConfig.GetProviders();
            cbOrientation.SelectedIndex = 0;
        }
Example #2
0
        static internal bool GetSharedConnectionInfo(RdlUserControl dsr, string filename, out string dataProvider, out string connectInfo)
        {
            dataProvider = null;
            connectInfo  = null;

            string pswd = null;
            string xml  = "";

            try
            {
                pswd = dsr.GetPassword();
                if (pswd == null)
                {
                    return(false);
                }
                if (!filename.EndsWith(".dsr", StringComparison.InvariantCultureIgnoreCase))
                {
                    filename += ".dsr";
                }

                xml = RDL.DataSourceReference.Retrieve(filename, pswd);
            }
            catch
            {
                MessageBox.Show(Strings.DesignerUtility_Show_SharedConnectionError, Strings.DesignerUtility_Show_TestConnection);
                dsr.ResetPassword();                    // make sure to prompt again for the password
                return(false);
            }
            XmlDocument xDoc = new XmlDocument();

            xDoc.LoadXml(xml);
            XmlNode xNodeLoop = xDoc.FirstChild;

            foreach (XmlNode node in xNodeLoop.ChildNodes)
            {
                switch (node.Name)
                {
                case "DataProvider":
                    dataProvider = node.InnerText;
                    break;

                case "ConnectString":
                    connectInfo = node.InnerText;
                    break;

                default:
                    break;
                }
            }
            return(true);
        }
        public DialogDatabase(RdlUserControl rDesigner)
        {
            _rUserControl = rDesigner;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            string[] items = RdlEngineConfig.GetProviders();
            cbConnectionTypes.Items.Add(SHARED_CONNECTION);
            cbConnectionTypes.Items.AddRange(items);
            cbConnectionTypes.SelectedIndex = 1;
            cbOrientation.SelectedIndex = 0;
        }