Link to home
Start Free TrialLog in
Avatar of tribander
tribander

asked on

How to Stop Crystal Report Login Prompt when the Application Is Deployed to a User's desktop?

I have an application written in VB.Net 2003 that uses version 9.1 of Crystal Reports that is bundled with VS.Net 2003.  The app creates a dataset from a SQL database table with: (SELECT * FROM customer_table) for the SQL query.  The dataset is then passed to the form that contains the Crystal Report viewer control. The code is:

Dim m_Report As New Report_Inv   '(Report_Inv is the xml report description.)
m_Report.SetDataSource(m_ds)
crInventoryViewer.ReportSource = m_Report

MSDE is used for the SQL database access support.  When this application is run on the development PC everything works great.  When run on another PC with MSDE and SQL database configured exactly the same; a login prompt appears every time the Crystal report within the application is attempted to be viewed.  The login credentials can be filled in just like they were for the dataset connection string and the login will fail.  Thus you can't view any data at all!

What is so disturbing is that the data has already been accessed through the dataset; Crystal doesn't even need to open the SQL DB or be concerned with it at all.  It just needs to dispaly the data that was passed to it from the dataset!  Yet it wants a login to the database table?  By the way, when data is accessed from the same data source in other places in the program without any Crystal Reports support it works fine.

When the VB.Net app deployment package was created the Crystal Report the Crystal_Database_Access2003.msm, Crystal_Database_Access2003_enu.msm and CrystalregwizAccess2003.msm is included in the setup package the way Crystal Reports is supposed to be deployed along with a VB.Net application.  Any ideas what might be the problem or a place to start looking ?

Thanks experts!
Avatar of Mike McCracken
Mike McCracken

Actually Crystal does need to login because it checks the database and the tables it was built against before it even tries to build the report or use the data you passed to it.

Is the databsae perhaps in a different location, ie the drive isn't mapped the same, etc?

mlmcc
Avatar of tribander

ASKER

Actually MSDE is set-up the same on both the development PC and the user's PC.  Both are local default SQL servers referenced by the name of the PC. One DELL2350R the other INKSYS_IPI.  The same VB app is running locally on both machines accessing it's own local copy of the SQL DB.

Other than the PC names, the program, the MSDE set-up and the databases are identical.  SQL server is transaction based and not file based so no drive letters are involved; only unique names or ip addresses are used to connect to the DB.  As I pointed out, the program has no problems accessing the data on either PC, only Crystal Reports is having a problem on the PC named INKSYS_IPI.

Both databases where generated using the same script file in exactly the same way: osql -E -i inventory.sql.  Both instances of SQL server were created exactly alike using:
setup SECURITYMODE=SQL SAPWD=123xyz

Thanks for pointing out that Crystal needs access to the database; I didn't know this but it makes sense now.  I'm open to other ideas.  

ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial