ASP.NET
  Home arrow ASP.NET arrow Object-Oriented Report Development using C...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Object-Oriented Report Development using Crystal Reports and ASP.NET 2.0
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2007-08-20

    Table of Contents:
  • Object-Oriented Report Development using Crystal Reports and ASP.NET 2.0
  • The DBHelper class for interacting with the database
  • Developing classes to hold information from the database
  • Adding a Factory class to populate object collection

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Object-Oriented Report Development using Crystal Reports and ASP.NET 2.0


    (Page 1 of 4 )

    This is the fourth article in a series focusing on programming with Crystal Reports and ASP.NET 2.0. In this article, we will focus on implementing an object-oriented approach for creating and developing Crystal Reports using ASP.NET 2.0 and Visual Basic 2005.
    A downloadable zip file is available for this article.

    If you are new to Crystal report programming, I strongly suggest that you go through the following articles:

    Programming Crystal Reports with ASP.NET 2.0

    Working with Parameters with Crystal Reports and ASP.NET 2.0

    If you are new to OOP-based database applications in Visual Basic 2005, I further suggest that you read the following article: 

    Implementing OOP to Develop Database-Oriented Applications using VB.NET 2005

    The entire solution (source code) for this article is available as a free download (in the form of a zip). The source code in this article has been developed using Microsoft Visual Studio 2005 Professional Edition on Microsoft Windows XP Professional Edition with Microsoft SQL Server 2005 Express Edition.  I used the same version of Crystal Reports which comes with Visual Studio 2005 Professional Edition.  I didn't really test any of the code in any other tools/IDEs/servers/editions/versions. If you have any problems, please feel free to post in the discussion area.

    The approach for mixing business logic-based OOP with Crystal Reports

    Almost every .NET application is object oriented. We develop several classes involving different OOPS concepts such as inheritance, polymorphism, and so on to make applications more scalable, readable and easier to maintain. Most of these classes fall into either business logic or data access layers.

    Furthermore, we even implement a few types of patterns suggested by experts to solve the most common integration problems. The best example of this is Microsoft Enterprise Library. The pattern-oriented library is divided into several blocks and each block focuses on a particular type of module.

    All of the above methodologies are quite familiar during .NET application development. But, coming to Crystal Report development, developers take advantage of different approaches to make it easier to maintain. Most of those approaches directly use databases as data sources.

    When we maintain all our data access and business logic in the form of different classes, why can’t we use the same classes for report development as well? This approach would work well when we try to have reports embedded as part of our application, and this may not be suitable (or practical) to deploy with Crystal Servers.

    I must also agree that performance would be an issue. Performance tuning a report is not simply related to the report. We may need to tune a database (or data) with different approaches to get the reports out more quickly. Most people use stored procedures, indexed views, and so on to improve the performance of reports.

    Considering all of the above issues, I would like to present a simple approach which marries business logic classes with Crystal Reports. In my approach, I would like to introduce the following four classes:

    • DBHelper
    • Order
    • OrderCollection
    • OrderFactory

    "DBHelper" is meant only to interact with databases. "Order" contains detailed information about a particular order from the "Northwind" database.  "OrderCollection" simply maintains a set of orders. "OrderFactory" populates the "OrderCollection."

    Please note that this approach may not be suitable for every application or report you develop. It totally depends on issues such as requirements, performance, maintenance, administration, scheduling, and so forth. 

    Let us observe the code of each of those classes before looking at report development.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys,This is my next contribution on the series of "Programming Crystal...
     

    ASP.NET ARTICLES

    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...
    - Order-Related Modules for an ASP.NET AJAX Se...
    - User and Role Management for an ASP.NET AJAX...
    - Programming an ASP.NET AJAX Server-Centric B...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway