| | |
crystal report problem
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 1
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
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
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 1
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
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
•
•
Join Date: Apr 2008
Posts: 9
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Crystal Report problem (VB.NET)
- Problem with Crystal Report in ASP.NET (ASP.NET)
- How to connect Crystal Report 8.5 to VB 6 (VB.NET)
- crystal report problem (PHP)
- How to export CRYSTAL REPORT to PDF format. (Visual Basic 4 / 5 / 6)
- Crystal Report Design!!!!! (VB.NET)
- Dynamic crystal report with VB4/5/6 (Visual Basic 4 / 5 / 6)
- Crystal Report Problem (ASP.NET)
- Help me with Crystal Report (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: connecting a client to multiple servers
- Next Thread: Too many Excel Process
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox connection console control conversion csharp custom database datagrid datagridview dataset datetime degrees deployment developer development draganddrop drawing encryption enum event excel file form format forms function gdi+ hospitalmanagementinformationsystem httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post priviallages. programming radians regex region remote remoting richtextbox serialization server sleep socket sql statistics stream string table tcp temperature text textbox thread time timer txt update uploadatextfile usercontrol validation visualstudio webbrowser windows windowsformsapplication winforms wpf xml





