Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2003, 03:39 AM
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default print a report from the server

Hi,
I'm using Crystal reports.Net and C#.
I have 2 machines, 1 is server and other is client machine with shared printer. When I try to print a report from the server it returns the following error: "Error in File D:\Reports\rptCurrency.rpt: Request cancelled by the user."
I tried the resolution from Crystal Reports help "Printing the report on the server side" (http://support.crystaldecisions.com/...p_printing.pdf) and resolution from the Microsoft knowlegde base articles 184291 (http://support.microsoft.com/default...NoWebContent=1) and 152451 (http://support.microsoft.com/default...b;EN-US;152451) but it still doesn't work.
What else can I do.

TIA,
Filipa
 
Old September 17th, 2003, 05:47 AM
Authorized User
 
Join Date: Aug 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Go though this docs,hope it will solve the problem.
If users do not have access to the applications required to print exported reports, you may want to enable users to print their report from the server. With server-side printing, reports are generated on the Web server and are printed to a printer that is installed to the Web server. Users can have the option to choose the printer that is near their location and allow the printing to be handled by the server.

The requirements for server-side printing are:

the printers must be installed to the Web server
the local SYSTEM account is given access to the printers
the Machine.config file holding configuration settings for the .NET Framework is edited to give the ASPNET worker process access to the system settings on the server.
Note Implementing server-side printing involves changing the default permissions on the server and is not recommended for applications that are exposed to the Internet.
To setup server-side printing you need to ensure the process under which ASP.NET is running has sufficient permissions to access Network printers. By default, ASP.NET runs with the permissions of the local “machine” (ASPNET account for the ASPNET worker process) account. In order to achieve network printing through IIS (Internet Information Services), the Framework should be run under the local SYSTEM account.

To setup server-side printing

Access the Machine.config files which is located by default at:
C:\WINNT\Microsoft.NET\Framework\<VersionNumber>\C ONFIG\

<VersionNumber> is the version of the .NET Framework installed to the computer. The account setting is contained within the <ProcessModel> tag of this file. The default setting for the account is: userName="machine" password="AutoGenerate"

Edit the default configuration settings in the Machine.config file. Change the default setting to:
userName="SYSTEM" password="AutoGenerate"
Save the file.
It is now possible to give the local SYSTEM account on the server permissions to print.

If the printer is a network printer, expose the network printer to the local SYSTEM account.
When a printer is installed to a computer, the settings for this printer are stored in the registry under the HKEY_CURRENT_USER registry hive (Registry file). The IIS process will never use this registry hive since it always runs under the context of the local SYSTEM account and cannot be logged onto a server as a “Current User”. By default, the SYSTEM account does not have any printers set up in the registry. There are two Microsoft knowledge base articles, Q152451 and Q184291 that explain how to expose the printer settings to the System account. Both of these articles require editing the registry on the Web server and copying the printer settings from the HKEY_CURRENT_USER hive to the HKEY_USERS/.DEFAULT hive.

See Also


syedjavid
 
Old September 17th, 2003, 09:53 AM
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've tried what you say but it doesn't work. I just don't understand what you say in this part "the Machine.config file holding configuration settings for the .NET Framework is edited to give the ASPNET worker process access to the system settings on the server."

Filipa

 
Old September 25th, 2003, 10:19 AM
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do a search on your (server) computer for "Machine.Config". This is an XML document which the .net framework uses to store server configuration. One of the tags in the Machine.Config file contains information regarding the "user" information that .Net uses when it runs. The ASPNET worker process is the name given to some of those processes which ASPNet starts on a machine. Printing is one of those processes -- however, the default ASPNet worker process "user" does not have any permissions to print, and cannot be given permission to print. Using syedjavid's informaiton, you can modify that file so the ASPNet worker process for printing will use an account that can be given permissions to print from the server.







Similar Threads
Thread Thread Starter Forum Replies Last Post
how to print sub report NagarajuK Crystal Reports 0 December 3rd, 2007 10:05 AM
Access NO PRINT in Report sbergeron Access 14 March 25th, 2006 01:35 AM
Crystal Report Print sepidehsalek Crystal Reports 2 February 12th, 2005 04:58 AM
print report lazio Crystal Reports 0 November 1st, 2004 08:38 AM
How to print Web Report? k_kosaraju Crystal Reports 7 June 10th, 2004 05:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.