Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

December 19, 2010

Reporting in .NET Part II

Filed under: C#,Reporting,VB.NET @ 12:40 am

This prior post covers the steps for building and displaying a report in .NET. But how often do you need just one report? Normally, you need to build several if not many reports. That brings up several issues:

  • How do you set a style that you can reuse for every report?
    • It would be nice to set fonts, styles, colors, and so on to ensure that the reports all look similar.
  • How do you set up reusable text for the report?
    • For example, a standard header or standard end of report text.
  • How do you ensure that the reports are the same standard size?
    • You may want two standard sizes: one for portrait and one for landscape.

Seems like a reasonable set of questions. The disappointing part is that there are no great answers when using Visual Studio’s reporting services.

Here are some options:

  1. Build a template.
  2. Use expressions.
  3. Update the XML at design time.
  4. Update the XML at run time.

There is no style sheet for a report like in ASP.NET, WPF, or Silverlight. There is no ability to write code to work with the controls on the report beyond the capabilities of expressions. None of the above options is perfect, but they each provide some features to help you reuse parts of your reports.

Enjoy!

2 Comments

  1.   elw — December 20, 2010 @ 4:15 am    Reply

    A very firstly honest answer toward Microsoft Product and also answer my question.

    Great job.

  2.   Rostov — December 20, 2010 @ 8:50 am    Reply

    I’ve really wanted to explore the reporting there much more but have never had time to.

    For many of the projects I’ve worked on recently we’ve simply used HTML reports: using a custom little set of in-house tools to generate simple reports out as HTML.

RSS feed for comments on this post. TrackBack URI

Leave a comment

*

© 2014 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs