473,387 Members | 1,834 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,387 software developers and data experts.

Crystal report PrintToPrinter in ASP.NET

hello all,

I'm having problems printing to a network printer from the server
using ASP.NET.

I set the name of the printer using
oRpt.PrintOptions.PrinterName = "\\\\server\\printer"
and then I am using,

oRpt.PrintToPrinter(1,false,0,*0)

I get an exception thrown stating "Invalid printer specified"

I've tried referencing the printer by share name but still it is not
working

I have changed registry settings for the printer, I copied the printer
settings from the HKEY_CURRENT_USER hive to the HKEY_USERS/.DFAULT
hive.

also i made changes in machine.confige file. Instead of username
"machine" i am using "SYSTEM" in <ProcessModel> tag.
still its not working ....

Any ideas?

cheers
Aradhana

Nov 19 '05 #1
1 5455
Hi CAradhana,

Even you change username from machine to SYSTEM, still the
user is not a domain user, unless you add it to domain.
Hence it can't access domain resource, such as network
printer.

HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
hello all,

I'm having problems printing to a network printer from the serverusing ASP.NET.

I set the name of the printer using
oRpt.PrintOptions.PrinterName = "\\\\server\\printer"
and then I am using,

oRpt.PrintToPrinter(1,false,0,*0)

I get an exception thrown stating "Invalid printer specified"
I've tried referencing the printer by share name but still it is notworking

I have changed registry settings for the printer, I copied the printersettings from the HKEY_CURRENT_USER hive to the HKEY_USERS/.DFAULThive.

also i made changes in machine.confige file. Instead of username"machine" i am using "SYSTEM" in <ProcessModel> tag.
still its not working ....

Any ideas?

cheers
Aradhana

.

Nov 19 '05 #2

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

Similar topics

1
by: Matthew Williams | last post by:
Hi, I've produced a Crystal Report in Crystal Reports.NET with rounded corner shaded boxes. When I send it directly to the Printer using PrintToPrinter() it is formated correctly. When I...
1
by: Islam Elkhayat | last post by:
I have problems with crystal Report... i use SQL query to fill dataGrid, i use checkboxs to select the column to return and build my query.. I want to create a report with the data of the datagrid...
2
by: Alx Sharp | last post by:
Hello group! I'm facing a strange problem in the application I'm writing... I'm using crystal reports for printing sale receipts, and I wrote this lines of code: ...
3
by: Khurram | last post by:
Hi, I am trying to use Crystal Reports with ASP.NET. I created a dataset and tried to display it in the report but nothing came up. I did not get an exception either. I know that the dataset is...
1
by: Manan | last post by:
i have a print button to print a crystal report, but this code is not working, it prints only the lines,and boxes of th report not the actual data, my code is Private Sub btnPrint_Click(ByVal...
0
by: Mbishr | last post by:
i add a print button to print the report and the on demand Subreport crystal i try this code in the button crReportDocumentForex.PrintToPrinter(1, False, 1, 99) but it print the main report...
2
by: Paul Daly (MCP) | last post by:
Hello, I have an application that uses the version of CR.NET that came with VS.NET 2003. The CrystalReportViewer control prints the report fine when initiated by the user on the form, but I...
1
by: BrianDH | last post by:
C# Windows Application. I am creating a CR and them printing the report via the PrintToPrinter(). The problem is the CR that is created in the temp directory is not removed after the application...
0
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.