cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC Datasource and .NET C#

Former Member
0 Kudos

I am using CR 2008 with C#. I use ODBC to connect to the data source. When the report is opened from the winforms application, it is prompting for the userid and password.

1. How do I programatically assign a ODBC DSN

2. Provide userid/password etc.

I used CR 8.5 with VB 6.0 and there is a connect method.

CrystalReport1.Connect and the ODBC connect string could be

provided. I don't see it with CR 2008.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

take help from samples and tutorials.

To download sample code click [here|https://boc.sdn.sap.com/codesamples].

You can also take help from [Dev library|https://boc.sdn.sap.com/node/7770]

for log on code u can use

setDatabaseLogOn("userid","password");

after loading report

what version of .NET you are using

Hope this helps!!

Regards,

Amit

Edited by: Amit Singh on Oct 8, 2008 9:44 PM

Former Member
0 Kudos

I am using .NET 3.5 with C# 2008 adn Winform application

I am displaying the report in the crystal viewer

The report is developed using ODBC DSN.

Code is

CRViewer.ReportSource = "C:\....";

CRViewer.Show();

How to set SetDatabaseLogon fits in this scenario?

former_member183750
Active Contributor
0 Kudos

Benny, see the following White Paper that details how to work with CR in .NET:

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

The above was written for CR 10.2, however all content applies to your version of Crystal Reports.

You may also want to consult the developer help file:

http://msdn2.microsoft.com/en-us/library/bb126227.aspx

Ludek

Answers (0)