VB.Net-Informations.com
   Home      .Net Framework      VB.NET      C#                                                                      About


  VB.NET Crystal Reports Summary Fields

All Crystal Reports programming samples in this tutorials is based on the following database (crystaldb) . Please take a look at the database structure before you start this tutorial - Click here to see Database Structure .

In this tutorial we are taking the sum of field value of Total . This is the continuation of the previous tutorial Crystal Report Formula Field . So before we start this tutorial , take a look at the previous tutorial Crystal Report Formula Field.

Here we are taking the grand total of the Total field . The Total field is a Formula field is the result of qty X price .

In the Crystal Reports designer view right click on the Report Footer , just below the Total field and select Insert -> Summary .

vb.net_crystal_report_summary_field_1.GIF

Then you will get a screen , select the Total from the combo box and Sum from next Combo Box , and summary location Grand Total (Report Footer) . Click Ok button

vb.net_crystal_report_summary_field_2.GIF

Now you can see @Total is just below the Total field in the report Footer.

vb.net_crystal_report_summary_field_3.GIF

Now the designing part is over . Select the default form (Form1.vb) you created in VB.NET and drag a button and CrystalReportViewer control to your form.

Select Form's source code view and import the following :

Imports CrystalDecisions.CrystalReports.Engine

Put the following source code in the button click event

         VB.NET Source Code Download           Print Source Code
         VB.NET Crystal Reports Summary Fields - Download
        
C# Tutorial

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        Dim cryRpt As New ReportDocument
        cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")
        CrystalReportViewer1.ReportSource = cryRpt
        CrystalReportViewer1.Refresh()
    End Sub
End Class

NOTES:
cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")

The Crystal Report is in your project location, there you can see CrystalReport1.rpt . So give the full path name of report here.

When you run this program you will get the following screen.

vb.net_crystal_report_summary_field_4.GIF



VB.NET Crystal Reports Related Contents
*     Sample Database and tables for Crystal Reports tutorials
*     Step by Step help for creating a simple Crystal Reports in VB.NET
*     VB.NET Crystal Reports from multiple tables
*     VB.NET Crystal Reports String parameter
*     VB.NET Crystal Reports Integer parameter
*     VB.NET Crystal Reports Date parameter
*     VB.NET Crystal Report Load Dynamically
*     VB.NET Crystal Reports Formula Fields
*     VB.NET Crystal Reports Export to PDF
*     VB.NET Crystal Reports Export to Excel
*     Email a Crystal Reports from VB.NET
*     Crystal Reports Without Database
*     Crystal Report from SQL Query String
*     Dynamic Crystal Reports from SQL Query String
*     Crystal Reports from XML File
*     Create a Subreport in Crystal Reports
*     Create a Subreport in Crystal Reports with Link
*     How to deploy Crystal Reports on Clinet Machine
*     How to create Crystal Reports installer using Merge Modules


   Home      VB.NET      C#
VB.Net Related Topics
*     Microsoft .Net Framework Tutorials
*     VB.NET Language Basics Tutorials
*     VB.NET Program Flow Control Tutorials
*     VB.NET Collections Tutorials
*     VB.NET String Tutorials
*     VB.NET Files Tutorials
*     VB.NET Excel 2007 Tutorials
*     VB.NET Crystal Reports Tutorials
*     VB.NET Communications Tutorial
*     VB.NET ADO.NET Tutorial
*     ADO.NET Data Providers help and Tutorial
*     VB.NET ADO.NET Dataset Tutorial
*     ADO.NET DataAdapter and Dataset
*     VB.NET ADO.NET DataView Tutorial
*     VB.NET Remoting Tutorial
*     VB.NET XML Tutorial
*     VB.NET DataGridView Tutorial
   Home      VB.NET      C#
More Source Code :   
Mail to :  feedback@net-informations.com
  |  Home   |  VB.NET   |  C#   |  SiteMap   |  Terms of Use   |  About   |
net-informations.com (C) 2010
All Rights Reserved. All other trademarks are property of their respective owners.