Is it possible to print a report directly without print dialog on asp.net

Is it possible to print a report directly without print dialog on asp.net?

While in "debug mode" it works greate but when we publish the project to IIS the report throws error like this

Comments

  • edited 10:21AM
    Any idea?
  • edited 10:21AM
    nzmhtpgl wrote: »
    Any idea?

    Method #1:

    - call Prepare()
    - call PrintPrepared(printerSettings)


    The only thing you have to find out are the printer settings for the default printer, but this should be quite easy. You find more information in the MSDN library.

    Method #2:

    Just take a look at the reports PrintSettings: You'll find a "ShowDialog" property. Maybe it helps to set this one to false.
  • edited 10:21AM
    if you know the name of your printer the following code works just fine:
    ReportFast.Prepare();
    
    // print report to pdf printer
    ReportFast.PrintSettings.Printer = "PDFCreator";
    ReportFast.PrintSettings.ShowDialog = false;
    ReportFast.Print();
    
  • edited 10:21AM

    Method #1:
    - call Prepare()
    - call PrintPrepared(printerSettings)

    The only thing you have to find out are the printer settings for the default printer, but this should be quite easy. You find more information in the MSDN library.

    Method #2:

    Just take a look at the reports PrintSettings: You'll find a "ShowDialog" property. Maybe it helps to set this one to false.

    It is possble in desktop applications but not in browser applications (asp.net) bacause of security!
  • edited 10:21AM
    IngoFR wrote: »
    if you know the name of your printer the following code works just fine:
    ReportFast.Prepare();
    
    // print report to pdf printer
    ReportFast.PrintSettings.Printer = "PDFCreator";
    ReportFast.PrintSettings.ShowDialog = false;
    ReportFast.Print();
    


    It is possble in desktop applications but not in browser applications (asp.net) bacause of security!

Leave a Comment