PC Review


Reply
Thread Tools Rating: Thread Rating: 4 votes, 3.00 average.

Crystal Reports XI .NET Print Window Not Found

 
 
Kbalz
Guest
Posts: n/a
 
      15th Feb 2007
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>

 
Reply With Quote
 
 
 
 
Kbalz
Guest
Posts: n/a
 
      16th Feb 2007
On Feb 15, 11:21 am, "Kbalz" <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports Does Not Display BLOB Field Correctly in IBlobField Control Using Crystal Reports for VS.NET 2003 Jeff Microsoft Dot NET 0 4th May 2006 09:21 PM
Re: crystal reports 9 and crystal reports.net Boyd Ferris Microsoft VB .NET 0 3rd Sep 2004 08:03 PM
Re: crystal reports 9 and crystal reports.net Boyd Ferris Microsoft VB .NET 2 3rd Sep 2004 10:16 AM
crystal reports 9 and crystal reports.net jaYPee Microsoft VB .NET 0 3rd Sep 2004 06:41 AM
Crystal Reports.NET vs. Crystal Reports 9 B. Harwood Microsoft Dot NET 0 28th Nov 2003 10:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:16 PM.