locked
crystal reports Print is not working RRS feed

  • Question

  • User1051635487 posted

    Hi All,

    I am new to crystal reports and I developed one report which will display 

    after a button click. so the issue is I am able to see the crystal report but

    when I hit on the print image that's there on the report it is asking me for

    print options and once i click print

    I am getting the below error.

     

    Failed to export using the options you specified. Please check your options and try again.

     

     

     

    Tuesday, May 18, 2010 2:35 PM

All replies

  • User2039959148 posted

    please use this code for showing the report

    this code convert the report in PDF and then u easlily Print


                Dim ObjRDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                

                Dim s As MemoryStream
                s = ObjRDoc.ExportToStream(ExportFormatType.PortableDocFormat)


                HttpContext.Current.Response.ClearContent()
                HttpContext.Current.Response.ClearHeaders()
                HttpContext.Current.Response.ContentType = "application/pdf"
                HttpContext.Current.Response.AddHeader("Content-Disposition", "inline; filename=Report.pdf")
                HttpContext.Current.Response.BinaryWrite(s.ToArray())
                HttpContext.Current.Response.End()


    Wednesday, May 19, 2010 1:54 AM
  • User1051635487 posted

    I am using c# can I have it in c#?

    Wednesday, May 19, 2010 2:29 PM