mardi 2 juin 2015

How to add Print on open save dialogue box while printing telerik reports

I am using Telerik Report. I want to add the print option to the dialogue box while I render this report.

Is there any way that I can add Print option to the dialogue box.

    {
        Telerik.Reporting.Processing.ReportProcessor reportProcessor =
             new Telerik.Reporting.Processing.ReportProcessor();
        DTSReport DTSRpt = new DTSReport();
        DTSRpt.ReportParameters["PendingId"].Value = id;
        InstanceReportSource reportSource = new InstanceReportSource();
        reportSource.ReportDocument = DTSRpt;
        RenderingResult renderingResult =
            reportProcessor.RenderReport("PDF", reportSource, null);
        MemoryStream ms = new MemoryStream();
        ms.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
        ms.Flush();

        FileContentResult result = new FileContentResult(ms.GetBuffer(), renderingResult.MimeType);
        result.FileDownloadName = String.Format("DTS-{0}.pdf", id);

        return result;
    }




Aucun commentaire:

Enregistrer un commentaire