Extending the LocalReport class

I am considering using the localreport class to do my reporting on a project that I'm currently working on.  I was originally going to use ReportServer Express, but that seems to have a lot more overhead, but doesn't really have too many more features than does the localreport class to offset the cost of the overhead.

The one feature that localreport is missing that I need is the ability to export to an HTML format.  Seeing as how that isn't included in the release, I was curious as to whether there was any way to generate the HTML rendering myself.  I wanted to ask what my options are in this case.

My initial thinking was maybe extending the localreport class itself, and overriding the Render function.  In the case that a rendering supported by localreport directly was asked for, I could just execute the render of the base class (localreport).  In other cases (I'm also planning to support some plain text as XML and CSV), I could let the derived class do the rendering.  I don't have the docs for LocalReport in front of me, so I don't know whether localreport is defined as sealed or not.  Is something like this possible   I would like to get an answer from those who know if I can before investing the time on a snipe hunt!

If that is possible, what help would I get from the base class   Could I get it to parse the RDLC file into an object model so that I could render that model instead of parsing the RDLC myself   Are there any methods that could help me to render the charts into a graphic of some kind that I could save off to a file and link to in my HTML

If that's not possible, what other recourse do I have

Thanks ahead of time for any insight that fellow developers could share on my dilema.




Answer this question

Extending the LocalReport class

  • pyromaster64

    Is there anything stopping me from deriving from Report (since LocalReport is sealed)   I understand that I will have to deserialize the RDL myself and perform all of the rendering, but I'm willing to undertake that for the formats I'm interested in supporting.

    What I'm aiming for is a class that will work similar to LocalReport, but will provide me with my own custom rendering.  This will allow the code in the calling class to be more consistent in all renderings.

    Thanks.

  • Alexandre Leite

    I whole-heartedly agree that Report Server is the best way to go.  I have been limited to using the report controls due mostly to the fact that it isn't feasible to require our customers to install IIS to use our reporting.  I would love to take advantage of the features offered by standard Report Server, believe me!

    With that in mind, is there any reason anyone can think of that would prevent me from doing what I have described

    I did have one more question, LocalReport class is going to be instantiatable by release time, right

    Thanks for all of the responses.

    This forum is an incredibly helpful resource.

    Thanks.

  • schliden

    This is not supported, unfortunately.
  • R055

    The Report and LocalReport classes were not designed with extensibility in mind. We expect customers who need extensibility to use Report Server. Since we don't test the scenario you are describing I can't tell you whether or not the approach will be successful.


  • Victor De La Oliva

    LocalReport is sealed, so you won't be able to derive from it.  But even if you could, local processing does not expose the rendering object model to you to create a custom renderer.  This type of extensibility is exactly what the server is for and simply isn't supported in local mode.

  • Extending the LocalReport class