|
-
Feb 3rd, 2004, 07:53 AM
#1
Thread Starter
Giants World Champs!!!!
CR Logging into SQL Server **Resolved**
I created a simple CR 8.5 report for my application. When I was setting up the report I typed in the user name and password for a database in SQL Server. But when I run the program I receive messages that tell me that I am not logged into the server. Here is the code from form1:
VB Code:
Dim Report As New CrystalReport1
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
What do need to add to my code inorder to log into the server so that I can display my report?
Thanks
Last edited by Mark Gambo; Feb 4th, 2004 at 07:27 PM.
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Feb 3rd, 2004, 01:14 PM
#2
Thread Starter
Giants World Champs!!!!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Feb 3rd, 2004, 07:18 PM
#3
Doesn't the CrystalReport1 object contain Username and Password properties?
-
Feb 3rd, 2004, 07:29 PM
#4
Thread Starter
Giants World Champs!!!!
Bruce,
Thanks for the reply, but I was not able to find a UserName nor a Password Properties. What would the format of the property be?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Feb 3rd, 2004, 08:15 PM
#5
What is CrystalReport1? Is it not the Crystal OCX? What about a Connection property.
-
Feb 4th, 2004, 07:27 PM
#6
Thread Starter
Giants World Champs!!!!
Bruce,
I figured it out and here it is:
VB Code:
Report.Database.Tables(1).SetLogOnInfo <Server Name>, <Database Name>, <User Name>, <Password>
Thanks for your help
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
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
|