on 01-19-2022 7:23 PM
Hello All...
We developed a web service to export a crystal report to PDFand hosted in IIS (7.5) and calling this web service from classic asp page.
In developer machine which is running on Windows 7 with IIS (7.5) , the code works fine but when deployed to production server which is running on Windows Server 2012 R2 Standard with IIS(8.5) causes export to fail with error message - "Database Logon Failed".
Referred below similar links and tried suggested solutions but could not find a solution.
Can anyone from SAP help us with a solution, please.
Thanks.
Does all classic ASP components exist on the new server?
Lots of reason why you get that error, need details for your reports data source, ODBC, OLE DB, Native or PC based?
If you refresh the report it should prompt you for parameters and/or database log on or file based data source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And time to upgrade to Managed Code:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
Thanks for your intention of helping.
In addition, there is no connection to classic asp for this reported error since it's thrown at web service in below mentioned line of code:
...............................
................................
cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, @"" + file);
Thanks.
FYI - ODBC 13 is not supported any more nor is Windows 7....
Good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you explicitly setting the database credentials in your code? If you have the connection set up to use "Integrated Security" (Single Sign-On), then the web service needs to be run using the credentials of an account that has read access to the database.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your intention of helping.
No configuration of database credentials in the code.
In addition, reported error thrown at the line in below Web Service code.
...............................
................................
cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, @"" + file);
Thanks.
You have to specifically set the database credentials in your code in order for this to work. Crystal only stores the user ID that you used when designing the report - it does NOT store the password with the report. The ODBC connection also does not store the password. You need to make sure that the ODBC connection on the server is NOT set up to use integrated authentication (SSO) and you'll need to provide specific credentials for the database.
If you look at the "Related Documents" section of the Crystal for VS Wiki, you'll see links to some sample programs and a "Getting Started" guide. The samples will show you how to log in to the database for your report.
-Dell
Thanks once again for your response.
I will definitely try the suggested - "specifically set the database credentials in the code".
But one question - Why it was not the case when running in development environment (as detailed in the original post)? I mean, without this code, the report converted to pdf and saved in designated location.
Thanks.
@Dell, thanks for your continuous attention to help
Good news but updating you late that i found a solution for it.
Solution is "Changing the Driver in DSN in ODBC from SQL Server Native Client 11.0 to ODBC Driver 13 for SQL Server" and updated the report with this DSN solved the problem.
Thanks once again.
- AMP AMP
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.