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

html5 viewer export error in visual studio

6 Answers 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thom
Top achievements
Rank 1
Thom asked on 05 Jun 2014, 08:20 PM
I am unable to perform any exports in my reports that are displayed correctly in the html5 viewer when running locally in Visual Studio Development.  My reports are classes (not trdx).  I am using mvc.  I have the reporting api (exact copy as in the examples (they have a map path to \reports even though I am using classes so this may be the issue).   The message that I receive when I press the export pdf (or any other option) in chrome is:

{"message":"An error has occurred.","exceptionMessage":"Method not found: 'System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>> System.Net.Http.HttpRequestMessageExtensions.GetQueryNameValuePairs(System.Net.Http.HttpRequestMessage)'.","exceptionType":"System.MissingMethodException","stackTrace":" at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetResponseContentDisposition(HttpRequestMessage request)\r\n at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocument(String clientID, String instanceID, String documentID)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass17.<GetExecutor>b__10(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}

In ie it simply says that it failed.

I imagine that I have failed to do something simple in some setup.

Thanks,
Thom

6 Answers, 1 is accepted

Sort by
0
Thom
Top achievements
Rank 1
answered on 09 Jun 2014, 07:06 PM
I thought that maybe I just had an outdated web api, so I updated it to Microsoft.AspNet.WebApi.WebHost 4.0.30506 using nuget.  Now my reports do not run at all.
My DKReports controller is an exact copy of your reports api controller.

The error that I get is:

POST http://localhost:61366/api/DKReports/clients 500 (Internal Server Error) jquery.min.js:5sendjquery.min.js:5b.extend.ajaxjquery.min.js:5registerClientReportViewer-8.0.14.507.min.js:9DReportViewer-8.0.14.507.min.js:9itReportViewer-8.0.14.507.min.js:9t.extend.loadParametersReportViewer-8.0.14.507.min.js:9LReportViewer-8.0.14.507.min.js:10(anonymous function)ReportViewer-8.0.14.507.min.js:10b.event.dispatchjquery.min.js:3v.handlejquery.min.js:3b.event.triggerjquery.min.js:3(anonymous function)jquery.min.js:4b.extend.eachjquery.min.js:3b.fn.b.eachjquery.min.js:3b.fn.extend.triggerjquery.min.js:4rtReportViewer-8.0.14.507.min.js:9t.extend.reportSourceChangedReportViewer-8.0.14.507.min.js:9t.extend.reportSourceReportViewer-8.0.14.507.min.js:9RReportViewer-8.0.14.507.min.js:10(anonymous function)ReportViewer-8.0.14.507.min.js:10cjquery.min.js:3p.fireWithjquery.min.js:3i.(anonymous function)jquery.min.js:3(anonymous function)ReportViewer-8.0.14.507.min.js:10cjquery.min.js:3p.fireWithjquery.min.js:3kjquery.min.js:5rjquery.min.js:5Uncaught SyntaxError: Unexpected token < ReportViewer-8.0.14.507.min.js:9GReportViewer-8.0.14.507.min.js:9(anonymous function)ReportViewer-8.0.14.507.min.js:9cjquery.min.js:3p.fireWithjquery.min.js:3kjquery.min.js:5rjquery.min.js:5
0
Stef
Telerik team
answered on 10 Jun 2014, 10:10 AM
Hi Thom,

Please verify the machine covers all system requirements for running the Reporting Web API service. Then test running the service as in the How To: Add Telerik Reporting REST Web API to Web Application article (at step 8 you can see the available rendering extensions).

If none of the above articles helps you to resolve the problem, please open a support ticket and send us a demo project that illustrates your settings. We can update this forum thread at the end for anyone concerned.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Thom
Top achievements
Rank 1
answered on 12 Jun 2014, 12:45 PM
Thank you.  When I run step eight to retrieve the file formats I get:

[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"XPS","localizedName":"XPS Document"}]

So this seems to work.  But I can not export or print.  I will have to work up a demo.  It will just take me some time to keep all of the versions consistent with the actual project that I am adding the viewer to.
0
Stef
Telerik team
answered on 13 Jun 2014, 03:03 PM
Hello Thom,

Isolating the problem in small project can help you troubleshoot it or send us a project we can test. You can use as base the local demos, which are installed by default under C:\Program Files (x86)\Telerik\Reporting Q1 2014\Examples\CSharp.

Include a log file created by Fiddler and any logs in the Event Viewer on the server.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Sankar
Top achievements
Rank 1
answered on 26 Aug 2014, 06:22 AM
Was this issue resolved? If yes, how?
0
Stef
Telerik team
answered on 28 Aug 2014, 01:03 PM
Hi Sankar,

If the service responds and the report is rendered initially in the viewer, the reason the export and print options are disabled may be the mismatching versions of Telerik Kendo UI JS and CSS files, also multiple versions of jQuery loaded on the page.

You can check with Fiddler or the browser console the sent requests and determine if there are loaded Kendo files of different versions or multiple jQuery files.

Also you need to verify the minimum system requirements for the HTML5 Report Viewer are fulfilled.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Thom
Top achievements
Rank 1
Answers by
Thom
Top achievements
Rank 1
Stef
Telerik team
Sankar
Top achievements
Rank 1
Share this question
or