hi i have following code in c# on button_click

ReportDocument cryRpt = new ReportDocument();
            TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
            TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
            ConnectionInfo crConnectionInfo = new ConnectionInfo();
            Tables CrTables ;

            cryRpt.Load(@"c:\users\shahaiali\documents\visual studio 2010\Projects\CrystalReportTesting\CrystalReport1.rpt");

            crConnectionInfo.ServerName = "ShaHaiAli-PC";
            crConnectionInfo.DatabaseName = "StudentInfo";
            crConnectionInfo.UserID = "user";
            crConnectionInfo.Password = "pass";

            CrTables = cryRpt.Database.Tables ;
            foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
                crtableLogoninfo = CrTable.LogOnInfo;
                crtableLogoninfo.ConnectionInfo = crConnectionInfo;
            crystalReportViewer1.ReportSource = cryRpt;

as from the above code i already have provide the security info but when i execute the program it again ask me for the log-in..any help is there???

Hey plz kind me tell abt making software programs

visual studio 2010, language c# and sql database

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.