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

Does 'reportdocument.printToprinter()' print the document at client side ?
Can anyone help me in this regrad?
GouthamAnandAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
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
 
mlmccCommented:
I believe it depends on where the report is run.

If on the client then it should print client side.

mlmcc
0
 
Éric MoreauSenior .Net ConsultantCommented:
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
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
GouthamAnandAuthor Commented:
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
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
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
 
GouthamAnandAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.