| | |
Error While Declaring Crytal Report Object
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2005
Posts: 8
Reputation:
Solved Threads: 0
How can I integrate Crystal Report 9 along with VB.net (Version 2003). Is it possible to create CR based report in VB.Net? or I've to chose another reporting tool. Plz kindly reply me as soon as possible.
It gives error when I declear CR9 object.
Dim report as new CrystalReport
Which class or library I've to import to ceate CR object. All CR refrences has been added.
It gives error when I declear CR9 object.
Dim report as new CrystalReport
Which class or library I've to import to ceate CR object. All CR refrences has been added.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
via a google search since I am work with none of my references.
But I would give them a try!
Imports CrystalDecisions.Shared
via a google search since I am work with none of my references.
But I would give them a try!
•
•
Join Date: Apr 2005
Posts: 8
Reputation:
Solved Threads: 0
I've already Imports thses two files. But here is still an error while declaring CR Object.
Dim report as New CrystalReport(It doesn't show the CrystalReport1 class pressing space after New).
If you've any sample program in which you access crystal report in VB.Net, so please send it to me, it will be more helpfull for me and I'll be very thanxfull to you.
Dim report as New CrystalReport(It doesn't show the CrystalReport1 class pressing space after New).
If you've any sample program in which you access crystal report in VB.Net, so please send it to me, it will be more helpfull for me and I'll be very thanxfull to you.
•
•
Join Date: Apr 2005
Posts: 8
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Paladine
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
via a google search since I am work with none of my references.
But I would give them a try!
--------------------------------------------------------------------------------
I've already Imports thses two files. But here is still an error while declaring CR Object.
Dim report as New CrystalReport(It doesn't show the CrystalReport1 class pressing space after New).
If you've any sample program in which you access crystal report in VB.Net, so please send it to me, it will be more helpfull for me and I'll be very thanxfull to you.
Sure do. Here is the code:
Hope this helps...
Imports System.Web.Security ' ||||| Required Class for Authentication Imports System.Data ' ||||| DB Accessing Import Imports System.Data.OleDb ' |||||| Access Database Required Import! Imports System.Configuration ' |||||| Required for Web.Config appSettings ||||| Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Imports CrystalDecisions.ReportSource Public Class _1997Sales Inherits System.Web.UI.Page ' ||||| Database Connection Object ||||| Dim MyConn As OleDbConnection = New OleDbConnection(ConfigurationSettings.AppSettings("strConn")) #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Protected WithEvents CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'If Not Page.IsPostBack Then CreateReport() 'End If End Sub Private Sub CreateReport() Dim objReport As New Sales1997 Dim myResults As CrystalDecisions.CrystalReports.Engine.Table Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo For Each myResults In objReport.Database.Tables myLogin = myResults.LogOnInfo myLogin.ConnectionInfo.UserID = "admin" myResults.ApplyLogOnInfo(myLogin) Next CrystalReportViewer1.ReportSource = objReport End Sub End Class
Hope this helps...
![]() |
Similar Threads
- CrystalReports.Engine: Load report failed (ASP.NET)
- 'Object variable or With block variable not set' Error (ASP.NET)
- Error while declaring Crystal Report Object (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: To display an icon in a datagrid
- Next Thread: Creating new controls through code.
Views: 7891 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access account application array arrays basic beginner browser button buttons center checkbox client code convert cuesent data database datagrid datagridview date datetimepicker design designer dissertation dissertations dissertationtopic eclipse excel fade filter forms generatetags gridview html images input insert intel internet lib listview mobile monitor net objects open panel passingparameters pdf picturebox port position print printing problem read remove richtextbox save searchvb.net select serial settings shutdown sorting sqlserver studio survey table temperature textbox time timer timespan transparency update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms wpf wrapingcode year





