ASP.NET
  Home arrow ASP.NET arrow Page 5 - Working with ADO.NET Datasets and .NET Obj...
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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

Working with ADO.NET Datasets and .NET Objects 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 / 15
    2007-08-06

    Table of Contents:
  • Working with ADO.NET Datasets and .NET Objects using Crystal Reports and ASP.NET 2.0
  • Adding a strongly typed dataset to the project: designer code
  • Binding the Crystal Report with a strongly typed dataset
  • .NET objects as data sources to Crystal Reports: adding an entity class
  • .NET objects as data sources to Crystal Reports: adding a collection class
  • .NET objects as data sources to Crystal Reports: adding and binding a crystal report

  • 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


    Working with ADO.NET Datasets and .NET Objects using Crystal Reports and ASP.NET 2.0 - .NET objects as data sources to Crystal Reports: adding a collection class


    (Page 5 of 6 )

    In previous section, we added a class which holds only one row of information from the "Orders" table (but with few fields).  Now, we are adding one more class to hold a set of rows from the "Orders" table based on the "Order" entity class.  This class must be named "Orders.vb" and must inherit from the "CollectionBase" class (part of the .NET Framework Class Library).

    Add a new class named "Orders.vb" and copy the following code:

    Imports Microsoft.VisualBasic

     

    Public Class Orders

      Inherits CollectionBase

     

      Public Sub add(ByVal e As Order)

        List.Add(e)

      End Sub

     

      Public Sub delete(ByVal e As Order)

        List.Remove(e)

      End Sub

     

      Public Sub delete(ByVal index As Integer)

        If index < 0 Or index > List.Count - 1 Then

          Throw New Exception("Invalid index to remove")

        End If

        List.RemoveAt(index)

      End Sub

     

      Default Public Overridable ReadOnly Property Item(ByVal index As Integer) As Order

        Get

          Return CType(Me.List(index), Order)

        End Get

      End Property

     

    End Class

    It is basically a collection class which holds a group of objects related to the "Order" class.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys,This is my third article focusing on "Programming with Crystal...
       · Hi,how we can use .net objects in crystal reports.
       · i have a question,how can we add .net objects and align them in the designer...
       · Hi, the tutorial works fine with only one datasource and one .xsd but when I try to...
     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek