Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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 February 11th, 2009, 03:57 PM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running crystal XI reports from Visual Basic 6 application

Hello,
As my title reads, I'm having issues running my crystal XI reports from my vb6 application. I keep geting the error 91 - Object variable or With block variable not set and it won't load. Running it in debug mode the error is occurring at this point in code
Code:
 CrystalActiveXReportViewer1.ReportFileName = ReportPath
.
I've checked my references and I think I have all selected, or at least to my knowledge I have.
If you can suggest anything, I would be grateful.

Jade
 
Old February 11th, 2009, 07:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi...

Where is this line?? in the load form???
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old February 12th, 2009, 09:01 AM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Post

The line of code in my initial post is in my MDI form; in the report click event. I hope this helps.


Jade.
 
Old February 12th, 2009, 09:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Without seeing anything else, there is an object that is nothing, and right now the only one I can think of is report viewer. The control is in the form right? Or is another form or a child form???
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old February 12th, 2009, 09:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

And another question. reportfilename is an object or a string? (I can't remember right now.)
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old February 12th, 2009, 04:02 PM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Post

The control is on a form, another form. This form is not an MDI child form. Reportfinename is a property of the report viewer.

Jade
 
Old February 12th, 2009, 09:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well.. if that control is in another form, you will have to do
formname.control
where formname is the name of the form that have the control...

if you don't do that, the control is not loaded yet.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report XI and Visual Basic 6 surendran VB How-To 0 November 14th, 2007 01:38 AM
Visual Basic 5.0 using Crystal Reports JMCHAP1 Beginning VB 6 0 August 21st, 2006 10:38 AM
Crystal Reports and Visual Basic 6 Diego2 VB How-To 0 January 13th, 2005 06:52 PM
Crystal reports 9.0 with Visual Basic 6.0 rahulmoray VB How-To 1 December 8th, 2004 06:22 PM
crystal reports 8.0 in visual basic 5.0 reachshalini VB Components 1 September 30th, 2004 08:18 AM





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