TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sai Ram
NA
237
116k
Crystal Reports Database Logon Failed
Nov 14 2012 11:58 AM
Hi...I am getting Database Logon Failed in Crystal Reports using MS Access DB..
My Code is as follows
Dim dt As New DataTable
Dim da As New OleDbDataAdapter
con = New OleDbConnection(clsConnection.GetConnectionString())
If con.State = ConnectionState.Closed Or con.State = ConnectionState.Broken Then
con.Open()
End If
da.Fill(dt)
If dt.Rows.Count <> 0 Then
Dim rpt As New ReportDocument()
Dim cwd As String = System.IO.Directory.GetCurrentDirectory()
If cwd.EndsWith("\bin\Debug") Then
cwd = cwd.Replace("\bin\Debug", "\Reports\Bill.rpt")
Else
cwd += "\Reports\Bill.rpt"
End If
rpt.Load(cwd)
Dim comp As String = rpt.GetComponentName()
rpt.SetDataSource(dt)
Dim sinfo As SummaryInfo = rpt.SummaryInfo
'sinfo.ReportTitle = sel_desc
Dim frm1 As New Form()
' label3.Text = ""
frm1.SetDesktopBounds(0, 0, 1024, 768)
Dim crystalReportViewer1 As New CrystalDecisions.Windows.Forms.CrystalReportViewer()
crystalReportViewer1.ShowGroupTreeButton = False
crystalReportViewer1.ReportSource = rpt
crystalReportViewer1.Dock = DockStyle.Fill
rpt.SetDatabaseLogon("Administrator", "nokia", "Saibaba", "C:\Users\Administrator\Desktop\MedicalApplication\MedicalApplication\bin\Debug\Medical.mdb")
crystalReportViewer1.Refresh()
crystalReportViewer1.PrintReport()
'frm1.Controls.Add(crystalReportViewer1)
'frm1.MaximumSize = New System.Drawing.Size(1600, 1000)
'frm1.Show()
'frm1.Text = "Bill Printing"
Else
MessageBox.Show("Records Are Empty!", "Medical Application")
End If
Reply
Answers (
0
)
how to create click event for textbox/table in Reportviewer control in Windows?
Dynamic column headers in Crystal Reports !!!!