TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rahul Sharma
NA
20
9.4k
The RPC server is unavailable when printing on network print
May 13 2014 1:18 AM
hi
I am trying to print a report (.rdlc) from button click as below. It throws a message
"The RPC server is unavailable.".
private void btnPrint_Click(object sender, EventArgs e)
{
Report1.PrintOptions.PrinterName = cmbPrinters.Text;
Report1.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)GetPaperSize(cmbPrinters.Text, "A4");
//PaperSize.PaperA4
Report1.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
Report1.PrintToPrinter(1, false, 1, 1);
}
when it comes to the line :
Report1.PrintToPrinter(1, false, 1, 1);
it throws exception saying
"The RPC server is unavailable"
. The printer is working fine. Its a network printer and I have given proper path for it.
The point to be noted is, when for the first time I tried to print it threw exception saying
"The RPC server is unavailable"
there after.
I got same message when i click on print button which is inside ReportViewer Control. How can i resolve it.
Please help.
Thanks
Reply
Answers (
4
)
How to read text file in a single string
Create Setup File Using InstallShield LE and unzip a file