473,574 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing problems

Hi

I am using Visual Studio 2005 and the bundled Crystal Reports
(previously I used .net 2003 and bundled Crystal Reports for 2 years -
same issues!)

I have a report which is displayed in the crystal reports viewer. This
report needs to be printed. Its that simple!

I would like to use the report.printtop rinter method as this is direct
to the printer and hence I can control the showing/supressing of a print
options dialog.

However, this causes problems with quality/resolution which is important
to my application. I am unable to get the report to print with the
selected options in the print dialog.

I would be happy to use the other method of printing which is linked to
the CrystalReportVi ewer (CrystalReportV iewer.PrintRepo rt), but this
automatically pops up a dialog box and this is not always appropriate
(especially when printing 34 separate reports automatically).

So my need is either to be able to set quality/resolution using the
PrintToPrinter method or to suppress the dialog options when using the
PrintReport method!

For example (I am using CutePDF as a test base - I have performed
similar tests on physical printers)...

I open the report in a CrystalReportVi ewer and call the
crystalreportvi ewer.printrepor t using a button. Up pops the print
options. I choose 'properties', set the colour to black and white,
select 'advanced' and change the resolution to 2400. I then print, in
this case, to a PFD file called 'Test A'

Using a second button I invoke the CrystalReport.P rintToPrinter using
code similar to below...

Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
PrintDialog1.Do cument = PrintDocument1

Dim result As DialogResult = PrintDialog1.Sh owDialog()

'If click OK, print document to printer
If result = Windows.Forms.D ialogResult.OK Then
_template.Print Options.Printer Name =
PrintDialog1.Pr interSettings.P rinterName

_template.Print ToPrinter(Print Dialog1.Printer Settings.Copies ,
PrintDialog1.Pr interSettings.C ollate,
Me.PrintDialog1 .PrinterSetting s.FromPage,
Me.PrintDialog1 .PrinterSetting s.ToPage)
End If
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try

I set black and white and a resolution of 2400 and save as a file called
'Test B'

As you probably guess, Test A is b&w @ 2400, Test B is printer default
(colour, 600dpi). How can I get the PrintToPrinter method to use the
settings made in a Print Options dialog? Is my code missing something.

I would really appreciate any thoughts as my deadline is tight.

Maybe there are better ways to print reliably. My application gets used
on a whole range of printers and printing has always been my biggest
headache. I have never been able to guarantee it will work?!

Thank you.
Feb 28 '06 #1
1 5075
Hi,

Crystal is a product that is redistributed with VS.NET. However, it is not
supported by Microsoft. For CrystalReport issues, please try the following
link for support.

http://support.businessobjects.com

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Mar 1 '06 #2

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

Similar topics

0
2282
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are some problems I encountered while using them. Please note that, the Regional and Language setting on my machine is using "Metric" measurement system...
0
2117
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are some problems I encountered while using them. Please note that, the Regional and Language setting on my machine is using "Metric" measurement system...
5
2210
by: Mark Preston | last post by:
Admission first - I don't actually have a problem here but have noticed that a lot of people have been asking similar questions and getting very varied answers. What I've done is to sort of "compile the questions" into a theoretical problem to see what people think should be done to solve it. Maybe it will be a worthwhile discussion, but...
3
4308
by: Grim Reaper | last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a week. I have been having problems with one thing since I have been printing mailing labels. I print mailing labels by using a report I created and then printing them on a continuous-feed dot matrix printer. I used the Label Wizard, chose the query I created, picked the...
1
2475
by: G.Esmeijer | last post by:
Friends, I'm (a bit) dissapointed about the printing possibilities in c#. It could also be lack of knowedge. I would like to align a text on the right side of the paper when printing. For example tekst = DateTime.Today.Date.ToString("dd-MM-yyyy"); // asign content to the variable tekst
4
9213
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And this differences increases with the increase number of labels. The code is as follwods: Here rdr = OleDbDataReader Font is Times New Roman, 12pt
4
1825
by: Tracey | last post by:
Hey folks, I have an ASP.NET web app that's working just fine, but a small percentage have two printing problems that don't happen to the vast majority of users. These problems are listed below and do NOT appear on the print preview, but do when they actually print: Radio buttons aren't printing at all. Disable values are not printing,...
8
5880
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic...
18
11272
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing classes, for each of the checked rows in the GridView. This works fine in the Visual Studio 2005 development environment on localhost. But, when I...
0
7828
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7742
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8260
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7840
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5329
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3765
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2257
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1092
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.