This is a migrated thread and some comments may be shown as answers.

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

3 Answers 429 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chaitanya
Top achievements
Rank 1
Chaitanya asked on 28 Oct 2016, 05:18 AM
How to Print Report Directly With Out Showing(using) In ReportViewer In HTML5 or JQuery

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 28 Oct 2016, 08:51 AM
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
0
Chaitanya
Top achievements
Rank 1
answered on 31 Oct 2016, 07:00 AM

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..

0
Stef
Telerik team
answered on 31 Oct 2016, 10:11 AM
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
Tags
General Discussions
Asked by
Chaitanya
Top achievements
Rank 1
Answers by
Stef
Telerik team
Chaitanya
Top achievements
Rank 1
Share this question
or