Posted by: R Manimaran | August 28, 2008

Connecting to Crystal Report Server using .net SDK

using CrystalDecisions.Enterprise; 

using CrystalDecisions.Enterprise.Desktop;

using CrystalDecisions.Enterprise.Viewing;
using CrystalDecisions.ReportAppServer.Controllers;

static InfoStore infoStore;


static void ConnectCrystalServer()
Log.WriteFile(“Connecting to CMS…”, Log.LogFileType.INFO);
SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession = sessionMgr.Logon(Common.sCR_UserName,Common.sCR_Password,Common.sCR_CMSName,
EnterpriseService enterpriseService = enterpriseSession.GetService(“InfoStore”);
Log.WriteFile(“Connected Successfully to CMS”,Log.LogFileType.INFO);
Log.WriteFile(Log.Decorate(“\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t”, ‘-‘, Log.DEC_STYLE.DEC_BOTTOM), Log.LogFileType.INFO); 
Log.WriteFile(string.Empty, Log.LogFileType.INFO);
infoStore =new InfoStore(enterpriseService);
catch (Exception  ex)
//Unable to connect to Crystal Report Server
Log.WriteFile(“Unable to connect to Crystal Report Server. Message:” + ex.Message,








Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: