How to Print Report Directly With Out Showing(using) In ReportViewer In HTML5 or JQuery

4 posts, 0 answers
  1. chaitanya
    chaitanya avatar
    9 posts
    Member since:
    Mar 2016

    Posted 28 Oct Link to this post

    How to Print Report Directly With Out Showing(using) In ReportViewer In HTML5 or JQuery
  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 28 Oct Link to this post

    Hello,

    Please check the response in your other forum thread on the same question.
    If you need further help, let us continue the discussion in the above linked thread.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. chaitanya
    chaitanya avatar
    9 posts
    Member since:
    Mar 2016

    Posted 31 Oct in reply to Stef Link to this post

    how can i write the below code in HTML5 Or JQuery or ReportController or ApiController

     

    public FileContentResult GetPdf()
            {
                var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                var typeReportSource = new Telerik.Reporting.TypeReportSource();

                // reportToExport is the Assembly Qualified Name of the report
                typeReportSource.TypeName = typeof(Report1).AssemblyQualifiedName;
                var deviceInfo = new System.Collections.Hashtable();
                deviceInfo["JavaScript"] = "this.print({bUI: true, bSilent: false, bShrinkToFit: true});";
                var result = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);

                HttpContext.Response.AddHeader("content-disposition", "inline; filename=MyFile.pdf");
                return File(result.DocumentBytes, "application/pdf");

            }

     

    please help me..

  5. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 31 Oct Link to this post

    Hi chaitanya,

    The Print a report directly at client-side without displaying it in a Viewer KB article contains MVC project illustrating an approach to export programmatically. There is no need to use the Reporting REST service (ReportsControllerBase) when you export programmatically.

    In case the question is how to download the PDF via custom WebAPi controller, please check this stackoverflow discussion.

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top