Print Crystal Report that uses a SQL stored procedure from C#, VS2008 -- log on problems
Using the code show here I am trying to print a Crystal Report (2011) from C#, VS2008. When I use these techniques on a table-based report, things work fine. The current report is based on a stored procedure and I get "Unable to connect. Incorrect log on parameters" at the PrintToPrinter command. I have given the stored proceure explict execute permissions for the cyrstal user. This was necessary to even see the s/p in the Crystal designer interface.
When I preview the report in the Crystal interface, everything works fine. I do get the log on dialogue. Part of that is the database name, of course, so I tried setting that in my code, too, but that didn't work.
I don't know then. I hav enever had to change it for a stored procedure. It is possible that you can't since the SP is executed before the report is opened.
mlmcc
g_johnson
ASKER
This turned out to be a so far unexplained problem with the ODBC connection. A new connection fixed the issue. These were great trouble shooting tips, though.