Browse DevX
Sign up for e-mail newsletters from DevX


The Baker's Dozen: 13 Productivity Tips for Crystal Reports and .NET

These 13 tips show you how to build tools to address common reporting requirements for your business using Crystal Reports with .NET.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

lthough Crystal Reports provides many outstanding capabilities to help build and deliver sophisticated presentation output, I'll present a proven collection of reusable practices and methodologies that you can apply across most reporting projects to add that extra sparkle to your solutions. Building quality output is all about providing descriptive data to the reporting tool. Crystal Reports allows you to build sophisticated charts, as long as you supply the right type of information. Tips 9 and 10 demonstrate how to build different types of data-driven charts.

Beginning with the End in Mind
In the Nov/Dec issue of CoDe Magazine, I began by asking the question: what do I intend to achieve by the end of the article? This article is no different. By the time I'm finished, I'll present to you a development project in C# and a reusable set of class libraries to demonstrate the following:

  1. How to define and build a basic report using Crystal Reports.
  2. How to construct a set of generic tools to preview any report in an application.
  3. How to print reports, and how to develop some reusable printing options.
  4. How to export reports to different formats, such as PDF, Word, and Excel.
  5. How to implement multiple levels of detail using subreports.
  6. How to implement basic custom reporting techniques.
  7. How to use report formulas for run-time customization.
  8. How to implement good reporting practices, such as report style guides.
  9. How to build a data-driven stacked bar chart.
  10. How to build a report that contains both report bands and graph bands on the same page.
  11. How to generate reports with dynamic images.
  12. How to generate a report that retains rich text attributes.
  13. How to distribute Crystal Reports run-time files.
Author's Note: The reports for this development project were created with Crystal Reports 10. Although much of the content of this article also applies to the version of Crystal Reports that comes with Visual Studio .NET, the latest version of Crystal Reports is required for working with the download project.

The Development Project
Figure 1 shows the development solution I'll use to demonstrate reporting functionality. It consists of two projects. This first is a test project (CrystalReportsMainForm) with several forms for the different test reports that you'll build. The second is a generic library (ccCrystalTools) of classes to help you get productive with Crystal Reports. Figure 2 shows the main driver form that lists all of the test forms/reports referenced in this article. The entire development project can be found in the download area of my Web site at www.commongroundsolutions.net.

Figure 1.This is an expanded development solution.
Figure 2. Here is a test form with available reports.
Although these are test projects, they are intended to demonstrate common (and not so common) reporting requirements.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date