I've added a report to a winform through the reportViewer control. It works fine, but every time I acces the form, I have to enter my SQL username and password. For users, it doesn't even ask and write right away that the user doesn't have the necessary credentials.
I've tried to programmatically set the credentials
reportViewer1.ServerReport.ReportServerCredentials.SetFormsCredentials(null, "myUserblabla", "myPasswordblabla", "");
reportViewer1.RefreshReport();
The username and password are exacly those that work when I directly enter them at runtime. But these credentials sent programmatically are returned as incorrect. I've tried addind the actual domain I'm on, but it doesn't change anything.
How can we send proper credentials so that the users don't have to enter them? I've seen many solutions for ASP,开发者_JAVA百科 but none for winforms.
Thanks!!!
精彩评论