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.