PC Review


Reply
Thread Tools Rate Thread

Crystal Report - Database Connection

 
 
=?Utf-8?B?U2FtZWVy?=
Guest
Posts: n/a
 
      28th Jan 2004
Hello
I have created simple crystal report and I can view it succesfully using CrystalReportViewer. The code I use i

***************************

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
Dim myReport As New Test1(
LogonToDatabase(myReport, "scott", "tiger"
CrystalReportViewer1.ReportSource = myRepor
End Su

***************************

Private Sub LogonToDatabase(ByVal myReport As CrystalDecisions.CrystalReports.Engine.ReportDocument,
ByVal UserId As String, ByVal Password As String
Dim myLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo(
Dim mytable As CrystalDecisions.CrystalReports.Engine.Tabl
For Each mytable In myReport.Database.Table
myLogonInfo = mytable.LogOnInf
With myLogonInfo.ConnectionInf
.UserID = UserI
.Password = Passwor
End Wit
mytable.ApplyLogOnInfo(myLogonInfo
Next mytabl
End Su

***************************

My problem is whenever I execute different reports, the above code create a new database connection as coded obviousely. Is there any other method where I can use existing connection and pass it to "myLogonInfo". I do not want to use DataSet or any other method (XML). Is there any way I can use my application's database connection to execute crystal report or use only one connection to execute multiple crystal reports in a session

Many Thanks in advanc

Sameer
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error about connection of crystal report ray Microsoft VB .NET 0 2nd May 2007 12:00 PM
how to logoff crystal report database connection Venkatesha R Microsoft Access Reports 0 17th Jan 2005 07:20 AM
Untyped Crystal report database connection Info =?Utf-8?B?U3RlZGFr?= Microsoft Dot NET 0 9th Dec 2004 04:55 PM
Connection on Crystal report =?Utf-8?B?QWxlc3NhbmRybyBSb3NzaQ==?= Microsoft ADO .NET 2 24th May 2004 09:13 PM
Crystal Report Database Connection =?iso-8859-1?Q?Alfons_Str=F6bele?= Microsoft ADO .NET 1 27th Dec 2003 09:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 AM.