Printing CrystalReport reports in a Asp.Net application without using PDF

11,509

Ok, I'm going for the necromancer badge here so remember to up vote if you like the answer. I think this question qualifies for that badge. :)

Here are a couple of links with some ideas:

http://aspalliance.com/509

Here they say that you can use the server-side ReportDocument.PrintToPrinter, but they say a limitation is that a printer name must be specified. They recommend that you have a drop down list on the page and use System.Drawing.Printing.PrinterSettings.InstalledPrinters as the datasource so the user can choose the printer. I haven't tried this, but option 2 seems more like what you're looking for.

They also say the you can use the clietn-side javascript window.Print function. This seems to me like a better approach.

http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=49048

In this link they both recommend PrintToPrinter, but I still think that the client-side call is what your looking for.

Share:
11,509
Grace
Author by

Grace

Updated on June 07, 2022

Comments

  • Grace
    Grace almost 2 years

    I'm developing an Asp.Net 3.5 application and I need to print some application generated reports.

    I was previously using SSRS but I had lots of problems with it design features. Because of that, we are now looking for Crystal Reports as an alternative.

    When we started to use Crystal, we faced a new problem. When one clicks on the Print button shown at the Crystal Report top bar, in the report presented on the web page, instead of showing the default SO's print dialog, it shows a custom print page, that then prints the report to a PDF.

    I know this solution probably suffice most of the scenarios regarding printing reports on the web. But on my specific case, I can't guarantee that the client's machines accessing my web app has a PDF reader installed, like Acrobat Reader. And I can't demand them to install it in order to use my application.

    So I am looking for a solution to make the Print Button of the generated report to show the default SO's print dialog instead of printing it to a PDF.

    Can you give me any advice on solving this problem?

    Thank You.