on-internet
← Community

Web API and report viewer

Stack Overflow ·

I have a requirement to produce within a Web API a service that will return a pdf of a local report viewer file. In MVC you can do something like this using FileResult but i'm struggling to replicate this as a HttpResponseMessage. Has anybody ever tried or had success in trying to do anything similar? All my attempts in trying toconvert the byte[] to a stream and then output as an HttpResponse have ended up with empty files. public FileResult File() { // Create a new dataset StudentDataSet ds = new StudentDataSet(); // Create and fill the Student data table // using the Student table adapter S

Comments

Sign in or sign up to comment and upvote.

No comments yet.