FCapo
asked on
Crystal reports login after closing form
Hi,
I'm using crystal reports with visual studio 2015, I have a report app with crystal report viewer that connects to the sage 50 accounting database from which I present data from, There's a username and password to login to the database which I added to the VB form like this :
CrystalReportViewer1.LogOn Info(1).Co nnectionIn fo.ServerN ame = "xxxx"
CrystalReportViewer1.LogOn Info(1).Co nnectionIn fo.Databas eName = "xxx"
CrystalReportViewer1.LogOn Info(1).Co nnectionIn fo.UserID = "xxx"
CrystalReportViewer1.LogOn Info(1).Co nnectionIn fo.Passwor d = "xxx"
The problem I'm having is when I install the app on a different computer on the network, when I launch the form with the report it works perfectly the first time, then if I close the form and re-open it, it now prompts for the database login and password, from there if i close and re-open the form a couple of times, it eventually shows the data and the login prompt goes away... If it got it right the first time, why does it ask for it on the 2nd time or after a few times?
Also if I run the app from the PC where I work in visual studio, the app never asks for a username and password.
Just wondering what this could be?
Thanks for the help
I'm using crystal reports with visual studio 2015, I have a report app with crystal report viewer that connects to the sage 50 accounting database from which I present data from, There's a username and password to login to the database which I added to the VB form like this :
CrystalReportViewer1.LogOn
CrystalReportViewer1.LogOn
CrystalReportViewer1.LogOn
CrystalReportViewer1.LogOn
The problem I'm having is when I install the app on a different computer on the network, when I launch the form with the report it works perfectly the first time, then if I close the form and re-open it, it now prompts for the database login and password, from there if i close and re-open the form a couple of times, it eventually shows the data and the login prompt goes away... If it got it right the first time, why does it ask for it on the 2nd time or after a few times?
Also if I run the app from the PC where I work in visual studio, the app never asks for a username and password.
Just wondering what this could be?
Thanks for the help
ASKER
Hi,
The logon code is set in the form load event in visual studio.
Because this was the only way that I found on the internet that worked.
The logon code is set in the form load event in visual studio.
Because this was the only way that I found on the internet that worked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
WHy are you associating it with the viewer rather than the report document?
mlmcc