none
Passing a existing report to the ReportViewer control RRS feed

  • Question

  •  

    We have a need to a display a generated report within a web application.  We are using SRS to generate the report and are saving the output to a file. We then want to be able to load this file and display it in an interactive way using the ReportViewer.   Is there a way to pass in a byte stream to the ReportViewer control for display instead of having the ReportViewer make a call to the Report Server?  We basically want to load the report file and display it, even if we do not have access to the Report Server at that time.
    Thursday, September 6, 2007 3:52 PM

Answers

  • Build a wrapper around the ReportViewer and consider it to be your provider access point.  That's what it really is.  The ReportViewer control isn't "bypassing the technology agnostic services"; it is in itself not technology-agnostic <s>.  It is part of one of your specific providers.

     

    >L<

     

     

    Monday, September 10, 2007 8:35 PM

All replies

  • Maybe I'm missing something, as I'm not a web dev nor have I worked with the server-side ReportViewer stuff...

     

    However, in simple terms perhaps you could fashion a solution based on generating the reports, exporting to a convenient format (pdf, etc), and then at runtime load (send off) the (pre-generated) pdf (whatever)???

    Thursday, September 6, 2007 7:40 PM
  • One thing that's not clear to me (again, based on my non-web-dev take on things)...

     

    It doesn't make sense to me to ask that a ReportServer based implementation load and process a report when the server itself is not available. The chronology doesn't make sense to me. Or perhaps I'm missing the forest for the trees...

     

     

     

    Thursday, September 6, 2007 7:46 PM
  •  

    Thanks for the response and sorry to be confusing.  What we would like to be able to do is to allow the the user to select a previously generated HTML report that has been persisted to the the file system and be able to utilize the interactive nature of the ReportViewer control to navigate within the report.  Therefore, we would like our application to be able to load the report from the file system, and pass the byte array to the control for rendering.  Becuase of the nature of the security infrastructure (trusted subsystem), we can't point the control directly to a file share.

    Monday, September 10, 2007 1:53 PM
  • Thanks for clarifying... So basically you are wanting to present previously-generated reports, however you want the advantages of presenting the report via the reportviewer control at runtime.

     

    You're well outside my depth at this point (as I said, no web/server-based experience), perhaps someone else can help you out...

     

    Monday, September 10, 2007 4:04 PM
  • hi there,

     

    Why are you caching the HTML yourself?  Why not do this using cached reports via RS's mechanism for this?  Isn't this going to give you exactly what you are looking for?

     

    (check out the "Execution" tab for Properties in the Report Manager for a report)

     

    >L<

     

    Monday, September 10, 2007 4:15 PM
  • The service that we are building abstracts away the specific reporting engine that is being utilized.  We are providing a common service that will allow applications to utilize multiple reporting providers.  Therefore we are trying to avoid using any technology specific implementations.  It appears that the ReportViewer control call directly into the SSRS web services, thus bypassing the technology agnostic services.  We would like to be able to generate the report with out services and pass the report output to the ReportViewer for display. We will know the provider that is being utilized and thus, be able to say, this is a report generated by SRS in the HTML format so display it in the ReportViewer or this is a report generated by X report provider so render it like this, etc. 

    Monday, September 10, 2007 7:20 PM
  • Build a wrapper around the ReportViewer and consider it to be your provider access point.  That's what it really is.  The ReportViewer control isn't "bypassing the technology agnostic services"; it is in itself not technology-agnostic <s>.  It is part of one of your specific providers.

     

    >L<

     

     

    Monday, September 10, 2007 8:35 PM
  • Hey there!

     

    Did you ever get an answer to this? We are doing precisely the same thing (a centralized technology-agnostic reporting broker), and it would be ideal to be able to simply assign built array (as a stream, byte[], etc) to the Report Viewer.

     

    thanks

    J

     

    Tuesday, September 11, 2007 7:27 PM
  • Hey Jason,

     

    Does my answer make sense to you, or possibly not <s>?

     

    The point is that the ReportViewer is part of the provider, not part of your technology-agnostic interface. Why not treat it that way?

     

    >L<

     

    Tuesday, September 11, 2007 7:34 PM
  • Yes.  Thank you.  Now that I think about it, my proposed solution does not really provide an technology agnostic

    answer. 

    Wednesday, September 26, 2007 2:34 AM