1 Replies - 3754 Views - Last Post: 18 June 2009 - 10:04 PM Rate Topic: -----

#1 Motoguzzi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-June 09

Running Crystal Report 8.5 onto SQL 2005 in VB6

Posted 18 June 2009 - 05:55 AM

I have an application on VB6 and my reports are done is Crystal report 8.5 When I call the reports querying on an Access database (MDB) the reports run perfectly using an ODBC. But when I create another ODBC to connect to SQL Server 2005 database and call the reports in the same manner the process takes me throu to parameter prompt and then the report fails to run with an error message saying "Server has not been openned" . However the same reports run from within Crystal report the reports are running fine. Where do I have to insert what code to open the server? Below is my code.

Edgar.
---------------------------
Dim Report As New MAX0001

Private Sub Form_Load()
Report.DiscardSavedData
Screen.MousePointer = vbHourglass
Report.Database.LogOnServer ("PDSODBC.DLL", "repmax", "maximo", "sa", "sa","sql server",dbconn)
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub

---------------------------------



Mod Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: Running Crystal Report 8.5 onto SQL 2005 in VB6

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Running Crystal Report 8.5 onto SQL 2005 in VB6

Posted 18 June 2009 - 10:04 PM

It actually may be solved by altering the ODBC DSN. Use the dialog to look at the properties of the first one that works and write down all the information. Then look at the second one you created and see what is missing.

Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1