SunQuest
 
       Database
  Home arrow Database arrow Page 4 - Generating a Multiple Table Crystal Report...
Click Here
IBM developerWorks
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 
VeriSign Whitepapers 
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? 
DATABASE

Generating a Multiple Table Crystal Report using VS 2005
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2006-11-28

    Table of Contents:
  • Generating a Multiple Table Crystal Report using VS 2005
  • Choosing a Data Connection
  • Choosing the Tables
  • Choosing Fields to Include in the 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

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    Generating a Multiple Table Crystal Report using VS 2005 - Choosing Fields to Include in the Report


    (Page 4 of 4 )

    You may highlight and transfer the fields to the Fields to Display area as shown. Only these fields will be displayed if you do not make further changes at a later date. The choices made can be modified by returning the fields back to the Available Fields area if necessary.

    Now click on the Next button. This opens up the next step of the report where you may be required to group your data based on some field.

    Defining Groups

    In this window you may also browse the data, or find a field by using the Browse Data... and Find Field... buttons. Highlighting the Customers.City in the available fields area, click on the button labeled Browse data.... This opens up a display list of all the cities as shown.

    You may also preview the report by clicking on the MainReportPreview tab (at the bottom of Crystal Report1.rpt tab) as shown in the next picture.

    You can review the grouped data on the left hand side of this report as shown and toggle the Grouping button to show the report with grouped data or ungrouped data.

    In addition to grouping you may print the data (check how many pages will print before you hit this button!), or export the report into several forms by hitting the export button. The displayed report may be zoomed as well.

    When you click on the design view of Form1 you will see an embedded CrystalReportViewer control and a CrystalReport11 (MultiTable.CrystalReport1) control in the control tray as shown. What you see in the CrystalReportViewer1 may not be completely meaningful in the design view, nor in the objects in the "Grouping area."

    The CrystalReportViewer1 control has a large number of properties which can be changed. In fact there are links which may be activated to carry out the intended modifications as shown in the properties window of this control.

    We will not be making any changes to the report viewer. Now click on the Build main menu item and run the form. The result is shown displayed in the next window. You can choose the city and the order date to find the other details as shown for the city "Bergamo" for the order date 12/14/1999. In this page you may also navigate from page to page, or look for a certain page.

    If you want to make changes to the formatting of the report, you should go first to the Main Report after clicking on the CrystalReport1.rpt. You can then make changes to the report objects. If you want to make changes to the fields from the report, for example the OrderDate, you can click on the OrderDate in Section3 (Details) and in the corresponding property window turn off the minutes and seconds from the display by choosing the crNoMinute and crNoSecond values for the MinuteType and secondType properties. Also if you take out the city field being shown in every row, you can make the report more readable.

    For formatting you can change the appropriate properties as well. Right clicking on an empty area in a section will bring up the context sensitive drop-down menu from which you can choose to carry out a variety of activities as shown.

    After manipulating the fields and formatting the report elements, the report was modified as shown in the next picture. The Crystal Report Viewer control has all the necessary elements to create a visually attractive report, although the report shown may not be the most attractive one.

    Summary

    This tutorial shows you how to create a multi-table report using the Crystal Report objects called Crystal Report and CrystalReportViewer installed with the default installation of Visual Studio 2005. The wizard makes it very easy to create a report. Modifying the report requires knowledge of the earlier versions of Crystal Report software. The various objects needed for creating an attractive report are available either through property windows or context sensitive drop-down menus.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Follow the wizard and you are done. When multiple tables feed data to the report you...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets

    BlackBerry VTS




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