on 08-11-2017 9:42 AM
I'm working on a crystal report (ver.2016) reading an excel and generating the report from .Net (C#) application. It works fine in my local however gives error on server (win.2008 R2) - 'Login failed, incorrect logon parameters'. It does not accept the parameters passed from .Net app. Here is the .Net code
ConnectionInfo connectionInfo = newConnectionInfo();
connectionInfo.ServerName = this.MapPath(".") + "\\reports\\" + "Test\\Report1.xlsx";
connectionInfo.DatabaseName = this.MapPath(".") + "\\reports\\" + "Test\\Report1.xlsx";
connectionInfo.IntegratedSecurity = true;
rptDocument.Database.Tables[0].LogOnInfo.ConnectionInfo = connectionInfo;
rptDocument.SetParameterValue("@FY", lblFiscalYear.Text);
rptDocument.SetParameterValue("@Number", AccountCookie["AccountNumber"].ToString());
Stream oStream = rptDocument.ExportToStream(ExportFormatType.PortableDocFormat);
byte[] byteArray = newbyte[oStream.Length];
oStream.Read(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
Can anyone please help me?
What SDK are you using.
CR for VS si the SDK package for CR 2011 and above now.
You can get it from here:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
Install the EXE into VS 2010 or above and the rest are for redist, don not install on DEV PC.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply Don. I've Installed CRforVS_13_0_20 from the same link in both local machine and on server. All my other crystal reports which reads from SQL Server tables work fine (taking parameters from C# code) in both local and server.
Problem is with the report that reads from Excel, which works fine in my local but NOT on server.
Thanks
Use Process Monitor to see what the difference is/missing and/or use CRLogger to see what Crystal is doing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.