Crystal report?
-
Hi i am new to Crystal report. I search google example and create a Report. But at execution it ask Login information each time. I had a VB code for solution. Dim ConnInfo As New ConnectionInfo With ConnInfo .ServerName = ".sqlexpress" .DatabaseName = "Northwind" .UserID = "sa" .Password = "eXpress2005" End With For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo cnInfo.ConnectionInfo = ConnInfo Next End Sub Can anyone tell the C# code to achieve this?
-
Hi i am new to Crystal report. I search google example and create a Report. But at execution it ask Login information each time. I had a VB code for solution. Dim ConnInfo As New ConnectionInfo With ConnInfo .ServerName = ".sqlexpress" .DatabaseName = "Northwind" .UserID = "sa" .Password = "eXpress2005" End With For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo cnInfo.ConnectionInfo = ConnInfo Next End Sub Can anyone tell the C# code to achieve this?
HI Karthik, You can use this code for refrence to display crystal report. sql= ""; DataSet ds = new DataSet(); OleDbDataAdapter AdpNew = new OleDbDataAdapter(sql,Conn); AdpNew.Fill(ds); Rpt ReportObject = new Rpt(); ReportObject.SetDataSource(ObjectName.Tables[0]); ReportViewerName.Height = this.Height; ReportViewerName.Width = this.Width; ReportViewerName.ReportSource = ReportObject;