Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal Reports XI - Using the Default Database

Posted on 2006-03-20
23
Medium Priority
?
396 Views
Last Modified: 2012-05-05
This is an unusual one.

basically I have an application the connects to an SQL Server database,
the user can print off a number of reports against the data.

on all development pc's this works fine, but on 1 machine Crystal keeps trying to use the Default Database.

which is raising an error in the application as the stored procedure is not available in the default database.

any help on this is greatly appreciated.
0
Comment
Question by:MichealMcLoughlin
  • 11
  • 5
  • 4
  • +1
23 Comments
 
LVL 3

Expert Comment

by:Cootser
ID: 16235008
Hi
You could try this:

Database > Set Datasource location > Click the plus beside the table/view in the current data source area > 
Then click the Properties plus
Highlight the "Overridden Qualified Table Name" and press F2 (F2 allows you to edit the value for this), then press the End button on your keyboard and type the table name into this field.

Do this for all tables / views / sp.

I've had a few problems that sound a bit like yours and this has sorted it for me, but i must admit I dont know why or how.

HTH

Cootser
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16235150
I really appreciate the prompt Reply but unfortunately this hasn't had any effect

I have re-installed crystall XI on the Machine twice but it still gives the same error.


Magic
0
 
LVL 3

Assisted Solution

by:Cootser
Cootser earned 78 total points
ID: 16235724
Hi Michael,

Sorry but that's about the limit of my tiny amount of knowledge of CR.  I hope someone else can help you.

Best of luck

Cootser
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 16235789
Does the user of that PC have permissions to the correct database or the stored procedure?

mlmcc
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16236079
The user is logging onto windows as an Administrator,  and is connecting to the database with the sa user (the SP Owner)


0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16236085
Cootser - Thanks for your time & help
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 16236599
Have you tried changing the default database?

Do other reports cause trouble?

mlmcc
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16236689
Basically, all of our reports were  in Crystal 8.5 (Approx 200 - 250 reports)

Any report modified and saved with Crystal XI has caused issues on this PC.

The Default database is used by an accounts package that we integrate to therefore can't be changed, (but changing it would  ultimately fix the issue).


0
 
LVL 101

Expert Comment

by:mlmcc
ID: 16236806
When you upgraded the reports did you verify the database?  Did you change the databse drivers to reflect the CR XI upgrade?

Is CR8.5 still installed on the machine?

mlmcc
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16237196
Crystal 8.5, is installed on all machines along with Crystal XI but
(we need this to support older customers)
any report changed was verified
All necessary Drivers were changed in code


0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 150 total points
ID: 16239198
Don't know unless that machine is for some reason poicking up the wrong driver or a mismatch on dlls.

Any differences between machines?
  O/S?  Applications installed?

mlmcc
0
 
LVL 8

Expert Comment

by:dylanyee
ID: 16244426
MichealMcLoughlin, may I know how did you call up your report to display? it is via your own application? and what is your database connection type (OLEDB/ODBC etc)? If you call your report from your application, did you set the connection properly?

dylan
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16245550
Both Operating Systems are XP Professional  
Both Machines are exact sames specs

The Reports are Called from our Own application the Connection used is and ODBC connection.

The connection is definitely set properly we have approx 200 customer sites using the software without any problems
0
 
LVL 8

Expert Comment

by:dylanyee
ID: 16245658
>> All necessary Drivers were changed in code

MichealMcLoughlin, do you mind to show us your code on how you setup the connection to report? I suspect with CRXI, you have to set PC's Name to the report so that it could pick up the right connection.

dylan
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16246101
** Code from our CReport Object to logon to the server **

Public Function LogOnServer(ByVal ServerName As String, ByVal Database As String, Optional UId As String, Optional Pwd As String) As Boolean
    On Error GoTo ErrorHandle
    LogOnServer = False
    If Not IsMissing(UId) Then m_strUID = UId
    If Not IsMissing(Pwd) Then m_strPWD = Pwd
    m_strDatabase = Database
    m_strServerName = ServerName
    m_crystalApp.LogOnServer "pdssql.dll", ServerName, m_strDatabase, m_strUID, m_strPWD
    LogOnServer = True
    Exit Function
ErrorHandle:
    LogOnServer = False
    m_strLastError = Err.Description
    Exit Function
End Function
0
 
LVL 8

Expert Comment

by:dylanyee
ID: 16246756
MichealMcLoughlin, did you set the connection for each database object in your report (table/view/stored procedure)? In crystal report, other than setting up the connection for report, you will need to set connection info for each database object, or else they will reference to the old connection info. Below is my code in c#, please take a look and convert to VB, you may need to modify and merge it with you code, since you have your own "CReport" class. Just give it a try.

public void setConnection(string ServerName, string DatabaseName, string UserName, string Password)
{
     ConnectionInfo crConnectionInfo = new ConnectionInfo();

     crConnectionInfo.ServerName = ServerName;
     crConnectionInfo.DatabaseName = DatabaseName;
     crConnectionInfo.UserID = UserName;
     crConnectionInfo.Password = Password;

     CrystalDecisions.CrystalReports.Engine.Database crDatabase = rptDoc.Database;
     Tables crTables = crDatabase.Tables;

     foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
     {
          TableLogOnInfo crTableLogOnInfo = crTable.LogOnInfo;
          crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
          crTable.ApplyLogOnInfo(crTableLogOnInfo);
          crTable.Location = crTableLogOnInfo.TableName;
     }
}


dylan
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16247225
One of Our Modules is .Net and I carry out a similar process
can this method be implememented in VB6
0
 
LVL 8

Accepted Solution

by:
dylanyee earned 150 total points
ID: 16247348
certainly, I think this method is quite standard for all environment.

dylan
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16249496
Cheers Dylan

I've have a crack at it tonight and let you know how i got on tomorrow

magic
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16280695
After musch deliberation, i accidentally stumbled across the solution

The PC which was having the issue had a system dsn setup on it

with the same name as the Server

Crystal 11, was picking this up instead of the connection passed


Dylan + mlmcc thanks a million for all your help on this

Best Regards

Micheal (Magic)
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 16281314
That would be tough for us to figure out.

Glad to have helped

mlmcc
0
 
LVL 2

Author Comment

by:MichealMcLoughlin
ID: 16281897
Given I know the solution to the problem now, it would have been virtually impossible to figure it out remotely

Apologies for that.

cheers again

Micheal
0
 
LVL 3

Expert Comment

by:Cootser
ID: 16316160
Thanks Michael, glad u got there
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question