75632

Printing at client printer by using ActiveReport

Question:

Now I am working with asp.net and C#.<br /> I use ActiveReports for reporting in my system.<br /> I have tried to print my report with showing preview (I mean I don't use WebViewer to preview the report and I print the report directly).

MyAR1 rptMyreport = new MyAR1(); DataTable dtMydata = new DataTable(); //add some data in dtMydata rptMyreport .DataSource = dtMydata; if (rptMyreport .Document.Printer.PrinterSettings.IsValid) { try { rptMyreport .Run(); rptMyreport .Document.Print(false, false, false); } catch (Exception) { // do something } } else { //show Error Message }

My problem is ...<br /> When I print this report , it works at server site printer and not work in client site printer. i.e ( I am working at 4th floor and server is at 10th floor . When I print the report . It is printed by the server site printer at 10th floor . ) What can I do to print the report at the printer which was the client PC connected.

With Regards,

Answer1:

The C# code you are running above is actually running on the server so that is why the Server's printer is the one receiving the print job. However, you want the client machine -the one with the web browser- to receive the print job. To do that we provide several options, but the best one is described step-by-step in the documentation under the help topic <a href="http://www.datadynamics.com/Help/ActiveReports6/ActiveReports6_start.html?arHOWProvideOneTouchPrintingInTheWebViewer.html" rel="nofollow">Provide One-Touch Printing in the WebViewer (Pro Edition)</a>. This will cause the printing to happen from the machine that is using the Web Browser and not the server.

You can use other viewer types other than Flash but there are limitations imposed by the browser to force the print dialogs to appear (to prevent web pages from randomly printing without consent). More information about the available options and limitations is described in the help topic <a href="http://www.datadynamics.com/Help/ActiveReports6/ActiveReports6_start.html?arWebViewerPrinting.html" rel="nofollow">Web Viewer Print Options</a>.

Recommend

  • Force Printing on Legal Size Paper
  • Print rdlc report without viewing print dialogue box
  • Printing does not start at the top edge of the page
  • Barcode Printing Sato LM408e c#
  • how can resolve dodgy:unchecked/unconfirmed cast in sonar?
  • Zend Framework 2, Module Redirect
  • IDX10503: Signature validation failed
  • stop execution in Custom validator if it false
  • Why does it draw lines in the wrong place?
  • Converting a WriteableBitmap image ToArray in UWP
  • Reading JSON from a file using C++ REST SDK (Casablanca)
  • NHibernate Validation Localization with S#arp Architecture
  • Why value captured by reference in lambda is broken? [duplicate]
  • How can I send an e-mail from a vbs script
  • Accessing IRQ description array within a module and displaying action names
  • javascript inside java/jsp code
  • Sending data from AppleScript to FileMaker records
  • align graphs with different xlab
  • Return words with double consecutive letters
  • SVN: Merging two branches together
  • Hibernate gives error error as “Access to DialectResolutionInfo cannot be null when 'hibernate.
  • Android Studio and gradle
  • KeystoneJS: Relationships in Admin UI not updating
  • AngularJs get employee from factory
  • Load html files in TinyMce
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Getting Messege Twice Using IMvxMessenger
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • Linking SubReports Without LinkChild/LinkMaster
  • Bitwise OR returns boolean when one of operands is nil
  • sending mail using smtp is too slow
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • costura.fody for a dll that references another dll
  • Reading document lines to the user (python)
  • Binding checkboxes to object values in AngularJs
  • How can i traverse a binary tree from right to left in java?
  • Python/Django TangoWithDjango Models and Databases