473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Trouble with Crystal Reports (embedded) accessing DB

I have installed a custom VB.Net app on a client's PC. It works fine except for Crystal Reports (surprise). Crystal refuses to connect to the database despite the fact that I specifically point it to the DB. Below is the code used to do this. The appropriate values are passed as global variables (and I have verified that they are the correct values). If anyone can tell me what I an doing wrong, please help!

'Changes the location of the database
Private Function GetTableLogOnInfo(ByRef rpt As CrystalDecisions.CrystalReports.Engine.ReportDocum ent) As Boolean
Dim myDbConn As New CrystalDecisions.Shared.ConnectionInfo()

With myDbConn
.ServerName = gstrCrystalDBServer
.DatabaseName = gstrCrystalDBDatabaseName
.UserID = gstrCrystalDBUserID
.Password = gstrCrystalDBPassword
End With

Dim myTableLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
myTableLogonInfo = rpt.Database.Tables(0).LogOnInfo
myTableLogonInfo.ConnectionInfo = myDbConn
rpt.Database.Tables(0).ApplyLogOnInfo(myTableLogon Info)

Dim blnConnectionStatus As Boolean = rpt.Database.Tables(0).TestConnectivity()
If blnConnectionStatus Then
MessageBox.Show("Connection to database was successful!", "Crystal Reports DB Connection test", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return True
Else
MessageBox.Show("Connection to database FAILED!", "Crystal Reports DB Connection test", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Return False
End If
End Function
Jul 21 '05 #1
0 1124

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Lamey | last post by:
I'm hoping someone can help me here because I am at my wits end... I had an executable that was using a crystal reports ocx but now I am trying to rebuild this as a ASP.NET WebApp. Problem is...
0
by: Danny J. Lesandrini | last post by:
First, this is _not_ a question about how to get Crystal Reports to run on a client machine. I've got all the merge modules added to the project and it's working fine. The question is about...
4
by: Wendy Elizabeth | last post by:
I would like to know how to print a crystal report that was generated in the ..NET framework using a Visual Basic.NET web application and/or a Visual basic.NET windows application. When crystal...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
1
by: Lars Netzel | last post by:
I'm asking here since I hardly ever get answers on CR questions in the CR NewGroup. Although this question is also posted there. I have a working solution with Crystal Reports but the reports are...
0
by: dotnetprogrammer | last post by:
I have installed a custom VB.Net app on a client's PC. It works fine except for Crystal Reports (surprise). Crystal refuses to connect to the database despite the fact that I specifically point it to...
3
by: Noble Bell | last post by:
Here is what is going on: 1) I create a Crystal embedded report (Windows Forms Application) and I follow all the help to the letter on how to do this. 2) On my development machine every thing...
2
by: matt | last post by:
hello, i have an .RPT file that i am using to load a report via the ASP.NET CrystalReportViewer control. i dont include my .RPTs as embedded resources...instead i load the absolute path of the...
3
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.