473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Crystal Report - Multiple database connections

Hello

I have a simple crystal report. Report is displayed using CrystalReportViewer control in a web form. It works fine.
There is one problem with the database connection logic. Whenever I navigate thru' report pages, it creates a new (additional) database connection. Is there any solution to avoid this?

The code is -
************************************************** ***********
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Ini
'CODEGEN: This method call is required by the Web Form Designe
'Do not modify it using the code editor
InitializeComponent(

'Create an instance of the strongly-typed report objec
crReportDocument = New Report1(

'Create a new instance of the connectioninfo object an
'set its propertie

crConnectionInfo = New ConnectionInfo(
With crConnectionInf
.ServerName = "myServer
.DatabaseName = "orcl
.UserID = "scottr
.Password = "tiger
End Wit

'Get the tables collection from the report objec
crDatabase = crReportDocument.Databas
crTables = crDatabase.Table

'Apply the logon information to each table in the collectio
For Each crTable In crTable
crTableLogOnInfo = crTable.LogOnInf
crTableLogOnInfo.ConnectionInfo = crConnectionInf
crTable.ApplyLogOnInfo(crTableLogOnInfo
Nex

CrystalReportViewer1.ReportSource = crReportDocumen

End Su
************************************************** *************

Please hel

Thank

Sameer
Jul 21 '05 #1
0 1675

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mikko Pulkkinen | last post by:
Hi, I'm trying to use Crystal Reports to generate reports from an Access database. I'm using VS2003 and C#. I need to select the database the report uses as data source at runtime. The database...
3
by: Shawn H. Mesiatowsky | last post by:
I have come across lots of information regarding this, but nothing seems to work. I have created a Crystal Report that access's a SQL server backend for the data, and I want to display the report...
1
by: Brad Allison | last post by:
Okay, after spending the past 4 1/2 hours trying to figure this out I am getting some answers but I am also getting very frustrated. And again, if this is the wrong forum to post to I apologize. ...
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
0
by: Sameer | last post by:
Hello I have a simple crystal report. Report is displayed using CrystalReportViewer control in a web form. It works fine. There is one problem with the database connection logic. Whenever I...
0
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
9
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
2
by: Tony K | last post by:
Getting the former. Not the latter. As some of you may know (Terry...btw thanks for all your help), I have been battling a Crystal Reports problem. I have recently made the discovery that my...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.