Print Page | Close Window

Problems deploying VS2005 CR application

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=550
Printed Date: 18 May 2024 at 1:49pm


Topic: Problems deploying VS2005 CR application
Posted By: gphreak
Subject: Problems deploying VS2005 CR application
Date Posted: 18 Apr 2007 at 10:28pm
I am trying to deploy a CR application built in VS2005. When I run it on machines that already have VS2005 pro installed, the installer finisshes fine and app is good to use.
When I try to install the app on a clean XP machine that has .net 2.0 on it, the installer finishes, but the app tries to connect to the server, gets server name, username and password, but not the database name, server name and database name fields are disabled so I can't change anything in them, similar to this pic, taken from http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=254 - http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=254
http://img137.imageshack.us/my.php?image=error2ry0.png">  
The server name is different, of course, and the database name is left blank, both of those textboxes are uneditable. The server is MS SQL server 2005.
The merge module used in setup project is CrystalReportsRedist2005_x86.msm
 
Here is some sample code:  (I am trying to get the simplest example to work before I do it in my actual project)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
namespace CRTest
{
    public partial class Form1 : Form
    {
        CrystalReport1 cr;
        public Form1()
        {
            InitializeComponent();
            cr = new CrystalReport1();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            TableLogOnInfo crLogOnInfo = new TableLogOnInfo();
            ConnectionInfo crConnInfo = new ConnectionInfo();
            foreach (Table tbl in cr.Database.Tables)
            {
                crConnInfo.ServerName = "myserver";
                crConnInfo.DatabaseName = "mydbname";
                crConnInfo.UserID = "sa";
                crConnInfo.Password = "somepass";
                crLogOnInfo = tbl.LogOnInfo;
                crLogOnInfo.ConnectionInfo = crConnInfo;
                tbl.ApplyLogOnInfo(crLogOnInfo);
            }
            crystalReportViewer1.ReportSource = cr;
        }
    }
}
 
I have been fighting with this for hours each day, for several days now.
It seems like if the CR runtime is not installed on the machine, whatever I try gives me the error explained above and the logon screen similar to the one in the picture.
 
Does anyone have any ideas as to how to get the CR runtime installed properly? Where do I input CR license key for VS2005? Any ideas, any whatsoever, why I might be geting this error?
 
All help is greatly appreciated. 



Replies:
Posted By: hilfy
Date Posted: 19 Apr 2007 at 8:06am
I had a tough time getting the install key set up for an install too - it's not easy to find. 
 
- In your lnstall project, select the Crystal installation assembly (I have Crystal XI R2 installed, so mine is crystalreports11_5_net_2005.msm.) 
- In the Properties viewer, click on the "+" next to "MergeModuleProperties". 
- Scroll down and find the entry for "Keycode".
- Enter your license key for Keycode.
 
Your install program will now install the Crystal merge modules that will allow your application to correctly run reports.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: gphreak
Date Posted: 19 Apr 2007 at 8:22am
Thanks for the reply. For VS2005 professional, I don't seem to have the redistributable msm in merge modules folder. I downloaded zipped files from here http://support.businessobjects.com/communityCS/FilesAndUpdates/cr_net_2005_mergemodules_mlb_x86.zip.asp
The archive has CrystalReportsRedist2005_x86.msm in it and when I go to its merge module properties have no KeyCode entry, only InstallCRDB_ADO, InstallCRDB_ADOPLUS, InstallCRDB_DAO, InstallCRDB_DATASET and InstallCRDB_ODBC for which components to install.

I have VS2005 Pro and it does come with a license for CR, I see the key when I go to Help -> About, but I still do not have the msm that would allow me to input a key.
Any ideas there?  


Posted By: gphreak
Date Posted: 23 Apr 2007 at 7:49pm
OK, so I talked to CR support and they claim that there should be nothing special about that msm file.  It should just take. Which brings me to another question: what should the client machines have installed before I install the CR application? Again, I am using it to connect to MS SQL Server 2005.
At report design, should I be using SQL Native Client connection method or ODBC?
Any other tips or suggestions?

Thanks!



Posted By: andyoneill
Date Posted: 07 Jun 2007 at 5:42am

I'm working with asp.net rather than windows but I'm guessing my solution would work for you.  When I stick in the product key to a merge module and try using that it doesn't work. 

No error , just doesn't install the crystal stuff.
So I downloaded the msi and tried manually entering it.  Tells me that the key is out of date. 
 
I found a solution on someone's blog. 
Goes something like this....
Create a blank new install project and add the crystal 2 runtime to it's list of required stuff.  When you build it you will find it creates a file CRRedist2005_x86.msi which doesn't need a key.
In my case I ran this on the target web server and it installed ok.


Posted By: hilfy
Date Posted: 07 Jun 2007 at 10:14am
I highly recommend using the native client instead of ODBC.  You have to install the SQL client software in either case, but the native client is much faster and doesn't have some of the odd data formatting problems that you get with ODBC.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: WildBird
Date Posted: 07 Jun 2007 at 11:44am
Just another gotcha that I discovered after getting past where you are...
 
Your database connection with in the report file, within VSS 2005/ Visual Web Develoment project... Whew,
 It NEEDS to be an OLEDB connection. And you must have an asp.net account/password that has access to the database on the server to use when you are creating the report within VSS 2005/VWD.
 
  It doesn't affect what you have in your code-behind page or whatever you are using page-wise.
 
And don't forget to make sure that the server admin staff have installed the server runtime files on the web server.
http://support.businessobjects.com/communityCS/FilesAndUpdates/crXIr2_net_server_install.zip.asp - http://support.businessobjects.com/communityCS/FilesAndUpdates/crXIr2_net_server_install.zip.asp
 
WildBird


Posted By: hilfy
Date Posted: 07 Jun 2007 at 12:40pm

OLEDB is not a requirement for running reports from asp.NET.  We run reports with a native Oracle connection through a firewall from our webserver.  We had to install the Oracle client software in order to do this. 

Whether you need OLEDB is a matter of the type of database you're connecting to.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: WildBird
Date Posted: 07 Jun 2007 at 12:45pm
I was replying to the specific problem, not tooting my own horn.
 
"Again, I am using it to connect to MS SQL Server 2005.
At report design, should I be using SQL Native Client connection method or ODBC?
Any other tips or suggestions?"

 

WildBird





Print Page | Close Window