|
-
Feb 4th, 2007, 08:10 PM
#1
Thread Starter
Member
problem with report
sir,pls help me i have problem in my program when i click the print to generate a report i have an error message that say, "Logon failed. Details: IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". Im using MySQL ODBC 3.51 Driver, and I'm using crystal report 10. Hope you can help me urgent pls.
-
Feb 5th, 2007, 12:06 AM
#2
Re: problem with report
mySQL has it's own driver. Why are you using a MS driver? They don't make an mySQL driver.
-
Feb 5th, 2007, 12:20 AM
#3
Thread Starter
Member
Re: problem with report
this is my code when i click the Print
Code:
Private Sub mnu_RoomInv_Click()
frmReport.Caption = ViewReport(frmReport.CRViewer1, App.Path & "/reports/room_inventory.rpt", Screen.Width, Screen.Height, mdiMain.mnu_RoomInv.Caption)
End Sub
Function ViewReport(CRViewer As CrystalActiveXReportViewer, _
sFilename As String, _
lngWidth As Long, lngHeight As Long, _
Optional sFormTitle As String = "Report Viewer", _
Optional bGroupTree As Boolean = False) As String
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Dim x As Long
Set Report = Appl.OpenReport(sFilename)
CRViewer.Width = lngWidth
CRViewer.Height = lngHeight - 1000
With Report
.DiscardSavedData
.EnableParameterPrompting = True
End With
CRViewer.ReportSource = Report
CRViewer.ViewReport
ViewReport = StrConv(Trim(sFormTitle), vbProperCase)
Set Report = Nothing
Set Appl = Nothing
End Function
Hope you can help me...thanks
-
Feb 5th, 2007, 12:25 AM
#4
Re: problem with report
The code you posted has nothing to do with the connection string that you probably included in the report connection. You need to change that.
-
Feb 5th, 2007, 12:32 AM
#5
Thread Starter
Member
Re: problem with report
sir can you give me a sample for connecting the report
-
Feb 5th, 2007, 12:36 AM
#6
Re: problem with report
I don't use the controls of CR to do reports. I use the ADO passing og recordsets that I have already taken from the database. But youvwill need to go in the designer and make a connection to your database then test the connection. After that your report should workvas planned.
-
Feb 5th, 2007, 02:49 AM
#7
Thread Starter
Member
Re: problem with report
sir, Im using CrystalActiveXReport can you give me an example. thanks
-
Feb 5th, 2007, 07:11 AM
#8
Re: problem with report
Moved to reporting section
-
Feb 5th, 2007, 08:11 PM
#9
Thread Starter
Member
Re: problem with report
Is there a way to connect MySQL ODBC 3.51 Driver in Crystal Report X. can you give me a sample of code to connect that. hope you can help me thanks....
-
Feb 6th, 2007, 12:52 AM
#10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|