473,320 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Crystal Reports XI .NET Print Window Not Found

Having a really hard time finding solid examples on deploying a
CR .NET applcation on my intranet. I'll explain what I've done so far,
and toward the bottom is where I can't print using the report viewer's
gui button.

I have a Windows XP sp2 Client machine used for development, it has
Visual Studio 2005 sp1 and CR XI R2 Developer Version.
My webserver is running Windows Server 2003 sp1, IIS 6.0, has CR XI R2
developer. I have a working report that uses a simple stored procedure
created.

I created the website in IIS on the server, and mapped the viewer
controls to a virtual directory

Website is: crystal
Alias is: crystalreportviewers115
Local Path is: C:\Program Files\Business Objects\Common
\3.5\crystalreportviewers115\

I created a solution from the client for the website, and moved my
report on the root, and created a default.aspx on the root (just for
testing and to keep it simple).. In VS, I dropped the Pre-canned
control "CrystalReportViewer".. this updated my webconfig file to
include the nessicary dlls and such.

Here is my ASPX.cs file:

protected void Page_Load(object sender, EventArgs e)
{
ConfigureCrystalReports();
}

private void ConfigureCrystalReports()
{
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = "<>"; //edited these out so all of
google groups doesn't see our conn info.
connectionInfo.DatabaseName = "<>";//edited these out so all
of google groups doesn't see our conn info.
connectionInfo.UserID = "<>";//edited these out so all of
google groups doesn't see our conn info.
connectionInfo.Password = "<>";//edited these out so all of
google groups doesn't see our conn info.

string reportPath = Server.MapPath("ageing.rpt");
CrystalReportViewer1.ReportSource = reportPath;

CrystalReportViewer1.CssFilename = "/crystalreportviewers115/
css/default.css";
CrystalReportViewer1.ToolbarImagesFolderUrl = "../
crystalreportviewers115/images/toolbar";
CrystalReportViewer1.GroupTreeImagesFolderUrl = "../
crystalreportviewers115/images/tree";

SetDBLogonForReport(connectionInfo);
}

private void SetDBLogonForReport(ConnectionInfo connectionInfo)
{
TableLogOnInfos tableLogOnInfos =
CrystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}
}

First off, you notice I had to do CrystalReportViewer1.cssfilename and
the other two properties.. my report data was showing perfectly, but
there were no images or CSS formatting.. I figured out I need to set
these properties on the report for them to work.

Now my report looks good with all the images, but when I try to use
the print button on the report - I get a JavaScript error. This is
with the PrintMode property on the report set to PDF.

The error is:

Line: 3641
Char: 1
Error: Object doesn't support this action
COde: 0
URL: http://crystal/default.aspx

So I switched the PrintMode to ActiveX.. now when I try to print my
report, I get a popup window, but it says "page could not be found"
error..

Here's my main questions:
Am I setting up IIS correctly so my reports know where to reference
files like printing, css, images..? It seems I have override this
because I haven't set it up properly..

If I have set it up properly.. how am I supposed to figure out
printing?
Here is my aspx page code if that helps any

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=11.5.3700.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div><CR:CrystalReportViewer ID="CrystalReportViewer1"
runat="server" AutoDataBind="true" ShowAllPageIds="True"/>
</div>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</form>
</body>
</html>

Feb 15 '07 #1
1 8584
On Feb 15, 11:21 am, "Kbalz" <kbalc...@edge-sweets.comwrote:
Having a really hard time finding solid examples on deploying a
CR .NET applcation on my intranet. I'll explain what I've done so far,
and toward the bottom is where I can't print using the report viewer's
gui button.

I have a Windows XP sp2 Client machine used for development, it has
Visual Studio 2005 sp1 and CR XI R2 Developer Version.
My webserver is running Windows Server 2003 sp1, IIS 6.0, has CR XI R2
developer. I have a working report that uses a simple stored procedure
created.

I created the website in IIS on the server, and mapped the viewer
controls to a virtual directory

Website is: crystal
Alias is: crystalreportviewers115
Local Path is: C:\Program Files\Business Objects\Common
\3.5\crystalreportviewers115\

I created a solution from the client for the website, and moved my
report on the root, and created a default.aspx on the root (just for
testing and to keep it simple).. In VS, I dropped the Pre-canned
control "CrystalReportViewer".. this updated my webconfig file to
include the nessicary dlls and such.

Here is my ASPX.cs file:

protected void Page_Load(object sender, EventArgs e)
{
ConfigureCrystalReports();
}

private void ConfigureCrystalReports()
{
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = "<>"; //edited these out so all of
google groups doesn't see our conn info.
connectionInfo.DatabaseName = "<>";//edited these out so all
of google groups doesn't see our conn info.
connectionInfo.UserID = "<>";//edited these out so all of
google groups doesn't see our conn info.
connectionInfo.Password = "<>";//edited these out so all of
google groups doesn't see our conn info.

string reportPath = Server.MapPath("ageing.rpt");
CrystalReportViewer1.ReportSource = reportPath;

CrystalReportViewer1.CssFilename = "/crystalreportviewers115/
css/default.css";
CrystalReportViewer1.ToolbarImagesFolderUrl = "../
crystalreportviewers115/images/toolbar";
CrystalReportViewer1.GroupTreeImagesFolderUrl = "../
crystalreportviewers115/images/tree";

SetDBLogonForReport(connectionInfo);
}

private void SetDBLogonForReport(ConnectionInfo connectionInfo)
{
TableLogOnInfos tableLogOnInfos =
CrystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}
}

First off, you notice I had to do CrystalReportViewer1.cssfilename and
the other two properties.. my report data was showing perfectly, but
there were no images or CSS formatting.. I figured out I need to set
these properties on the report for them to work.

Now my report looks good with all the images, but when I try to use
the print button on the report - I get a JavaScript error. This is
with the PrintMode property on the report set to PDF.

The error is:

Line: 3641
Char: 1
Error: Object doesn't support this action
COde: 0
URL:http://crystal/default.aspx

So I switched the PrintMode to ActiveX.. now when I try to print my
report, I get a popup window, but it says "page could not be found"
error..

Here's my main questions:
Am I setting up IIS correctly so my reports know where to reference
files like printing, css, images..? It seems I have override this
because I haven't set it up properly..

If I have set it up properly.. how am I supposed to figure out
printing?

Here is my aspx page code if that helps any

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=11.5.3700.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div><CR:CrystalReportViewer ID="CrystalReportViewer1"
runat="server" AutoDataBind="true" ShowAllPageIds="True"/>
</div>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</form>
</body>
</html>
Crystal Reports is the biggest waste of time and money on the market
today, with little support or great out of the box solutions.

Feb 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gudni G. Sigurdsson | last post by:
Hi. I am working on a program for the .NET Framework written in C# with Visual Studio .NET. With this program, one can print a report realized with the Crystal Report software included with VS...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
9
by: Robert Schuldenfrei | last post by:
Hello NG, After a bit of a wait my bookstore, SoftPro of Waltham, MA, got in the Brian Bischof book: Crystal Reports .NET Programming. I have read a few books on CR, but I am very new to it,...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
1
by: warlord | last post by:
In order to save typing, I've borrowed the text from a post of nearly 12 months ago.....but the problem still exists. I've been banging my head all day with this, so I'm hoping someone has some...
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
1
by: Peter Afonin | last post by:
Hello, I'm using Crystal Reports for Visual Studio 2005. I'm trying to print my reports to the postscript file: PrinterSettings ps = new PrinterSettings(); ps.PrinterName = "HP Deskjet 3840...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.