Solved

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

Posted on 2009-05-15
6
1,358 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 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

18 Experts available now in Live!

Get 1:1 Help Now