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

AngularJS project : Print Telerik Report Without Report Viewer

1 Answer 177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ahmed
Top achievements
Rank 1
ahmed asked on 16 Aug 2016, 03:40 PM

Hello

I use this way HTML5 Viewer in AngularJS project in my .NET4, AngularJS project to print telerik reports

the issue is that in some cases when I click print, I want to skip the report viewer screen and jump to print preview screen 

is that possible ??

used code in view.html

$("#reportViewer1").telerik_ReportViewer({
               error: function (e, args) {
                   alert('Error from report directive:' + args);
               },
               reportSource: {
                   report: 'reportname',
               },
               serviceUrl: '/api/reports/',
               
               viewMode: 'PRINT_PREVIEW',
               scaleMode: 'FIT_PAGE_WIDTH',
               scale: 1.0,

 

and used code in reportscontroller.cs

var reportsPath = HttpContext.Current.Server.MapPath("~/");
 
        //Add resolver for trdx report definitions,
        //then add resolver for class report definitions as fallback resolver;
        //finally create the resolver and use it in the ReportServiceConfiguration instance.
        var resolver = new ReportFileResolver(reportsPath)
            .AddFallbackResolver(new ReportTypeResolver());
 
        //Setup the ReportServiceConfiguration
        configurationInstance = new ReportServiceConfiguration
        {
            HostAppId = "Html5AppAJS",
            Storage = new FileStorage(),
            ReportResolver = resolver,
            // ReportSharingTimeout = 0,
            // ClientSessionTimeout = 15,
        };

 

Thanks in advance 

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 Aug 2016, 11:49 AM
Hi Ahmed,

Reports are processed and rendered on the server machine, where you can load the rendered content in an HTML5 Viewer, or directly distribute PDF files with additional settings for printing to the client.

Please check Print a report directly at client-side without displaying it in a Viewer and the examples available in it.


I hope this helps.

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
ahmed
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or