Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ApplyLogOnInfo() reverts back to original connection information

This is one of the single toughest APIs that I've ever had to use. Although I have developed with Crystal Reports for about 10 years, I continue to have the simplest of problems. Today it became aparent that our current implementation wasn't working anymore. We'd not too long ago switched to VS2010 and the newest version of Crystal Reports for VS2010.

Anyway, I found that when I'd loop through the tables in a report, even though I'd set the ConnectionInfo correctly, upon calling ApplyLogOnInfo(), the database and server would switch right back to what they were set as in the designed RPT file! How's that for frustrating?

Well, after a day's worth of troubleshooting it also became evident that I needed to do a lot of the property setting myself, as the API calls don't seem to do it themselves. So, anyone who's interested in code that seems to work for me, here you go.

In my example I refer to a "Report" object which is just a class with string variables for connection parameters and a boolean swtich for integrated versus non-integrated security.

Edited by: Don Williams on Feb 11, 2011 2:56 PM

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question