Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2004, 08:36 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crytal Report

Hello ,
I want to display crystalreport in vb.net . What i use code ?
I connect crystalreport then but i know code display crystalreport
                                       thank you Advancer

MaX77
 
Old September 2nd, 2004, 03:46 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

To display a crystal report in a windows application, you need to have a form with a crystalreportviewer control on it, then you create the crystal report, load it with data and set the reportsource of the viewer to equal the crystalreport object you've just created, i.e.:

Code:
    Public Sub PalletList(ByVal JobNumber As String, ByVal DespatchOrOutwork As Char, _
        Optional ByVal Undelivered As Boolean = False) 
        ' get the data for the report from my database object, odbops, according to the passed in parameters...
        Dim dsPallets As dsDespatch = oDbOps.GetPalletList(JobNumber, DespatchOrOutwork, Undelivered)

        ' create my report (crPalletList) and load it with data...
        Dim rptPalletList As New crPalletList
        rptPalletList.SetDataSource(dsPallets)

        ' show the report in the crystal report viewer...
        crvReport.ReportSource = report

    End Function





Similar Threads
Thread Thread Starter Forum Replies Last Post
crytal report text boxes badamsreekar Crystal Reports 0 June 15th, 2007 12:20 AM
running crytal rpt ,prompts for windows credenials alexdcosta ASP.NET 2.0 Basics 0 June 24th, 2006 02:50 PM
Crytal Report Runtime omersharp C# 2005 0 January 19th, 2006 06:36 PM
Crytal Reports 10 - Page Number Ponchhes Crystal Reports 0 September 15th, 2004 01:58 PM
How to filter Crytal report ? abdusalam VB How-To 0 June 24th, 2004 01:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.