fiogf49gjkf0d I am making a call to GenerateReport with the following code. I've hard-coded the connection string (so you can see it) to just what I got out of the MySlxData.CurrentConnection during a previous attempt.
<pre> string pluginid; if (ReportsHelper.GetPluginId("Opportunity:Open Opportunities Summary", out pluginid)) { WebReportingClass reporting = new WebReportingClass(); IDataService datasvc = MySlx.Data.CurrentConnection; IUser user = MySlx.Security.CurrentSalesLogixUser;
string tempPath = "C:\\temp\\Reports\\"; string report = reporting.GenerateReport( "Provider=SLXOLEDB.1 ersist Security Info=True;Initial Catalog=mydbname;Data Source=SLXDEV;User ID=admin assword=\"password\";Extended Properties=\"PORT=1706;LOG=ON;CASEINSENSITIVEFIND=ON;AUTOINCBATCHSIZE=1;SVRCERT=12345;ACTIVITYSECURITY=OFF;TIMEZONE=NONE\"", datasvc.Server, DatabaseServer.dsMSSQL, tempPath, false, false, "OPPORTUNITY.OPPORTUNITYID", user.UserPassword, pluginid, "", "", "", "SELECT OPPORTUNITY.OPPORTUNITYID FROM OPPORTUNITY", "", user.Id.ToString(), user.UserName);
ReportDocument doc = new ReportDocument(); report = string.Format("{0}run\\{1}", tempPath, report); doc.Load(report);
}
The result is the correct report file is actually retrieved and stored to the C:\temp\Reports folder. But when it tries to load the report, it throws the following exception:
Exception: System.Runtime.InteropServices.COMException (0x8004020B): There was an unexpected error in TWebReporting.GenerateReport. The call to TWSSLCRReport.CreateReport failed. Logon failed. Details: [Database Vendor Code: -2147217843 ] (ErrorCode: -2147220981; Source: SLXWR.dll; Class: EWebReportingServerError) at Interop.SLXWR.WebReportingClass.GenerateReport(...
Thinking it was the connection string, I did a programmatic test creating an OleDbconnection with the same connection string and was able to execute a select statement without error. So I believe the connection string is correct.
I have tried everything I could think of. Any ideas on what to try next? I've been beating this up for 2 days.    lease share any ideas.
Thank you
|