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

Cannot print Crystal reports to any printer from VB.NET


I'm getting this error message trying to print to any networked printer:

"Analysis Server: Invalid printer specified"

This just happened today!

I had no problem printing to these printers from Crystal report (in
VB.NET) before using the following codes:
Private Function AddPrinters()

Dim prtdoc As New PrintDocument

Dim strDefaultPrinter As String = prtdoc.PrinterSettings.PrinterName

Dim strPrinter As [String]

For Each strPrinter In PrinterSettings.InstalledPrinters

cbPrinter.Items.Add(strPrinter)

If strPrinter = strDefaultPrinter Then

cbPrinter.SelectedIndex = cbPrinter.Items.IndexOf(strPrinter)

End If

Next strPrinter

End Function
mprinterName = Trim(cbPrinter.Text)

myReport.RecordSelectionFormula = mSelection

myReport.PrintOptions.PrinterName = mprintName

myReport.PrintToPrinter(1, True, 0, 0)

Thanks

Bill
Feb 28 '06 #1
0 1224

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

Similar topics

1
by: Devesh Aggarwal | last post by:
I developed reports in Crytsal Reports 9.0 in landscape mode. When i print the same from crystal reports it prints perfectly in Landscape even if the printer setting is set to potrait by default. ...
2
by: Nikolay Seksenov | last post by:
I am developing VB.Net Web application to be used in our department intranet. I created a web-based report using Crystal Reports. I would like to print the report from the web server instead of...
7
by: Robert Adkison | last post by:
I need to print a web page. It is my preference that my users just do a File/Print from explorer. That way my users will get the print dialog that will allow them to select the fax printer. The...
0
by: Anniech | last post by:
I use VB.NET to integrate with crystal report 9.0 to print a report with custom paper size (using Dot Matrix printer). I have already added a custom paper size in the printer server and set the...
1
by: Michael Beck | last post by:
I need to select one of about 15 printers, which I have been able to do. Then I need to set that printer as the printer to use, run a Crystal Reports reports, and track if/when the printing job...
3
by: Santosh | last post by:
Hii.. i am printing crystal reports in asp.net for that purpose i am using PrintTo Printer method but for that it is needed me to pass printer name which is installed on my local computer but...
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: EricJudge06 | last post by:
We are converting some reports from Crystal Reports to Microsoft SQL Reporting Services (SSRS) in an ASP 2.0 VB.Net web app. Crystal had a function called PrintToPrinter which was being used to...
2
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have some problems with printing in C#. I just want to have something like a report with one TextBox on top and a PictureBox below. While runtime, I need to fill the TextBox and 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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.