p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Crystal report disconnects At run time from Visual Basic 6.0


Message #1 by "fagbamila Taiwo" <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 15:19:41
When i run Crystal report from visual basic, just at the point where The 
Vb program calls Crystal report, The visual basic disconnects from the 
application.

The Crystal report make is 8.5.


Pls help

thanks in advance.

Message #2 by "Tung Dang" <tdan@h...> on Mon, 17 Jun 2002 10:18:16 -0400
To all subscribers,
I think it's best for all of us that we report crystal reports problems 
clearly. 

If possible, write steps to reproduce the problem.  Include any code 
snippets.  And please give very detailed descriptions of your problems.

The more detailed it is, the better we can solve.  I enjoy 
troubleshooting crystal report problems but reading emails like that 
below can be frustating and I usually spend more time trying to figure 
what the problem is rather than how to solve it.  Thanks.

-----Original Message-----
From: fagbamila Taiwo [mailto:taiwo.fagbamila@n...]
Sent: Monday, June 17, 2002 11:20 AM
To: crystal_reports
Subject: [crystal_reports] Crystal report disconnects At run time from
Visual Basic 6.0


When i run Crystal report from visual basic, just at the point where The 

Vb program calls Crystal report, The visual basic disconnects from the
application.

The Crystal report make is 8.5.


Pls help

thanks in advance.

Message #3 by Taiwo Fagbamila <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 15:25:45 +0200
I Guess i was in a mad Rush to get this problem solved. -- Sorry.

I use Visual Basic 6.0 with Crystal report 8.5 (just changed to it
anyway), When i develop applications that has crystal reports as a
designer form inside of visual basic it (crystal report) disconnects at
run time without giving any error message. My closest guess will be that
it disconnects at the .action=1 point.

I have to say that i am developing on a win2k system. and that even when
i develop applications that try to call crystal report (using
creport.report = app.path & \....") the message is that application
disconnects from client.


i do hope this explains the problem??

Thanks so much for the concern.

tai



________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com


Message #4 by "Tung Dang" <tdan@h...> on Mon, 17 Jun 2002 10:34:24 -0400
I'm not sure if its the .action point that disconnects.  Did you use 
breakpoints to pinpoint the exact line that the diconnection occured.

Also, you may want to doublecheck the location of the crystal report 
where you have app.path...

Try debug.print app.path & "\...\" and see it it's pointing to the exact 
location.



-----Original Message-----
From: Taiwo Fagbamila [mailto:taiwo.fagbamila@n...]
Sent: Monday, June 17, 2002 9:26 AM
To: crystal_reports
Subject: [crystal_reports] RE: Crystal report disconnects At run time
from Visual Basic 6.0


I Guess i was in a mad Rush to get this problem solved. -- Sorry.

I use Visual Basic 6.0 with Crystal report 8.5 (just changed to it
anyway), When i develop applications that has crystal reports as a
designer form inside of visual basic it (crystal report) disconnects at
run time without giving any error message. My closest guess will be that
it disconnects at the .action=3D1 point.

I have to say that i am developing on a win2k system. and that even when
i develop applications that try to call crystal report (using
creport.report =3D app.path & \....") the message is that application
disconnects from client.


i do hope this explains the problem??

Thanks so much for the concern.

tai



________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com



Message #5 by Taiwo Fagbamila <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 15:57:45 +0200
Thanks  for the prompt response. I have tried the app.path and i'm sure
that is correct.
Again i have to say that you are right about the .action part.

find the below code, it disconnects at the crviewer1.reportsource=report
point. What do you think can be wrong??



   On Error GoTo Errorhandler:

    Screen.MousePointer = vbHourglass
    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport
    Screen.MousePointer = vbDefault
    Exit Sub
    
Errorhandler:
    MsgBox "Can not complete Report. Error " + Err.Number + " " +
Err.Description + "  Occured while trying to load Report", vbInformation
+ vbSystemModal, "Caution Notice"
    Exit Sub



Appreciations brother!



    
Message #6 by "Tung Dang" <tdan@h...> on Mon, 17 Jun 2002 11:15:36 -0400
Instead of setting crviewer1.reportsource =3D report,

try set it to crviewer1.reportsource =3D app.path & "\...\yourname.rpt".

I thought the .action opens up the crystal report.  I'm looking at my vb 
code that opens crystal report and the .action method pops up crystal 
report without having to call .viewreport or .reportsource.



-----Original Message-----
From: Taiwo Fagbamila [mailto:taiwo.fagbamila@n...]
Sent: Monday, June 17, 2002 9:58 AM
To: crystal_reports
Subject: [crystal_reports] RE: Crystal report disconnects At run time
from Visual Basic 6.0



Thanks  for the prompt response. I have tried the app.path and i'm sure
that is correct.
Again i have to say that you are right about the .action part.

find the below code, it disconnects at the 
crviewer1.reportsource=3Dreport
point. What do you think can be wrong??



   On Error GoTo Errorhandler:

    Screen.MousePointer =3D vbHourglass
    CRViewer1.ReportSource =3D Report
    CRViewer1.ViewReport
    Screen.MousePointer =3D vbDefault
    Exit Sub
   
Errorhandler:
    MsgBox "Can not complete Report. Error " + Err.Number + " " +
Err.Description + "  Occured while trying to load Report", vbInformation
+ vbSystemModal, "Caution Notice"
    Exit Sub



Appreciations brother!



   

Message #7 by Taiwo Fagbamila <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 16:25:30 +0200
The Issue is that i have the crystal report inside my visual basic code
so that there is no need to set a recordsource. Are you saying i should
have the crystal report seperate from vb?? so i can use .recordsource??



thanks

________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com

Message #8 by "Tung Dang" <tdan@h...> on Mon, 17 Jun 2002 11:33:37 -0400
Is the main goal here to open crystal report and not have it disconnect?

I still don't know if you're opening crystal report inside a form or as 
a seperate report view.

If so, there should only be two main crystal report properties in your 
vb code.

.reportfilename that points to the location and .action which opens the 
crystal report for viewing.

I'm pretty sure you got this so why do you have .reportsource and 
.reportview  and now mentioning .recordsource when .recordsource is 
already set in the report itself.

Sorry, I'm not a crystal report guru yet but I'm just trying to learn 
from experience.  thanks.

-----Original Message-----
From: Taiwo Fagbamila [mailto:taiwo.fagbamila@n...]
Sent: Monday, June 17, 2002 10:25 AM
To: crystal_reports
Subject: [crystal_reports] RE: Crystal report disconnects At run time
from Visual Basic 6.0


The Issue is that i have the crystal report inside my visual basic code
so that there is no need to set a recordsource. Are you saying i should
have the crystal report seperate from vb?? so i can use .recordsource??



thanks

________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com


Message #9 by Taiwo Fagbamila <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 16:53:31 +0200
Thank for your concern.

All i'm saying is that there exist a designer module for c.report 8.5
that automatically adds a Crystal report viewer and a form to your
project. That is what i'm using. And i have set the .recordsource to the
creport viewer name Hence there is no need to set this property to an
absolute path.

i appreciate your concerns and effort. Pls all you can do is
appreciated.

thanks

________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com

Message #10 by "Tung Dang" <tdan@h...> on Mon, 17 Jun 2002 12:09:27 -0400
so when you mentioned it disconnects, what does the report do, does it 
complete closes the report viewer or does it disconnects its database 
connection.

-----Original Message-----
From: Taiwo Fagbamila [mailto:taiwo.fagbamila@n...]
Sent: Monday, June 17, 2002 10:54 AM
To: crystal_reports
Subject: [crystal_reports] RE: Crystal report disconnects At run time
from Visual Basic 6.0


Thank for your concern.

All i'm saying is that there exist a designer module for c.report 8.5
that automatically adds a Crystal report viewer and a form to your
project. That is what i'm using. And i have set the .recordsource to the
creport viewer name Hence there is no need to set this property to an
absolute path.

i appreciate your concerns and effort. Pls all you can do is
appreciated.

thanks

________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com


Message #11 by Taiwo Fagbamila <taiwo.fagbamila@n...> on Mon, 17 Jun 2002 17:15:20 +0200
It disconnects from Visual basic and closes even the vb project (Even
when run in design mode). So you have to open the project again.



________________________________________________________________________
____
Fagbamila Adetayo Taiwo
Software Development Unit
Information Technology Department
Intercontinental Bank Limited
999c Danmole Street, V/Island
Lagos
Tel: 234-1-2622940-59 ext 2029
Direct Line:234-1-2623021
Website: www.intercontinentalbankltd.com



  Return to Index