Groups | Blog | Home
all groups > dotnet performance > january 2004 >

dotnet performance : Crystal Reports Problem: Please reply ASAP


Mithun Verma
1/23/2004 9:20:26 AM
Hello All,
I have a Windows application that uses Crystal Reports 9 (bundled Version)
developed using VS.NET 2003 on a windows server 2003 m/c.
The application has to be deployed on the client machine that has Windows
XP installed. Before deploying we make sure that .NET framework 1.1 is
installed on the XP machine. In the setup project, for support for Crystal
Reports, we have added the following merge modules:
1)Crystal_Managed2003.msm
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm

The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to
figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a
problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.

Thanks in advance
Mithun

Nauzad Kapadia
1/25/2004 8:14:27 AM
hi,

This is not a problem, but indeed the way crystal report works.

When you create a crystal report that connects to a database, it does not
persist the password in the report itself. Therefore everytime u run the
report and the report tries to fetch the data from the database and in the
process asks you for the password.

The work around for this is to supply the password and any other database
connection parameters to crystal reports at runtime, just before you show
the report. Refer to the following code-snippet

Dim cr As New CrystalReport1()

Dim crConnInfo As New ConnectionInfo()

Dim tInfo As New TableLogOnInfo

crConnInfo.DatabaseName = "pubs"

crConnInfo.UserID = "sa"

crConnInfo.Password = "sa"

tInfo.ConnectionInfo = crConnInfo

cr.Database.Tables(0).ApplyLogOnInfo(tInfo)

Make sure to repeat the last line for every table u use in the report or
loop thru tables.count property.



Regards,

Nauzad Kapadia [MVP]




[quoted text, click to view]

Jurgen
1/26/2004 2:16:06 AM
You should install the latest service packs and hot fix from the CrystalDecisions
particularly to the version that you use

Create the installation project correctly

Check your CrystalViewer object pointing to the right version

Uninstall the program in the destination PC and the
reinstall with the new project with the latest servicepacks/hot fix of the Crystal Report

AddThis Social Bookmark Button