Open IvanIdea opened 5 years ago
I was getting the same error and the same issue. ...humor me by doing the following -- if you can and if you have access to the crystal reports software product:
open/edit the crystal report, remove the 'save with data' field under "FILE" tabe, re-save the crystal, and re-run. Does it now product the crystal report?, or is it still giving the same error?
bushy555
That did the trick. Thank you for the tip!
...unfortunately however , doing this does cause an issue with the automation of refreshing /grabbing updated data.
What type of database are you trying to connect to?
@mhertzfeld probably SQL Server:
The generic message "Login Failed for User (Microsoft SQL Server, Error: 18456)" means you entered invalid credentials when logging into SQL Server.
@IvanIdea I'm curious what the user name and password is pointing to. Is it a Windows domain account or a local SQL server? You should try various account creation methods and see which one works for you.
@sunk818 good catch.
@IvanIdea For your trusted DNS, are you using domain authentication or SQL Server authentication? I am not sure passing domain creds through ninja to SQL server will work. You could use the integrated security option on the connection within the report itself and not pass any creds. That's what I typically do.
When I use a trusted DSN, no problem - it works beautifully. But when I use the -U & -P parameters to pass login credentials I get errors. Here's my command line:
C:\Users\Administrator\Desktop\CrystalReportsNinja -F C:\WebProjects\MIF45_AR\Reports\RptFiles\SetupReports\PlantSurchargeListing.rpt -O C:\ItWorks.pdf -E pdf -S NASPlant2 -U sa -P access -D LL_PLANT
Here's the output: Report loaded successfully Database Login done Exception: Logon failed. Details: [Database Vendor Code: 18456 ] Database Connector Error: ' [Database Vendor Code: 18456 ]' Logon failed. Failed to export the report. Error in File PlantSurchargeListing 49164664{240EE7F6-10AC-416D-B5FB-0ECFF5BD651D}.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ] Inner Exception: System.Runtime.InteropServices.COMException (0x8004100F): Logon failed. Details: [Database Vendor Code: 18456 ] Database Connector Error: ' [Database Vendor Code: 18456 ]' Logon failed. Failed to export the report. Error in File PlantSurchargeListing 49164664{240EE7F6-10AC-416D-B5FB-0ECFF5BD651D}.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ] at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) NULL