Solved

Bypassing the Print Dialog in Crystal Report Viewer PrintReport method

Posted on 2004-09-24
8
3,606 Views
Last Modified: 2008-01-09
Is there a way to not have the Print Dialog pop up when I print to printer (using PrintReport method) using the CR Report Viewer? I need the report to print to the default printer without user clicking the OK button. Is there some other way to print a Crystal reports without using the Report Viewer?

This is a windows applicaton developed in Visual Studio .net, VB.net.
0
Comment
Question by:fruffing
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 12145825
Not sure about the PrintReport method (have no reference material here) but using th eRDC there is a parameter that when set false prints automatically

crRpt.PrintOut False

mlmcc
0
 

Expert Comment

by:J_Fuller
ID: 12146121
The viewer sends a printbuttonclicked event notification just override the default and print the report as you desire

C++ example

BEGIN_EVENTSINK_MAP(Dlg, CDialog)
      ON_EVENT(Dlg, IDC_CRVIEWER1, 409, PrintButtonClickedCrviewer1, VTS_PBOOL)
END_EVENTSINK_MAP()

void Dlg::PrintButtonClickedCrviewer1(BOOL* UseDefault)
{
      *UseDefault=FALSE;

      //Your print code here
}
0
 
LVL 2

Expert Comment

by:Parsi
ID: 12149646
Hi fruffing

for your second question you can use
 Cr1.Destination = crptToPrinter
 Cr1.Action=1

this way you can print without viewing report.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 100

Expert Comment

by:mlmcc
ID: 12152252
Parsi - that won't work with CR.Net since CR.Net doesn't support the OCX.

mlmcc
0
 
LVL 1

Expert Comment

by:ndonhauser
ID: 12163060
Are you using the Crystal Reports Enterprise edition or just the one built into Visual Studio 2003?
0
 

Author Comment

by:fruffing
ID: 12163231
I was trying to use the one built into VS 2003. I have since put the OCX from CR8 onto the form and am using that. Works fine. Found that solution elsewhere on the net with a google search. thanks for the help, all.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12393982
PAQed, with points refunded (400)

Computer101
E-E Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
count7 challenge 12 104
count8 challlenge 13 119
What is Python programming? 3 103
Adoquery sql  left join does not work 25 80
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now