p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Crystal Reports (http://p2p.wrox.com/forumdisplay.php?f=113)
-   -   Urgent:SQL db change dynamicaly for Crystal VC.NET (http://p2p.wrox.com/showthread.php?t=10694)

sumansaumya March 18th, 2004 06:08 AM

Urgent:SQL db change dynamicaly for Crystal VC.NET
 
Hi, I am using crystal 8.0 in VC.NET using the craxdrt.dll.
I want to connect to different database server and difeerent database name at runtime. I have written follwoing code :
/////
IApplicationPtr pApp;
IReportPtr rpt;
pApp.CreateInstance("CrystalRuntime.Application");
rpt = pApp->OpenReport(CString("d:\\report1.rpt").AllocSysStr ing());
pApp->LogOnServer((_bstr_t)"p2ssql.dll", "abum", "northwind", "jhasuman", "sumanjha3");
m_crviewer.put_ReportSource(rpt);
m_crviewer.ViewReport();
///////
but it gives error "Server has not yet been opened". Need any help urgently



All times are GMT -4. The time now is 07:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.