locked
Crystal Report Print to PDF option RRS feed

  • Question

  • User-219608141 posted

    Hi,

    I am using Crystal Report 13 and trying to print a report. I setup my crystalreportviewer as bellow.

    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" PrintMode="ActiveX"/>

    When I press print button on CrystalReportViewer, it shows me Print to PDF export option with the following message. I want it to be print directly to the printer. 

    The viewer must export to PDF to print. Choose the Print option from the PDF reader application once the document is opened. Note: You must have a PDF reader installed to print. (eg. Adobe Reader)

    Please help. thanks

    Tuesday, April 8, 2014 6:52 AM

All replies

  • User705563967 posted

    if You want to export crystal report as pdf then their is different technique what it is your problem can you explain more in detail .

    you want to print the report on printer or want to show report as pdf on explore

    Wednesday, October 22, 2014 4:11 AM
  • User-1151753377 posted

    Hi rashiddear,

    Thank you for your post.

    Please refer to the code below to export Crystal Report to PDF or other.

    ReportDocument crystalReport = new ReportDocument();
        BindReport(crystalReport);
        ExportFormatType formatType = ExportFormatType.NoFormat;
        switch (rbFormat.SelectedItem.Value)
    
        {
    
            case "Word":
    
                formatType = ExportFormatType.WordForWindows;
    
                break;
    
            case "PDF":
    
                formatType = ExportFormatType.PortableDocFormat;
    
                break;
    
            case "Excel":
    
                formatType = ExportFormatType.Excel;
    
                break;
    
            case "CSV":
    
                formatType = ExportFormatType.CharacterSeparatedValues;
    
                break;
    
        }
    
        crystalReport.ExportToHttpResponse(formatType, Response, true, "Crystal");
    
        Response.End();

    More details information:

    http://www.aspsnippets.com/Articles/Create-Generate-Export-PDF-file-using-Crystal-Reports-in-ASPNet-using-C-and-VBNet.aspx

    Regards & Summer

    Friday, January 23, 2015 4:02 AM