Solved

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

Posted on 2009-05-15
6
1,365 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 100

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 69

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
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

Accepted Solution

by:
mlmcc earned 250 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 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 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

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

16 Experts available now in Live!

Get 1:1 Help Now