Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2004, 06:08 AM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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






Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 1.1,VB.NET,crystal reports, SQl server gvi Crystal Reports 1 September 11th, 2008 02:55 AM
need help in creating new crystal report using vc+ pravsaugat BOOK: Professional C++ 0 August 14th, 2007 01:29 AM
Using VB.Net to change the SQL Statment yicksang BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 March 31st, 2006 04:17 AM
How can I pass sql query through vb.net to crystal sachinbashetti Crystal Reports 0 May 14th, 2005 01:47 AM
how to use VC++ in DB? yas_msr MySQL 0 September 5th, 2003 11:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.