473,761 Members | 9,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Report - Multiple database connections

Hello

I have a simple crystal report. Report is displayed using CrystalReportVi ewer 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.EventArg s) Handles MyBase.Ini
'CODEGEN: This method call is required by the Web Form Designe
'Do not modify it using the code editor
InitializeCompo nent(

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

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

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

'Get the tables collection from the report objec
crDatabase = crReportDocumen t.Databas
crTables = crDatabase.Tabl e

'Apply the logon information to each table in the collectio
For Each crTable In crTable
crTableLogOnInf o = crTable.LogOnIn f
crTableLogOnInf o.ConnectionInf o = crConnectionInf
crTable.ApplyLo gOnInfo(crTable LogOnInfo
Nex

CrystalReportVi ewer1.ReportSou rce = crReportDocumen

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

Please hel

Thank

Sameer
Jul 21 '05 #1
0 1726

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

Similar topics

0
1822
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 does not have any password protection. I've tried using ODBC connections, but all I get is logon errors. It seems that I should be able to pass a connection string in
3
2884
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 via a webform and the CrystalViewer Web Component. First of all, I have been using Trusted Connections so far (for data access) and really do not want to have some static login information in my web app. but most of the documents so far have...
1
1408
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. Why can I not use Crystal Reports to show data from a simple dataset? The problem I have is that when the report tries to access the data, I get a database login screen. It was suggested I use ODBC instead of OleDB (as I have been using - it...
17
8451
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 using crystal reports 9 and vb.net and we're using the crystalrepotViewer to show our reports. But every time we open a report the connection to or sql server remains, so if I open 5 forms with the report viewer I've got 5 sleeping connections in...
0
375
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 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,...
0
2272
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 SQL Server DB (pull method). 3.)The Stored Proc has two input parameters of type date. 4.)The Stored Proc is a rather complex proc that was not written by me, but does work(see next item). It currently returns about 13K rows of data. 5.)The...
9
8273
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 reporting needs. I was wondering if anybody has an opinion on how the new reportViewer control works in comparison to Crystal. One of the main problems I have been having with Crystal Reports is that they seem to load very slow no matter how small the...
2
1450
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 "Current Connections" or ADO.NET options for the database expert in CR are not working with my project. IF I create a new connection to my Access DB(DAO) or use OLE DB(ADO) connection I will receive correct data (results) on my report for the...
8
3086
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 reflect the values they anticipate committing to see hypothetical totals of columns from a set of records. These records are displaying properly on my DataGrid but I'm not sure how to get Crystal Reports 10 to use as its datasource the dataset...
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8813
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.