I have created several crystal reports and I now wish to write a visual basic frontend to view the reports.
The reports import data using two sql queries from a single SQL database.
Here is the SQL code I have in VB at the moment.
Public Appn As CRAXDRT.Application
Public cReport As CRAXDRT.Report
Private Sub ShowReportBtn_Click()
Select Case ReportList.ListIndex
Case 0
Case 1
Case 2
Case 3
Case 4
Case 5
Set Appn = CreateObject("CrystalRunTime.Application"
Set cReport = Appn.OpenReport("C:\Documents and Settings\Robert\Desktop\Reports Main Page\Reports\Talk Statistics.rpt"
ReportViewFrm.CRViewer91.ReportSource = cReport
ReportViewFrm.CRViewer91.ViewReport
ReportViewFrm.CRViewer91.Zoom (90)
ReportMainFrm.Hide
ReportViewFrm.Show
Case 6
End Select
End Sub
What I need to do is logon to the SQL server so I can refresh the report data.
Could someone post what has to be declared and the syntax to logon to the SQL server.
The reports import data using two sql queries from a single SQL database.
Here is the SQL code I have in VB at the moment.
Public Appn As CRAXDRT.Application
Public cReport As CRAXDRT.Report
Private Sub ShowReportBtn_Click()
Select Case ReportList.ListIndex
Case 0
Case 1
Case 2
Case 3
Case 4
Case 5
Set Appn = CreateObject("CrystalRunTime.Application"
Set cReport = Appn.OpenReport("C:\Documents and Settings\Robert\Desktop\Reports Main Page\Reports\Talk Statistics.rpt"
ReportViewFrm.CRViewer91.ReportSource = cReport
ReportViewFrm.CRViewer91.ViewReport
ReportViewFrm.CRViewer91.Zoom (90)
ReportMainFrm.Hide
ReportViewFrm.Show
Case 6
End Select
End Sub
What I need to do is logon to the SQL server so I can refresh the report data.
Could someone post what has to be declared and the syntax to logon to the SQL server.