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

Crystal Reports Logon dialog

Greetings,

I have a Sql server database and it's using trusted connection...
I built a crystal report with the wizard and using the ODBC Data Source
connection string to get the data...

Now I am using some code behind to do the logon automatically if we change
the datasource... it's something like this:

OdbcConnection oConn = new OdbcConnection(Common.Global.sConnString);

oConn.Open();
ApplyCRLogin _applyLogin = new ApplyCRLogin();
_applyLogin._dbName = oConn.Database;
_applyLogin._serverName = oConn.DataSource;
_applyLogin.ApplyInfo(oRpt);
_applyLogin = null;
oConn.Close();

public class ApplyCRLogin
{
public string _dbName;
public string _serverName;
public string _userID;
public string _passWord;

public void ApplyInfo(CrystalDecisions.CrystalReports.Engine.R eportDocument
_oRpt)
{
CrystalDecisions.CrystalReports.Engine.Database oCRDb =
_oRpt.Database;
CrystalDecisions.CrystalReports.Engine.Tables oCRTables =
oCRDb.Tables;

CrystalDecisions.Shared.TableLogOnInfo oCRTableLogonInfo;
CrystalDecisions.Shared.ConnectionInfo oCRConnectionInfo =
new CrystalDecisions.Shared.ConnectionInfo();
oCRConnectionInfo.DatabaseName = _dbName;
oCRConnectionInfo.ServerName = _serverName;

oCRConnectionInfo.IntegratedSecurity = true;
foreach (CrystalDecisions.CrystalReports.Engine.Table
oCRTable in oCRTables)
{
oCRTableLogonInfo = oCRTable.LogOnInfo;

oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo;
oCRTable.ApplyLogOnInfo(oCRTableLogonInfo);
}
}

}

This was supposed to solve the problem but the dialog is appearing always...

How can I solve this?

Thanks in Advance
May 3 '06 #1
0 1154

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

Similar topics

2
by: Jonathan | last post by:
Hi all, It's my first post here, so be kind :) I got a little application that keep track of a small inventory, everything was going great until came the time to make some types of reports. I...
2
by: Ed Crowley | last post by:
How do you use a stored procedure as the datasource for a report in Crystal Reports .NET for C#?
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,...
1
by: codepuller | last post by:
Consider this approach: Embed the report in your project (add it to the project) Then put this code in the page that holds the viewer control 'Set the connection information...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
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...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.