473,396 Members | 1,847 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,396 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 1673

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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.