- CRYSTAL REPORT VIEWER ASKING FOR LOGIN CREDENTIALS CODE
- CRYSTAL REPORT VIEWER ASKING FOR LOGIN CREDENTIALS PASSWORD
You can skip this step, if you dont require it. As I was creating this Report source dynamically, I needed to add the Source control to the page. TableLogOnInfo crTableLogOnInfo = t.LogOnInfo From the Database menu, select Set Datasource Location. To get around this issue, re-open the customized report in Crystal Report Designer. Crystal report asking username and password.
CRYSTAL REPORT VIEWER ASKING FOR LOGIN CREDENTIALS CODE
So, here’s the code you can employ in case your design & run time connection strings differ for the Crystal Report: When printing customized reports within Sage 300 ERP, the customer is prompted for a MS SQL security login. Crystal reports, why is it asking for database login even after I provided the details Ask Question. The way the report works is: Shipping dept enters job (itll automatically look up in our ERP system for that job and pull the customer name, partnumber on the job, & customer PO) They enter the qty per box (i.e 4000) They enter number of boxes (i.e 5) that will total up 4000qty per box total of 20,000 qty shipped.
I learnt from MSDN that CrystalReportViewer actually did take care of user session data such as the logon crendential. Looking at it retrospectively, I now think that it makes sense to do so for each table. So, the report viewer ask for logon credential and parameters again when user click on the any menu button on the viewer. However, if they don’t, then simply using the SetDatabaseLogin method should be sufficient to prevent the credentials form from being thrown up. So, the piece in the puzzle that I was missing was, that you need to set the Database Logon credentials on each table inside the Report database independently, if your design & run time connections differ. If they were different, the Report Viewer again threw up the form asking the credentials.Īnd I finally got what I was looking for at the SAP Crystal Reports forums here, thanks to the SAP community member, Ludek Uher: However, this method only worked when the Server & Database at design & run times were same. My understanding was that using the ReportDocument‘s SetDatabaseLogon method should have been sufficient for the task. Needless to say, this was utterly unprofessional. And everytime I did so, the report threw up the form asking the user to fill in the connection parameters (I was using ASP.NET web-based reports but the approach below works on desktop also).
CRYSTAL REPORT VIEWER ASKING FOR LOGIN CREDENTIALS PASSWORD
When the report is opened and refreshed, the user gets prompted to enter a user name and password to access the database. The problem was that I needed to use a different runtime connection than what was configured for the report at design time. In Crystal Reports (CR), a report is created and refreshed against a secured database. (It appears that I have to log in to fill the parameters and then log in again to actually retrieve.
I was having considerable problem figuring out a way to specify the connection parameters for my Crystal Reports at runtime that used the Pull model for stuffing data. Were running Crystal Reports XI standalone (no server components), and while weve been able to code for the standard database login in reports with static parameters, were getting an extra login prompt for any report with dynamic parameters.