Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Problems deploying VS2005 CR application Post Reply Post New Topic
Author Message
gphreak
Newbie
Newbie


Joined: 14 Mar 2007
Online Status: Offline
Posts: 17
Quote gphreak Replybullet Topic: Problems deploying VS2005 CR application
    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
 
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. 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
gphreak
Newbie
Newbie


Joined: 14 Mar 2007
Online Status: Offline
Posts: 17
Quote gphreak Replybullet 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?  
IP IP Logged
gphreak
Newbie
Newbie


Joined: 14 Mar 2007
Online Status: Offline
Posts: 17
Quote gphreak Replybullet 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!

IP IP Logged
andyoneill
Newbie
Newbie


Joined: 19 May 2007
Online Status: Offline
Posts: 12
Quote andyoneill Replybullet 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.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
WildBird
Newbie
Newbie
Avatar

Joined: 07 Jun 2007
Location: United States
Online Status: Offline
Posts: 6
Quote WildBird Replybullet 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.
 
WildBird


Edited by WildBird - 07 Jun 2007 at 12:17pm
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
WildBird
Newbie
Newbie
Avatar

Joined: 07 Jun 2007
Location: United States
Online Status: Offline
Posts: 6
Quote WildBird Replybullet 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


IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.017 seconds.