.NETGURU
Help! - Re: Printing From Crystal Report in AS P.NET
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-crystal' list.


Domina Tang
Hi, Machette

I am trying to print to a network printer which has been setup as =
TCP/IP
local printer. But each time I run following code:
    crystalReportObject.PrintOptions.PrinterName =3D "\\ASTRA\Accprt"
crystalReportObject.PrintToPrinter(1, False, 0, 0)

The error msg displays:
"Description: An unhandled exception occurred during the execution of =
the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.=20

Exception Details: =
CrystalDecisions.CrystalReports.Engine.InternalException:
Error in File =
C:\WINNT\TEMP\temp_fd707b49-ffca-4a34-a184-97baf260c3fc.rpt:
Request cancelled by the user.
"

Do I set PrinterName wrong?

Much Thanks
Domina
-----Original Message-----
From: Uncle Machette [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 11:47 AM
To: ngfx-crystal
Subject: [ngfx-crystal] Re: Printing From Crystal Report in ASP.NET

If you want to use the server control you can print to any local =
printer set
up on the server. If you are doing this for internal use, this should =
work
out for you. We set up any remote printers on the network as TCP/IP =
local
printers on the server, then populate a drop down box with those =
printers.
Then I use the crystal viewer to print to that printer, like:
crystalReportObject.Load()
crystalReportObject.SetDataSource(myDs)
crystalReportObject.PrintOptions.PrinterName =3D
ddlPrinters.SelectedItem.Value
crystalReportObject.PrintToPrinter(1, False, 0, 0)
crystalReportObject.Close()
HTH

*************************=20
Eric Landes=20
Senior Programmer/Analyst (Partners Health Plan) and member of the
ASPFriends.com Moderator team=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20

----- Original Message -----
From: =3D?iso-8859-1?Q?C=3DFCneyt_Gargin?=3D <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Fri, 9 Aug 2002 18:29:48 -0700
Subject: Printing From Crystal Report in ASP.NET
[Original message clipped]

or
>word document to print the invoice, the invoice (which is a report) =
should
>be automatically directed to printer so the user will just get the =
invoice.
[Original message clipped]

| [ngfx-crystal] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-crystal.asp =3D JOIN/QUIT

Reply to this message...
 
    
Pascal Naber
i think it's nothing with the printer.

you are not filling the dataset right, if you're using it,
make sure you use the same name in creating you're report as well as =
filling
you're dataset

so: adp.fill(ds, "tablename")

this 'tablename' have to be the same !

Groeten van Pascal Naber
CMG Trade, Transport & Industry B.V.=20
Web Development=20
=20
* Phone : 010 - 253 70 00
* Mobile : 06 - 246 162 73
* Fax : 010 - 253 70 21=20
* E-mail : Click here to reveal e-mail address <mailto:Click here to reveal e-mail address>=20

Kralingseweg 241-249
3009 AN Rotterdam

-----Original Message-----
From: Domina Tang [mailto:Click here to reveal e-mail address]
Sent: woensdag 14 augustus 2002 21:24
To: ngfx-crystal
Subject: [ngfx-crystal] Help! - Re: Printing From Crystal Report in AS
P.NET

Hi, Machette

I am trying to print to a network printer which has been setup as =
TCP/IP
local printer. But each time I run following code:
    crystalReportObject.PrintOptions.PrinterName =3D "\\ASTRA\Accprt"
crystalReportObject.PrintToPrinter(1, False, 0, 0)

The error msg displays:
"Description: An unhandled exception occurred during the execution of =
the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.=20

Exception Details: =
CrystalDecisions.CrystalReports.Engine.InternalException:
Error in File =
C:\WINNT\TEMP\temp_fd707b49-ffca-4a34-a184-97baf260c3fc.rpt:
Request cancelled by the user.
"

Do I set PrinterName wrong?

Much Thanks
Domina
-----Original Message-----
From: Uncle Machette [mailto:Click here to reveal e-mail address]
Sent: Friday, August 09, 2002 11:47 AM
To: ngfx-crystal
Subject: [ngfx-crystal] Re: Printing From Crystal Report in ASP.NET

If you want to use the server control you can print to any local =
printer set
up on the server. If you are doing this for internal use, this should =
work
out for you. We set up any remote printers on the network as TCP/IP =
local
printers on the server, then populate a drop down box with those =
printers.
Then I use the crystal viewer to print to that printer, like:
crystalReportObject.Load()
crystalReportObject.SetDataSource(myDs)
crystalReportObject.PrintOptions.PrinterName =3D
ddlPrinters.SelectedItem.Value
crystalReportObject.PrintToPrinter(1, False, 0, 0)
crystalReportObject.Close()
HTH

*************************=20
Eric Landes=20
Senior Programmer/Analyst (Partners Health Plan) and member of the
ASPFriends.com Moderator team=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20

----- Original Message -----
From: =3D?iso-8859-1?Q?C=3DFCneyt_Gargin?=3D <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Fri, 9 Aug 2002 18:29:48 -0700
Subject: Printing From Crystal Report in ASP.NET
[Original message clipped]

or
>word document to print the invoice, the invoice (which is a report) =
should
>be automatically directed to printer so the user will just get the =
invoice.
[Original message clipped]

| [ngfx-crystal] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-crystal.asp =3D JOIN/QUIT

| [ngfx-crystal] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-crystal.asp =3D JOIN/QUIT

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification