I have a WPF console app, written in C# and VS 2019.
I have a few Crystal Reports that have worked without any problems.
Now suddenly:
- If I run in Debug Mode, everything fine
- If I run on my computer (the one I develop on), everything is fine.
- When I deploy to a users computer, the report pulls the default data that I used to create the report, but not the data that I load in the following code:
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
using (SqlDataAdapter adp = new SqlDataAdapter(cmd))
{
adp.Fill(ds, "Ledger");
report.SetDataSource(ds.Tables["Ledger"]);
}
}
As I said, on my own system, the program properly loads fresh data from SQL Server.
But on the other computer, it uses the default.
The same program loads another Crystal Report (inside the same CS file) and that one works fine.
- I have tried deleting the entire program and copying it over again.
- I cleared the folder in the
%AppData%
I am at a loss.
Any suggestions?