Crystal Reports 7.0 (ODBC Connection)
I am using Crystal Reports and VB with Access as my database. I create a ODBC connection in the control panel and point to the ODBC connection when I created the report in the design mode. everything works fine until I go to another machine with the same ODBC connection but everything is sitting in a different path. For some reason the report loses the ODBC connection. and I have to open it back up and reset the connection.
I thought the purpose of the ODBC connection is to find the database no matter where it is located as long as the ODBC System DSN Name is the same as the one set in the crystal report. Please correct me if I am wrong. or am I suppose to set something up in the VB app?
If anyone has a fix for this I would greatly appreciate it.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
ODBC Connection To Data Reports
hi
i am using data reports in my project and i have used Microsoft jet oledb 4.0 provider for connection purpose, because i had to pass sting parameters to my reports.
is there any way i can use "microsoft oledb provider for odbc drivers" to connect to my data reports and can still pass string parameters. because when i try to connect thru odbc then i can only pass numeric parameters to my reports.
Haroon
Crystal Reports Using ODBC
I have a problem concerning Crystal report files created using ODBC. These reports don't print at the designated printer. I used to create reports using the Data File option and selecting an Access database from the local hard disk. Viewing and printing of reports were okay. But later, I noticed that this is inconvenient due to the fact that the database may be relocated somewhere else, and the reports won't simply find the new database location. So I recreated a report and tried using ODBC which in turn retrieve a database located in a server. In this way, it will be easier to change the database location in the Control Panel. In my office, viewing/printing is okay.
So at the customer site, I created an ODBC similar to the one I have in the office, point it to an Access database located at the server, and tried viewing/printing the same sample report. Viewing is okay. But when I tried printing, the sample report won't print. A printer icon appears in the status bar, but the report is not sent to it. What do you think can the problem be?
Crystal Reports ODBC Problem
I'm using Crystal Reports v4.6 and I'm using ODBC to connect to an Access database. Why is it that Crystal Reports doesn't automatically update the database location of the ODBC which it is using when you change that property in the Control Panel? My VB app immediately sees the change in the ODBC but my reports still display the contents of the database which the ODBC is previously accessing. When the Set Location command is chosen in the Crystal Reports, the database location doesn't change even if you already update the ODBC in the Control Panel. Why is this so?
ODBC Connectivity With SQL Server && Using Crystal Reports
Ok. Thank you. But after looking at what I'm trying to do, I think it's a little more complicated. I am trying to make an application toolbox. I want users to be able to click on a button from my app and that buttin will launch the Crystal 7 Report Designer. The servers we connect to are SQL Server Databases using ODBC connections. They connect to Terminal Servers to get to the databases. I have figured out how to get my app to launch the Crystal Report I want, but I don't know how to get it to pull the ODBC, open an ODBC, or somehow connect to the database I am trying to run the report against. Once again, it is a SQL server 7.0 database I am trying to connect to. There are over 100 databases we use, and all have different ODBC drivers setup (all SQL Server, but different names obviously) so it would be good if somehow either 1) the app could determine the user's ODBC, or 2) the user could be prompted for the ODBC.
I hope that makes sense as far as what I need.
Please HELP!!!
Crystal Reports - ODBC Error: Invalid Parameter Number
I am connecting to two backends. One backend is a ODBC data source and the second is a Access database on my local PC. When I run the report I get the error Invalid Parameter number. The only parameter fields I have are dates. In my odbc I am connecting to a date ime field and in the Access database the data shows as date only. I do not know if this is the cause or not?
I am using a Subreport (connects to Access database) and the ODBC connects on the Main report...
Any help is greatly appreciated!!!
Johnny
Changing ODBC Driver File Location @ Run Time (Crystal Reports)
I have two reports written in Crystal Reports version 8.0 that use the MS Text ODBC driver as their database. The formatting is appropriate and the reports work fine. However, I am on a mission from my boss to see if I can change the location of the text file on the fly. For example, if it is designed to point to H:Reports and I want to change it to C:Software on the driver, how would I do that? I've explored the Set Location option, but didn't find anything helpful. It appears that the change would have to be on the DSN.
Your assistance is greatly appreciated!
Sherri
Crystal Reports Connection
Hi,
I am generating my reports using crystal reports9, and VB6 as the interface for my program, and sql2000.
The problem I am facing is, each time you change the folder name, or trying to use the software on another computer,
You need to open each report ( previeosly created) using the crystal report and to point it AGAIN to the database location.
I am using the command from VB6 to run the report:
With CrystalReport1
CrystalReport1.ReportFileName = App.Path & "Reportsinvoice.rpt"
CrystalReport1.SelectionFormula = "{invoices.invoiceno} ='" & (Text1.Text) & "'"
CrystalReport1.RetrieveDataFiles
CrystalReport1.Action = 1
End With
Is there any way to make it work from anywhere, without pointing each report to the database location?
Thanks
Crystal Reports Oracle Connection
I'm having trouble connecting to my Oracle database. My Crystal Report (done in VB6.0) tries to connect to my Oracle database, but I get the error, "Logon failed, null password given". Where do I put the password? What is the connection string? Here is all I have so far<vb>CRViewer91.ReportSource = Report
CRViewer91.ViewReport<vb>Thanks for the help!
Crystal Reports 9.0 Connection Problem
Hi all
i designed reports in Crystal Reports 9.0 .
when i designing the the reports i have used one ODBC Connction.
when the reports calling from VB Application i have to change the Datasource Name.
how to do it?
Edited by - nagesh_v2k on 4/29/2004 1:39:21 AM
Crystal Reports Connection With Oracle 8.1.6
I am using oracle 8.1.6 , Crystal Reports 8.5 and VB 6.0 win 2000 in my home
I can't connect to the my db in oracle
I tried the file DSN through the crystal reports (when it ask for the DB and used Oracle odbs provider, also user MS odbc driver for oracle but no differance)
but it didnt show me the tables in my db the files it showed me are
1--- outln.ol$
2--- outln.ol$hints
and nothing else
(my db has over 30 tables)
and if the System DSN is used first ask for the service name, password & username in services name I ve provided the DSN name and left it blank but it give me error in any case
ODBC ERROR : [ORACLE][ODBC][ORA]: ORA 12154: TNS : COULD NOT RESOLVE SERVICE NAME.
I why creatred new DSN deleting the prevone but no use ......................
Where I am making the mistake.????????????
WHY ????????????????????????????
Edited by - haahoou on 1/16/2004 5:08:49 AM
JDBC Connection In Crystal Reports
Hi, I am new to Crystal Reports. I have a database in JDataStore and I want to generate a report using that particular Database. I connect to this Database using JDBC drivers. I was wondering if there is a way I can use JDBC drivers for connection with Crystal Reports. I know that Crystal Reports 9 has an option of creating Java Beans to use as a Crystal Report Data Source. By searching the web,I also found out that there are certain tools which enables Windows ODBC applications to access JDBC data sources by creating a ODBC-JDBC Gateway, but are these the only solutions? Cant I use my driver which is in the .jar files in the same way as I use the other .dll files for connecting the Database to Crystal Reports?
Crystal Reports - Change The Database Connection *RESOLVED*
Me thinks a not so simple question!
Hi,
In VB (.net) you can view your database connection, if you have connected using the wizard in the:
#Region " Windows Form Designer generated code "
and it looks a little something like this:
VB Code:
Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=ITsMe;Data Source=C:codewh" & _ "ateverMyDatabase.mdb;Mode=Share Deny None;Extended Properties="""";Jet " & _ "OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password=" & _ """"";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Pa" & _ "rtial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Pas" & _ "sword="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False" & _ ";Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica " & _ "Repair=False;Jet OLEDB:SFP=False"
This is very nice because I can easily change the Data Source= bit to make it equal whatever database I happen to be using, wherever it is.
Now when it comes to crystal reports, (my reports I have created using Crystal Report Wizard thingy, which I like) I setup where my database is to connect to in the wizard. This would be fine but my database location could change to anything at run time depending on what database the user selects and so I want to be able to change the database source programatically like I am with the database connection thing show above.
The problem is I can't!
I can't find anything like the Me.OleDbConnection1.ConnectionString =...... bit anywhere for the Crystal Report connection and I can't see how else to do it. Any Ideas?
If I connect my Crystal Reports to datasets (so in effect there is no direct databse connection), I get problems using multiple datasets, and a window asking for database username, passwords etc appears when i try to display my report. I really don't want to do it this way.
In the search for my answer I have worked through most threads on this forum and the Crystal Decision Support forums and found nothing of help and so am posting here cos the Crystal Decision Support forums threads hardly ever get replies and you Guys nearly always come up with the goods
Cheers
Passing Data To Crystal Reports From MySQL With ADODB Connection
I have created an application front end for a MySQL database where the user can create new quotes. I am opening the connection with an ADODB connection string and want to pass the information to my Crystal Report from the selected quote number. What is the best way to do this? Currently I keep finding information on the web where they use either an OLEDB connection or an SQL connection. Do I want to change the connection method of my whole app to one of these? Or what is the best way to keep the interaction between MySQL, my app, and Crystal Reports open and clean?
TIA
Greg Hicks
Closing Connection To Crystal Reports Opened Through Visual Basic
Dear Friends,
I am opening a connection to the database from Visual Basic for the Cyrstal report through the following command
Cr.Connect = "ODBC;DSN=HMS;UID=CARE;PWD=CARENT"
where Cr is an instance of the Crystal report object. How would you close this connection? We have a problem of the sessions (Oracle) some times. Do the connections close if the report is closed? Please reply
Change Change ODBC Connection To Call A Crystal Report From VB6 App
I have a DSN set to D_2002.MDB Access database. I have created a crystal report based off of this ODBC connection. In my VB6 APP, the user might want to run the report off another database D_2004.MDB. How do I change the ODBC connection to D_2004.MDB and run the report off D_2004.MDB.
Any help is appreciated!!!
Sudha
Make Connection Per ODBC (Connection + Command)
I try to connect my VB-programm by using an Environmentpage. I make (and test) a connection by ODBC. The connection is succesfull.
After that I make a connection to a table, by using a command.
From this command I put some fields on my Form.
When I start my programm, after putting the fields on my form, I get the following message;
'Unable to bind to field or datamember ; .....'
When I make the same connection in MS-Access, it succeed....
How can this happen and how can I solve my little problem????
Data Reports Active Reports Or Crystal Reports
Hi all
I am really stuck here and i need help urgently
I have to call three tables in a row to print a single invoice entry
noe the problem is if the do it by calling single tables then there is a problem that it is nopt going to print the last order which is filled.Is there is any way it can be done through using sql command or something.
Secondly if i use max order in sql then i would not be in a position to print order after searching for it
Thanx
ODBC Connection
I was told that I could use the Data Source ODBC connection to connect my vb program to an access database which is stored at this address...
www.dapaine.com/consultation.mdb
How can I connect this? and what code to i use when connecting? thanks a lot!
ODBC Asking For The Connection ...
I've set up an ODBC connection (using the Wizard) and linked to SQL Servor tables at a different site.
I can open the tables with no problem but when I try to write queries, a diaglog box (standard MS, not related to the SQL Site) pops up asking for the source of the data. The data source is displayed and all I have to do is click the data name and everything works.
Unfortunately, I don't want to have to click the data source each time ... kinda defeats the purpose of having a macro.
What am I doing wrong, or (more likely) what HAVEN'T I done?
ODBC Connection
I need help with creating an ODBC connection from VB to MS Access 2003. Can anyone please point me in the right direction. I've seen bits and pieces of code but I would like to see the whole picture. Thank you in advance.
Set Up ODBC Connection
IN access97 (or VB5) how do I create a connection to an ODBC???
Bascially I need to set up a connection to a DB on a sql server...then verify the name.
Our server will default to a certain DB if you try to connect to a non-existant DB.
thanks!
ODBC Connection
Hi,
I'm connecting with a dial-up from a PC with Win98 SE to a some kind of an "access point" PC which is accepting an incoming connections. I want to make an ODBC connection to a SQL Server which resides on a same network with an "access point" PC. But, allways I get an error creating an ODBC as follows:
Connection Failed
SQL State:'HTY00'
SQL Server Error:0
[Microsoft][ODBC SQL Server Driver] Timeout expired
When I try to do the same thing from a PC running Win ME or higher there is no problem. What is the problem with the Win98 SE connections? Please help.
Nikola
P.S. After establishing of the dial-up connection I can ping an "access point" PC and also a SQL Server PC.
ODBC Connection
Hi
I want to know how to set up an ODBC connection in VB
All my setup in the Data Source Administrator are done..
but How I code this??
an ODBC newbie who wants help.... thanks
NDS ODBC Connection
I just got the Netware NDS ODBC connection configured and am beginning to muck around with it. The problem that I see with it is that is pulls sooooo much data and is hard to get exactly what you want. Does anyone know a lot abou this, if so can you give me some tips and tricks on it.....thanks!
Brian
ODBC Connection Using VB 6.0
Does anyone know of a way to use VB 6.0 to first detect if a certain ODBC connection is on the machine where the app is running, and if it does not have the ODBC connection, create one for the user to use. Any help would be appreciated.
ODBC Connection
Hi friends,
In my VB application I am using "Microsoft Jet Database engine" fordatabase connectivity. Can you please give me sample code andpre-requisition to connect through ODBC ?
Thank you very much in advance.
Tushar.
Crimp Circuits Inc.
ODBC Connection
Can anyone give an example on how I would connect to ODBC using VB?
Also anyone have a clue why the following line
Dim db as database
gives me this error?
'User-defined type not defined'
thanks
ADO Odbc Connection
Pleas look at the code and tell me what i have done wrong.
Cant get ir to connect to the ODBC database.
It wont work unless I install VB6 on the computer.
Short message due to problems posting.
/dkmart **********Who is General Failure, and why is he reading my disk?**********
http://www.pulare.se/Link/Kit145.zip
DAO ODBC Connection
Can anyone tell me how to create a DAO ODBC connection to a MS SQL server?
I can do an ADO connection like so:
Dim conn As adodb.Connection conn.ConnectionString = "driver={SQL SERVER};Server=Williamtell;DATABASE=" & sqldb & ";uid=accpac;pwd=accpac;"
conn.Open
I'm wondering what the DAO equivalent is? Also the reason I want to switch types is because when I run a record count on my ADO connection I get a record count as -1. Even if records are found it still gives me that count. Does anyone know why?
Thanks
ODBC Connection
I would like to know if there is a way where one can establish a ODBC connection programmatically. Even though I create a connection as below,
Public Connect As New ADODB.Connection
Set Connect = New ADODB.Connection
Dim sConnString As String
'Connnects to the database
sConnString = "Provider=MSDASQL; Data Source=;" & _
"User Id=;Password=;
Connect.CursorLocation = adUseServer
Connect.Open sConnString
when I install the appliction in different machines, I have to manually establish a ODBC connection going to Control Panel>Administrative Tools> Data Sources > System DSN, adding a new DataSource.
Can this be done through codes?
Odbc Connection
Hi guys its. Hope some one can help me with this problem.. Can i connec to the database without mapping the serve where my database is located using an ODBC Connection? I'm only using MS Acess 2000 as my database. Here is my sample code on Data connection?
Public db As Connection
Public rs As Recordset
Public Sub dbconnect()
If db Is Nothing Then
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=X:cmo_db.mdb;Persist Security Info=False"
End If
End Sub
Public Sub rsGlobal(str As String)
On Error GoTo err:
If rs Is Nothing Then
Set rs = New Recordset
Else
If rs.State = adStateOpen Then rs.Close
End If
'now open a new one
rs.Open str, db, adOpenDynamic, adLockOptimistic
Exit Sub
err:
MsgBox "SQL STATEMENT IS NOT CORRECT, PLEASE CHECK YOUR SYNTAX!", vbInformation, "SYSTEM MESSAGE"
End Sub
ODBC Connection
Iam trying to connect from VB to Oracle8.i using Microsoft ODBC Driver for Oracle.
What are the pre-requisites for connecting without DSN with ADO or RDO?
I have Oracle Server at my local machine , do i need to have Oracle Client installed also.Please elaborate.
ODBC Connection
HI
Can anybody help me with some code on the ODBC Data Source Administration. How can my program look up if a file is already added to the USER DSN, and if not Add my Access.mdb file to the USER DATA SOURCE.
Thanx
Ivan
ODBC Connection !!
Hi friends,
I have 2 questions .
1. If Oracle (server installation ) is on
the server and its client is on another,
Can we create DSN connection for oracle db
in any other m/c (which is in LAN) which does not hv either ORACLE serverclient ?
And regarding Provider also ?
2. Wht abt SQL server?
ODBC Connection
I am using a MMI (Wonderware) Program to stuff data into a MS Acess DB Via an ODBC Connection. The MMI allows me to create new tables in the DB but does not allow me to create new DB's. I would like 1 table for each day of the week and a DB file for each week in the year. 52 DB files with 7 tables each.
The problem is that the MMI package does not allow me to create the new ODBC connection (needed for the next weeks DB file), Is there a way to create the new and delete the old ODBC connections Via VB command button.
The other option is to set up a DDE conversation between the MMI & the VB App to get the data in the DB for reporting. Any thought as to why this might be better / worse ??
Thanks
LJ
ODBC Connection
Hi
I want to know how to set up an ODBC connection in VB
All my setup in the Data Source Administrator are done..
but How I code this??
an ODBC newbie who wants help.... thanks
Make it with rocker style w/
DSN Less ODBC Connection
I'm working on a project that is still in the testing phase and will be moved around from server to server a little. Also the DB will change from Access to SQL Server. I need to execute a mail merge through code on a Word document. One of the methods for the MailMerge object is OpenDataSource which requires a ODBC connection string. My question is...
1)Is there any way to write a connection string that doesn't reference a DSN and still have it work ( I haven't been able to get it to work without actually creating and using a DSN ) or am I getting confused with OLEDB and wasting my time?
Here's an example of what I've been using...
"DBQ=" & Application("DBPath")& "Training.mdb;DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"
ODBC Connection
I need to know where is the error in following code for MS ACCESS connection through ODBC. Can I have the corrected code ?
private Sub Form_Load()
Dim PrivDb as Database
set PrivDb = OpenDatabase("", false, false, "ODBC;DSN=Hospital;UID=xxx;Pwd=xxx;")
End Sub
ODBC setting :
ODBC Driver = Microsoft Access Driver (*.mdb)
DSN = Hospital
Database = C:Hospital
UID = xxx
PWD = xxx
Note : The above code is working if i change the driver to Sql Server
Thanks.
In Crystal Reports, How To Display Financial Reports (P & L, Balance Sheet Etc.) In Columnar Format
Dear All,
I am developing a Financial application using VB6, MS-Access & Crystal Reports 8.5. I am facing problems in certain reports. Some of the reports like Profit & Loss and Balance Sheet require the output to be printed in columnar format.
I have tried giving subreports for each section, i.e.; Assets & Liabilities, but then, the output is not coming in order as per the groups. The problem is even more where there are sub-sections in the right side column & left side column for example in Profit & Loss, where there are sub-sections for Gross Profit/Loss and Net Profit/Loss. In such cases, how to bring the total amount fields at the same horizontal level.
I hope someone can help me how to do the above.
Thanks in advance.
Best Regards
Mahesh
Odbc Connection Failed
i run a certain application developed in access 97 and i converted it to access 2000.
my problem comes in whenever i try to select information into a combo of which its recordsource is a pass through query in access and a stored procedure in ms sql 2000.
whenever i try to select info into this combo i am always get this error
ODBC Connection (server name) failed
what could be the probable solution to my persistent problem
please help me
grant
Create ODBC Connection
Hi y'all,
I'm making a program in vb6 and SQL Server.
I've made a connectionstring with odbc.
Now I want to make a system dsn with visual basic 6. How can I do that?
Allready thnx
Help With Oracle ODBC Connection
I have a MS ACCESS/VB6 frontend with Oracle backend. It's not a project - just linked tables with modules. (It used to be just an Access application)
I've created a successful ODBC connection programmatically using UID and PWD information from a login form I created. The problem I have is that when I try to access a data form from a "Main Menu" displayed after successful connection, an Oracle8 ODBC Login pops up and wants me to log in again. I only want one login at the beginning.
How can I do that? I've been searching through forums and code for days and they all look alike now. This is my first attempt at ODBC ....
Dim strConnect As String
Dim strUserName As String
Dim strPassword As String
Dim cn As ADODB.Connection
strConnect = "UID = " & strUserName & ";" & "PWD = " & strPassword & ";" & "DRIVER={Microsoft ODBC for Oracle};" _
& "SERVER = STRDB.nswc.navy.mil;"
Set cn = New ADODB.Connection
With cn
.ConnectionString = strConnect
.CursorLocation = adUseClient
.Open
End With
Odbc Connection Problem
I am having problems from a particular client machine opening an particular Access database (db1) that has tables linked to SQL server
The error is get is listed below:
I get Connection failed:
SQLState: 'S1000'
SQL Server Error: 126
[Microsoft][ODBC SQL Server Driver] Unable to load communication module. Driver has not been correctly installed.
Connection failed:
SQLState: '08001'
SQL Server Error: 0
[Microsoft][ODBC SQL Server Driver]Client unable to establish connection
I am able test the data source successfully in ODBC Data Source Administrator from that client machine.
I can also open another database (db2) from that same client machine and access is able to connect successfully.
It is only db1 that keeps getting this error.
One thing that was interesting is that if I open up db2.mdb first (which always opens successfully), close out and reopen db1.mdb I am able to connect successfully. Anytime I try opening db1.mdb first, I get the same error.
I was thinking that maybe the client machine needs the latest SQL server driver .... but I don't know if this is the problem.
Even trying to find the driver and install it is a problem:
I tried copying the latest driver from a client machine that works.
SQLSRV32.dll but I quickly found this method does not work.
I was able to find SQLServer SP2 .... but I don't know how to install just the drivers .... it seems you need some other software installed before you can run setup.exe
Any help would be much appreciated!
Lorin
ODBC Connection Error
Hello,
I'm using ODBC to connect my VB6 application to a MS SQL database.
I have created a new System DSN and it works well.
The code is OK but the connection doesn't work. the message is: "Cannot open database requested in login "....". Login fails.
Could you help me?
Thanks
Sylvain
Setting Up ODBC Connection
Hello,
I need to be able to have my APP set up a ODBC connection if one is not there. I need to set up a FILE DSN session, I can do this manually but how do I tell the program to do it?
How Do I Set Up An ODBC Connection To Two Servers
I have no problem setting up the ODBC connection to one server but I want it so if one server fails the program will automatically connect to the other server and continue. Anyone have any ideas on how to do this? I was told all I had to do was to set the Database part of the connection string equal to 'computer1name:dbname, computer2name:dbname'. Does anyone know if there is a problem with this? thanks for the help
|