Error:
When printing a Crystal report from Dynamics Report Manager (DRM), you receive the following error message:
Error: Invalid Argument provided.
Failed to retrieve data from the database.
Error in File (ReportName).rpt:
Invalid argument for database.
Cause:
The System DSN set up for Crystal reports is using a SQL Native Client Driver instead of a SQL Server Driver.
Resolution:
- Open the ODBC Data Source Administrator (32-bit) window.
- Go to your Start page and start typing ODBC Data Source Administrator (32-bit).
- In the ODBC Data Source Administrator (32-bit) window, click Add.
- In the Create New Data Source window, select SQL Server, and then click Finish.
- Enter a Name and Description, select the Server Microsoft Dynamics GP (GP) is on, and then click Next.
- Click With SQL Server authentication using a login ID and password entered by the user, enter sa for Login ID, enter sa’s Password, and then click Next.
- Unmark Use ANSI quoted identifiers, unmark Use ANSI nulls, paddings and warnings, and then click Next.
- Unmark Perform translation for character data, and then click Finish.
- In the ODBC Microsoft SQL Server Setup window, click Test Data Source.
- In the SQL Server ODBC Data Source Test window, verify it says TESTS COMPLETED SUCCESSFULLY!, and then click OK.
- In the ODBC Microsoft SQL Server Setup window, click OK.
- Log into GP as sa.
- Go to Microsoft Dynamics GP | Tools | Setup | Dynamics Report Manager | System Settings.
- In the Dynamics Report Manager System Settings window, click the Crystal tab, and then select the new DSN Name you created above.
- If you have more than one company you run this report in, mark the Switch Data Source to use SQL Company Database checkbox.
- If you need to Override Report Credentials, enter sa (for example) and sa’s password.
- Click OK.
- If you specified a DSN Name specific to the report(s) in DRM, go to Reports | Dynamics Report Manager | Dynamics Report Manager Explorer.
- In the Dynamics Report Manager Explorer window, select a report, and then click the Edit Report button.
- In the Report Maintenance window, click Connection.
- Unmark the Override Global Connection to use the default values you specified in Step 13 above.
- Or, select the new DSN Name you created above.