I'm using Crystal Report on Visual studio 2019 and I'm trying to connect to the Crystal Report file using Client Computer but it failed, the scenario is that I have a database on My computer and the client have the same database with the same tables and procedures ( but we don't have the same data ). So the difference is in the username , password and the Server Name. I can connect to the Crystal report and call the procedure from the database connected, and the data showing in the Crystal Report Viewer, but the problem appears in the Client Side, when he try to open the Crystal Viewer, he get asked for the database login ( Popup Database login ).
The Server Name and the Login ID shown in this Popup in the Client Computer is The same parameters of my connection string.
I'm trying to make the Server Name, password and the Login ID changed dynamically when the application will be installed in another computer , I mean , I would like to have access to this popup with code to modify these fields and make this programmatically,
Note: I have already posted a question with on StackOverflow and I have searched for solution in the web but I can't find what I need.
What I have tried:
C# Code ( CrystalReport.xaml.cs )
private void CrystalReportsViewer_Loaded(object sender, RoutedEventArgs e)
CrystalReport1 cry1 = new CrystalReport1();
GlobalConfig.sql.ConnectionString = GlobalConfig.connectionString;
GlobalConfig gb = new GlobalConfig();
using (IDbConnection connection = GlobalConfig.sql)
List<string> ls = new List<string>();
ls = gb.getConnectionlogin();
crysview.ViewerCore.ReportSource = cry1;
Console.WriteLine("Error load file " + es);