Printing Crystal Report Directly Or export and print crystal Report RRS feed

All replies

  • User465171450 posted

    You don't have any control over printing from a browser. If you export you still don't have any control over the printing only the ability to export to pdf. The only real control we have is using CSS media queries that enable us to change the formatting of a page for printing, making some elements hidden for the print media and others visible. That's about it. The browsers just don't give us the control.

    There is a possibility to print sections of a page and this is done by swapping around HTML, but usually ends up making a mess of the page or stop it's functioning afterwards especially if scripting is involved with the page.

    Monday, August 4, 2014 2:35 PM
  • User919362612 posted


    How is Exporting and printing work? please let me know

    I am using print method which only print to asp. server printer I have tried a lot . so that it can print to Local Printer. But FAIL!!.  

    reportdocument.PrintOptions.PrinterName = "DEFAULT PRINTER"
    reportdocument.PrintToPrinter(1, False, 0, 0)


    And Also i tried exporting the Report to PDF. And print . that does work properly.

    the code which i used 

    Dim CrReport As New Crystal_Report11opdnormalposting() '/ Report Name
    Dim CrExportOptions As ExportOptions
    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
    Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()

    CrDiskFileDestinationOptions.DiskFileName = "path\xx.pdf"

    'Specify a page range (optional)

    // Set the destination to a disk file


    '// Set the format to PDF
    .ExportFormatType = ExportFormatType.PortableDocFormat

    '// Set the destination options to DiskFileDestinationOptions object



    Protected Sub PDF_PRINT_FSN()
    Dim psiPrint As New System.Diagnostics.ProcessStartInfo()
    psiPrint.Verb = "print"
    psiPrint.WindowStyle = ProcessWindowStyle.Hidden
    psiPrint.FileName = "path\xx.pdf"

    psiPrint.UseShellExecute = True
    End Sub


    if you have better code .. which work on client side please please help

    Tuesday, August 5, 2014 1:21 AM