473,406 Members | 2,713 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,406 software developers and data experts.

How to change logon information in crystal reports at runtime

I am using pull model in crystal reports.For simplicity I
m using only one table in SQL Server. I have tried
following code to change my database:
ConnectionInfo ci = new ConnectionInfo();
ci.ServerName = Changed_SERVER_NAME;
ci.DatabaseName = Changed_DATABASE_NAME;
ci.UserID = Changed_DATABASE_USER_NAME;
ci.Password = Changed_DATABASE_PASSWORD;
TableLogOnInfo li = new TableLogOnInfo();
li.ConnectionInfo = ci;
li.TableName = ChangedTableNameButSameStructure;
MyRep.Database.Tables[i].ApplyLogOnInfo(li);
crViewer.ReportSource = MyRep;
But when i view the report using crystal report viewer
control it shows me records of that table to which it was
connected to, when the report was designed.

Can anyone provide me help on this issue? Or tell me any
other way to change logon information, database and tables
at run time(in pull model)?
Thanx
munish
Jul 21 '05 #1
1 8352
Hi Munish,

You might want to look at the microsoft.public.vb.crystal newsgroup. This
question has been answered many times there. Brian Bischof also has an
online book that explains it really well at
http://www.crystalreportsbook.com/Ch...GN=NGCR_031503

David Straker

"munish" <mu**************@hotmail.com> wrote in message
news:07****************************@phx.gbl...
I am using pull model in crystal reports.For simplicity I
m using only one table in SQL Server. I have tried
following code to change my database:
ConnectionInfo ci = new ConnectionInfo();
ci.ServerName = Changed_SERVER_NAME;
ci.DatabaseName = Changed_DATABASE_NAME;
ci.UserID = Changed_DATABASE_USER_NAME;
ci.Password = Changed_DATABASE_PASSWORD;
TableLogOnInfo li = new TableLogOnInfo();
li.ConnectionInfo = ci;
li.TableName = ChangedTableNameButSameStructure;
MyRep.Database.Tables[i].ApplyLogOnInfo(li);
crViewer.ReportSource = MyRep;
But when i view the report using crystal report viewer
control it shows me records of that table to which it was
connected to, when the report was designed.

Can anyone provide me help on this issue? Or tell me any
other way to change logon information, database and tables
at run time(in pull model)?
Thanx
munish

Jul 21 '05 #2

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

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
0
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is...
0
by: Mukesh Kumar | last post by:
hi all, I have created some independent reports through crystal reports developer edition v 10 and developed a small tool in .net framework v 1.1 to view these reports through the crystal reports...
0
by: google | last post by:
My Crystal reports are being supplied the logon credentials via a C# code class that recursively loops through all the tables present in the reports and applies the login credentials (Servername,...
2
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and...
3
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to...
0
by: Ben | last post by:
Hi We have been developing an intranet using VB .NET displaying crystal reports. We repeatedly receive the error below on both the development machine and the deployment server: I have...
19
by: Michael O'Donnell | last post by:
Hi All Am having major problem with crystal reports...Have designed my report no problem, its when I try to run and display ther report that I am getting a "Login Failed" message. At first I...
1
by: munish | last post by:
I am using pull model in crystal reports.For simplicity I m using only one table in SQL Server. I have tried following code to change my database: ConnectionInfo ci = new ConnectionInfo();...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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.