Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting Crsytal Reports Printer at runtime in VB.NET

Posted on 2013-05-30
2
Medium Priority
?
2,414 Views
Last Modified: 2013-11-15
On my old development PC (Win7Pro / Vb.NET 2008 / CR) I had a routine that allowed users to print a selection of documents using pre-defined crsytal report templates.
Basically we could setup a list of documents to print and configure the printers that they were printed to.
Now I have a Windows8 PC with Vb.NET 2010 and CR 2011, this code is no longer working.
It appears that the CR object ignores the printer parameters and prints to the default windows printer. The code I used was very simple:
 
       ' Set the required Printer & Tray
        crxReport.PrintOptions.PrinterName = oDocParams.PrinterName
        crxReport.PrintOptions.PaperSource = oDocParams.PrinterTray

However is doesn't matter what you set the printer name to (and yes I am setting to printers configured on the PC!) likewise for the tray.
The only thing that appears to work is the number of copies:
       crxReport.PrintToPrinter(oDocParams.Copies, True, 0, 0)

I am referencing the full blown crystal report object not hte one included in .NET

I'm guessing the printing subsystem in Windows 8 is overiding the CR settings......

Anyone have any ideas?

Thanks

Patrick
0
Comment
Question by:ManSys UK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1500 total points
ID: 39207221
maybe try to change the default printer just to print the report (and reset it right after): http://emoreau.com/Entries/Articles/2005/03/Setting-Windows-default-printer.aspx
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39207548
It may also be that Crystal needs to be upgraded to be fully Win8 compatible.

A couple of articles from SAP/Crystal.  No Win 8 Crystal service pack yet.
http://scn.sap.com/thread/3296726

http://scn.sap.com/message/13996287

mlmcc
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question