crystal report problem

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 13
Reputation: deepas is an unknown quantity at this point 
Solved Threads: 0
deepas deepas is offline Offline
Newbie Poster

crystal report problem

 
0
  #1
Nov 16th, 2008
hi,
i'm beginner in c#.net & currently working for a windows application.i have problem to customize the report in the crystal report and also everytime i run the code it asks for connection info which i had assigned during design time.Any help in this regard is appreciable.
thanks
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 5
Reputation: EastStreetEagle is an unknown quantity at this point 
Solved Threads: 1
EastStreetEagle EastStreetEagle is offline Offline
Newbie Poster

Re: crystal report problem

 
0
  #2
Nov 19th, 2008
Hi Deepas,

Just like you i have to call crystal reports from C#.NET from time to time. I'm not the great expert myself but I'll share my knowledge as much as i can:

The way you describe your problem, it seems to me the problem is situated in the database connection of the crystal report. Our crystal reports use ODBC-connections with windows-authentication (to SQL Server 2005). This way we never get dialog boxes to enter usernames or passwords.

So if you open the datasource location-screen, you can add a new ODBC (RDO) connection. In the ODBC(RDO) screen you select the needed ODBC-connection (see attachment 1). In the next screen you select the database and check "trusted connection" (see attachment 2).

With this type of connection you should be able to open your reports without any trouble. By the way, I have the dutch version of crystal reports installed on my computer so I don't know exactly some names and screen titles in the english version.

Hope this is helpful
Attached Thumbnails
ODBCconn1.JPG   ODBCconn2.JPG  
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 13
Reputation: deepas is an unknown quantity at this point 
Solved Threads: 0
deepas deepas is offline Offline
Newbie Poster

Re: crystal report problem

 
0
  #3
Nov 20th, 2008
hi EastStreetEagle
While making connection with ODBC,it didn't showed sql database.so how can i make connection with that,attachments are also not clear.In your attachement you've so many options to select which in my case is only 4(No sql) in the option.Kindly advise me
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 5
Reputation: EastStreetEagle is an unknown quantity at this point 
Solved Threads: 1
EastStreetEagle EastStreetEagle is offline Offline
Newbie Poster

Re: crystal report problem

 
0
  #4
Nov 20th, 2008
Hi again Deepas,

Obviously I skipped a few steps.

When you make an ODBC-connection, you determine to which SQL Server it points to. So when you select the ODBC-connection in your crystal report afterwards, you actually also select your SQL Server. If you don't know how to make an ODBC-connection, look at the attachment of this post. Each image is a printscreen of every screen, the textfile give extra comment to each image (I couldn't upload it in a word-file so I had to do it this way). It takes about 2 to 3 minutes.

Keep in mind that when you install your application on multiple computer, you have to make the same ODBC-connection on each computer.

The reason why I had so many options in the listbox on the printscreen on my previous post is that I had to make an ODBC-connection for multiple customers each. The moment you make an ODBC-connection on your computer, that same connection will also be available.

Hope you get any further

EastStreetEagle
Attached Files
File Type: zip CreatingODBCConnection.zip (316.8 KB, 25 views)
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: jerry32uk is an unknown quantity at this point 
Solved Threads: 0
jerry32uk jerry32uk is offline Offline
Newbie Poster

Re: crystal report problem

 
0
  #5
May 7th, 2009
You can pass connection information dynamicall y to the crystal reports with the help of ConnectionInfo class.

ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "YOUR SERVER NAME";
crConnectionInfo.DatabaseName = "YOUR DATABASE NAME";
crConnectionInfo.UserID = "YOUR DATABASE USERNAME";
crConnectionInfo.Password = "YOUR DATABASE PASSWORD";

Then it wont ask the information anymore.

full source code

http://csharp.net-informations.com/c...amic-login.htm

jr.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC