?
Solved

Does 'reportdocument.printToprinter()' print the document at client side ?

Posted on 2009-05-15
6
Medium Priority
?
1,399 Views
Last Modified: 2012-05-07
Does 'reportdocument.printToprinter()' print the document at client side ?
Can anyone help me in this regrad?
0
Comment
Question by:GouthamAnand
[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
  • 2
  • 2
6 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 24395032
I believe it depends on where the report is run.

If on the client then it should print client side.

mlmcc
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24395218
since this line runs on the server (in the code-behind) it will print on the server. you cannot print it on the client directly. you have to show the report and the user can print it.
0
 

Author Comment

by:GouthamAnand
ID: 24395328
protected void btnPrint_Click(object sender, EventArgs e)
    {
        try
        {
            orptDoc = (ReportDocument)Session["report"];
            if (rbtList.SelectedItem.Value == "All")
            {
                fromPage = 0;
                toPage = 0;
            }
            else
            {
                fromPage = Convert.ToInt32(txtFrom.Text);
                toPage = Convert.ToInt32(txtTo.TabIndex);
            }
            if (txtCopies.Text !=string.Empty)
            {
                nCopies = Convert.ToInt32(txtCopies.Text);
            }
            orptDoc.PrintToPrinter(nCopies,false, fromPage, toPage);
        }

Above is my code.
When I press button on my browser (at client side), does print go from client machine? or Will it go from server where the application is deployed which locted somewher else?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 24396069
Is the app running onthe client?  Is it installed on the client?

If it is a web page it is probaby running on the server and therefore will print there.

mlmcc
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 1000 total points
ID: 24396093
clicking the button will do a postback to the server and your code will run on the server. the report will be printed on the server.
0
 

Author Closing Comment

by:GouthamAnand
ID: 31581894
Thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 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