Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help!! PLEASE

Status
Not open for further replies.

jlucyk

IS-IT--Management
Aug 1, 2001
10
US
I am using crystal report 8.0 and VB 6.0 I created a report in crystal and it is hooked up with our sql server and it works fine from crystal. I opened VB and used the crystal reports 8 from the project menu and it asks for user name and password I put them both in and I checked allow saving password. It works first couple of times then stops and asks for password again. I compiled it into an exe file and now it says server has not yet been opened. Please let me know what I did wrong. This is from development PC not a client. The report works fine when it is opened from the file.

Please help me I am sinking here.

 
Try this in your vb code. may be put it in

Private sub cmdViewReport click()

CrystalReport1.Connect = "DSN = yourdsn;UID = sa;PWD = password;DSQ =DBname"
.....

End sub

hope this can help you

lucy
 
Thank you for the code but I am kind of new as VB. The code I have is the following:

Dim Report As New CrystalReport1

Option Explicit

Private Sub Form_Load()
Screen.MousePointer = vbHourglass
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

Where do I place your code in???

Thank you in advance.

John
 
Looks different. I use Crystalreport control. I have a button for clicking to view report. I put that code in the button_click.

Do you have data source called Report?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top