943,699 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 5126
  • C# RSS
Nov 16th, 2008
0

crystal report problem

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deepas is offline Offline
16 posts
since Sep 2008
Nov 19th, 2008
0

Re: crystal report problem

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
Click image for larger version

Name:	ODBCconn1.JPG
Views:	131
Size:	142.0 KB
ID:	8262   Click image for larger version

Name:	ODBCconn2.JPG
Views:	114
Size:	109.9 KB
ID:	8263  
Reputation Points: 10
Solved Threads: 1
Newbie Poster
EastStreetEagle is offline Offline
5 posts
since Nov 2008
Nov 20th, 2008
0

Re: crystal report problem

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deepas is offline Offline
16 posts
since Sep 2008
Nov 20th, 2008
0

Re: crystal report problem

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, 208 views)
Reputation Points: 10
Solved Threads: 1
Newbie Poster
EastStreetEagle is offline Offline
5 posts
since Nov 2008
May 7th, 2009
0

Re: crystal report problem

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jerry32uk is offline Offline
14 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: connecting a client to multiple servers
Next Thread in C# Forum Timeline: Too many Excel Process





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC