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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
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

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: 5 stars5 stars5 stars5 stars5 stars / 8
    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...
     

    ASP.NET ARTICLES

    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - 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...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT